Mercurial > mm7
diff mm7_3.cpp @ 1206:ab6560001f5b
arrays to std::arrays phase 2 - some more arrays converted
author | Grumpy7 |
---|---|
date | Sun, 09 Jun 2013 01:10:49 +0200 |
parents | 8c02e6f74b29 |
children | 96a81634669e |
line wrap: on
line diff
--- a/mm7_3.cpp Sun Jun 09 00:30:48 2013 +0200 +++ b/mm7_3.cpp Sun Jun 09 01:10:49 2013 +0200 @@ -4665,7 +4665,7 @@ { //v19 = (char *)&array_73D150[0].vWorldPosition.z; //v20 = (char *)pFace->pTextureUIDs; - v19 = array_73D150; + v19 = array_73D150.data(); v20 = pFace->pTextureUIDs; v20b = pFace->pVertexIDs; v20c = pFace->pTextureVIDs; @@ -4707,7 +4707,7 @@ } while ( !v10 ); //v23 = (char *)&array_73D150[0].vWorldViewPosition; - v23 = array_73D150; + v23 = array_73D150.data(); v51 = uNumVertices; *(float *)&pLightmapBuilder = (double)(signed int)pLightmapBuilder; do @@ -4760,7 +4760,7 @@ return result; ++pOutdoorCamera->numStru148s; ++pOutdoorCamera->field_44; - if ( ODMFace::IsBackfaceCulled(pFace, array_73D150, v7) ) + if ( ODMFace::IsBackfaceCulled(pFace, array_73D150.data(), v7) ) { LOBYTE(v25) = (char)v54; v26 = a1; @@ -4814,13 +4814,13 @@ v40 = -1; v39 = v31; v38 = 0; - v37 = array_50AC10; + v37 = array_50AC10.data(); v36 = uNumVertices; pDecalBuilder->ApplyDecals(31 - v7->dimming_level, 2, &static_RenderBuildingsD3D_stru_73C834, uNumVertices, - array_50AC10, + array_50AC10.data(), 0, (char)v31, -1); @@ -4831,7 +4831,7 @@ &stru_F8AD28, &static_RenderBuildingsD3D_stru_73C834, uNumVertices, - array_50AC10, + array_50AC10.data(), 0, (char)v31); if ( v50 ) @@ -5091,7 +5091,7 @@ return result; ++pOutdoorCamera->numStru148s; ++pOutdoorCamera->field_44; - if ( !ODMFace::IsBackfaceCulled(v3, array_73D150, v12) ) + if ( !ODMFace::IsBackfaceCulled(v3, array_73D150.data(), v12) ) { LABEL_71: --pOutdoorCamera->numStru148s; @@ -5185,7 +5185,7 @@ v55 = static_sub_004789DE_stru_73C818.face_plane.vNormal.x; v56 = static_sub_004789DE_stru_73C818.face_plane.vNormal.y; v57 = static_sub_004789DE_stru_73C818.face_plane.vNormal.z; - pGame->pLightmapBuilder->_45CA88(&stru_F8AD28, array_50AC10, v26, (Vec3_float_ *)&v55); + pGame->pLightmapBuilder->_45CA88(&stru_F8AD28, array_50AC10.data(), v26, (Vec3_float_ *)&v55); } if ( v74 ) { @@ -5273,7 +5273,7 @@ } } } - sr_sub_486B4E_push_outdoor_edges(array_508690, dword_50B638.data(), dword_50B570.data(), v12); + sr_sub_486B4E_push_outdoor_edges(array_508690.data(), dword_50B638.data(), dword_50B570.data(), v12); } LABEL_72: ++v79; @@ -5434,7 +5434,7 @@ v1 = (unsigned int)&array_77EC08[pOutdoorCamera->numStru148s]; v15 = (double)pOutdoor->vSunlight.y / 65536.0; v16 = (double)pOutdoor->vSunlight.z / 65536.0; - if ( v1 > (unsigned int)array_77EC08 ) + if ( v1 > (unsigned int)array_77EC08.data() ) { v2 = (char *)&array_77EC08[0].pODMFace; while ( 1 ) @@ -6319,7 +6319,7 @@ v62.v_18.x = -v9; v62.v_18.z = -stru_5C6E00->Cos(v8 + 16); v10 = pBLVRenderParams->uViewportZ - pBLVRenderParams->uViewportX; - memcpy(&array_507D30[v3], array_507D30, sizeof(array_507D30[v3])); + memcpy(&array_507D30[v3], array_507D30.data(), sizeof(array_507D30[v3])); LODWORD(v80) = v10; v62.field_24 = 33554432; v64 = (double)(signed int)v10 * 0.5; @@ -6421,11 +6421,11 @@ if ( (signed int)v62.uNumVertices > 0 ) { v28 = (double)SLODWORD(v76); - LODWORD(v76) = (int)(char *)array_50AC10 + 28; + LODWORD(v76) = (int)(char *)array_50AC10.data() + 28; v29 = (char *)&array_50AC10[0].vWorldViewProjX; v30 = (char *)&array_507D30[1].vWorldViewProjY; - v79 = array_50AC10; - v81 = array_507D30; + v79 = array_50AC10.data(); + v81 = array_507D30.data(); v78 = v62.uNumVertices; do { @@ -6546,8 +6546,8 @@ if ( SLODWORD(v73) > 0 ) { v48 = (double)SLODWORD(v80); - v75 = array_507D30; - v49 = array_50AC10; + v75 = array_507D30.data(); + v49 = array_50AC10.data(); HIDWORD(v69) = LODWORD(v73); do { @@ -6569,8 +6569,8 @@ if ( SLODWORD(v73) > 0 ) { v51 = (double)SLODWORD(v80); - v75 = array_507D30; - v52 = array_50AC10; + v75 = array_507D30.data(); + v52 = array_50AC10.data(); v80 = v73; do { @@ -7914,8 +7914,8 @@ v13 = &array_508690[v21]; if ( LODWORD(v29) != 3 ) { - v11 = array_508690; - v13 = (RenderVertexSoft *)((char *)array_508690 + 16 * (3 * v1 - 3)); + v11 = array_508690.data(); + v13 = (RenderVertexSoft *)((char *)array_508690.data() + 16 * (3 * v1 - 3)); v12 = &array_508690[1]; v28 = array_508690[1].vWorldPosition.x - array_508690[0].vWorldPosition.x; v27 = array_508690[1].vWorldPosition.y - array_508690[0].vWorldPosition.y;