Mercurial > mm7
diff Render.cpp @ 62:80484cf3a683
23.01.13 DrawParticles_ODM
author | Ritor1 |
---|---|
date | Wed, 23 Jan 2013 00:50:28 +0600 |
parents | 6c2cefdaea3e |
children | f6e7d7110512 |
line wrap: on
line diff
--- a/Render.cpp Tue Jan 22 18:41:17 2013 +0600 +++ b/Render.cpp Wed Jan 23 00:50:28 2013 +0600 @@ -1001,7 +1001,7 @@ char v102; // [sp+Ch] [bp-68h]@191 __int16 v103; // [sp+10h] [bp-64h]@190 __int16 v104; // [sp+12h] [bp-62h]@190 - int v105; // [sp+1Ch] [bp-58h]@1 + int pHeight; // [sp+1Ch] [bp-58h]@1 int v106; // [sp+20h] [bp-54h]@3 int v107; // [sp+24h] [bp-50h]@3 int v108; // [sp+28h] [bp-4Ch]@9 @@ -1025,7 +1025,7 @@ float v126; // [sp+70h] [bp-4h]@9 memset(&v102, 0, sizeof(v102)); - v105 = pIndoorCamera->sRotationY / ((signed int)stru_5C6E00->uIntegerHalfPi / 2); + pHeight = pIndoorCamera->sRotationY / ((signed int)stru_5C6E00->uIntegerHalfPi / 2); v0 = stru_5C6E00->uDoublePiMask & (stru_5C6E00->uIntegerDoublePi - pIndoorCamera->sRotationY); v1 = stru_5C6E00->uDoublePiMask & (stru_5C6E00->uIntegerPi + v0); LODWORD(v124) = (signed int)((pIndoorCamera->uMapGridCellX << 16) @@ -1149,7 +1149,7 @@ LODWORD(v126) = 0; v17 = v117 - 1; v18 = v116 - 1; - switch ( v105 ) + switch ( pHeight ) { case 0: case 7: @@ -1561,7 +1561,7 @@ ptr_801A08 = pVerticesSR_806210; ptr_801A04 = pVerticesSR_801A10; LODWORD(v126) = v69; - if ( v105 && v105 != 7 && v105 != 3 && v105 != 4 ) + if ( pHeight && pHeight != 7 && pHeight != 3 && pHeight != 4 ) { for ( i = v69; i >= 1; --i ) { @@ -1590,21 +1590,21 @@ v127 = 0; v79 = (v73 - 66) << 9; v116 = v77; - v105 = v79; + pHeight = v79; v111 = v75 - v77; do {// âûñîòà ÷åòûðåõ âåðøèí ÿ÷åéêè - *(float *)&v106 = (double)v105; + *(float *)&v106 = (double)pHeight; *(float *)((char *)&ptr_801A08->vWorldPosition.x + v127) = *(float *)&v106;//x - v105 = (64 - *(int *)((char *)terrain_76D9C8 + v70)) << 9; - *(float *)((char *)&ptr_801A08->vWorldPosition.y + v127) = (double)v105;//y - v105 = pOutdoor->GetHeightOnTerrain(v112, *(int *)((char *)terrain_76D9C8 + v70)); - *(float *)((char *)&ptr_801A08->vWorldPosition.z + v127) = (double)v105;//z + pHeight = (64 - *(int *)((char *)terrain_76D9C8 + v70)) << 9; + *(float *)((char *)&ptr_801A08->vWorldPosition.y + v127) = (double)pHeight;//y + pHeight = pOutdoor->GetHeightOnTerrain(v112, *(int *)((char *)terrain_76D9C8 + v70)); + *(float *)((char *)&ptr_801A08->vWorldPosition.z + v127) = (double)pHeight;//z *(float *)((char *)&ptr_801A04->vWorldPosition.x + v127) = *(float *)&v106;//x - v105 = (63 - *(int *)((char *)terrain_76D9C8 + v70)) << 9; - *(float *)((char *)&ptr_801A04->vWorldPosition.y + v127) = (double)v105;//y - v105 = pOutdoor->GetHeightOnTerrain(v112, *(int *)((char *)terrain_76D9C8 + v70) + 1); - *(float *)((char *)&ptr_801A04->vWorldPosition.z + v127) = (double)v105;//z + pHeight = (63 - *(int *)((char *)terrain_76D9C8 + v70)) << 9; + *(float *)((char *)&ptr_801A04->vWorldPosition.y + v127) = (double)pHeight;//y + pHeight = pOutdoor->GetHeightOnTerrain(v112, *(int *)((char *)terrain_76D9C8 + v70) + 1); + *(float *)((char *)&ptr_801A04->vWorldPosition.z + v127) = (double)pHeight;//z if ( !byte_4D864C || !(pGame->uFlags & 0x80) ) { a1->ViewTransform((RenderVertexSoft *)(char *)ptr_801A08 + v127, 1); @@ -1615,13 +1615,13 @@ v79 += 512; v127 += 48; ++v116; - v105 = v79; + pHeight = v79; } while ( v116 < v107 ); } v103 = abs((int)pIndoorCamera->uMapGridCellZ - terrain_76D9C8[v70]); v104 = abs((int)pIndoorCamera->uMapGridCellX - terrain_76DBC8[v70]); - if ( pRenderer->pRenderD3D ) + if ( pRenderer->pRenderD3D )//Ritor1: do comment to test Render::DrawTerrainD3D(v111, 0, (int)&v102); else Render::DrawTerrainSW(v111, 0, (int)&v102); @@ -1653,23 +1653,23 @@ v86 = 0; v116 = v89 - 2; v92 = (66 - v89) << 9; - v105 = (66 - v89) << 9; + pHeight = (66 - v89) << 9; v111 = v90 + 2 - (v89 - 2); do { v93 = v116; v106 = (*(int *)((char *)terrain_76DBC8 + v86) - 64) << 9; *(float *)((char *)&ptr_801A08->vWorldPosition.x + v86) = (double)v106; - *(float *)&v105 = (double)v105; - *(float *)((char *)&ptr_801A08->vWorldPosition.y + v86) = *(float *)&v105; + *(float *)&pHeight = (double)pHeight; + *(float *)((char *)&ptr_801A08->vWorldPosition.y + v86) = *(float *)&pHeight; v106 = pOutdoor->GetHeightOnTerrain(*(int *)((char *)terrain_76DBC8 + v86), v93); v97 = v116; *(float *)((char *)&ptr_801A08->vWorldPosition.z + v86) = (double)v106; v106 = (*(int *)((char *)terrain_76DBC8 + v86) - 63) << 9; *(float *)((char *)&ptr_801A04->vWorldPosition.x + v86) = (double)v106; - *(float *)((char *)&ptr_801A04->vWorldPosition.y + v86) = *(float *)&v105; - v105 = pOutdoor->GetHeightOnTerrain(*(int *)((char *)terrain_76DBC8 + v86) + 1, v97); - *(float *)((char *)&ptr_801A04->vWorldPosition.z + v86) = (double)v105; + *(float *)((char *)&ptr_801A04->vWorldPosition.y + v86) = *(float *)&pHeight; + pHeight = pOutdoor->GetHeightOnTerrain(*(int *)((char *)terrain_76DBC8 + v86) + 1, v97); + *(float *)((char *)&ptr_801A04->vWorldPosition.z + v86) = (double)pHeight; if ( !byte_4D864C || !(pGame->uFlags & 0x80) ) { a1->ViewTransform((RenderVertexSoft *)(char *)ptr_801A08 + v86, 1); @@ -1680,7 +1680,7 @@ v92 -= 512; v86 += 48; ++v116; - v105 = v92; + pHeight = v92; } while ( v116 < v107 ); } @@ -1851,11 +1851,11 @@ v13 = v8->vWorldPosition.y + 6.755399441055744e15, sY = LODWORD(v13), thisd = (v10->vWorldPosition.x + v8->vWorldPosition.x) * 0.5, - v14 = WorldPosToGridCellX(floorf(thisd + 0.5f)), + v14 = WorldPosToGridCellX(floorf(thisd + 0.5f)),//maybe current camera position X v15 = v9->vWorldPosition.y + v8->vWorldPosition.y, v89 = v14, thise = v15 * 0.5, - _this = (LightmapBuilder *)WorldPosToGridCellZ(floorf(thisd + 0.5f)), + _this = (LightmapBuilder *)WorldPosToGridCellZ(floorf(thisd + 0.5f)),//maybe current camera position Z WorldPosToGridCellX(sX), WorldPosToGridCellZ(sY), !byte_4D864C) @@ -2110,24 +2110,10 @@ a8 = (RenderVertexSoft *)(this_3a ? 3 : v108 != 0 ? 5 : 0); static_sub_0048034E_stru_76D590._49B0C9(v99, *(float *)&a4); if ( pDecalBuilder->uNumDecals > 0 ) - pDecalBuilder->ApplyDecals( - 31 - v40->field_58, - 4, - &static_sub_0048034E_stru_76D590, - uNumVertices, - array_50AC10, - 0, - (char)a8, - -1); + pDecalBuilder->ApplyDecals(31 - v40->field_58, 4, &static_sub_0048034E_stru_76D590, uNumVertices, array_50AC10, 0, (char)a8, -1); } if ( stru_F8AD28.uNumLightsApplied > 0 ) - v96->ApplyLights( - &stru_F8AD28, - &static_sub_0048034E_stru_76D590, - uNumVertices, - array_50AC10, - 0, - (char)a8); + v96->ApplyLights(&stru_F8AD28, &static_sub_0048034E_stru_76D590, uNumVertices, array_50AC10, 0, (char)a8); v55 = uNumVertices; v35 = byte_4D864C == 0; v40->uNumVertices = uNumVertices; @@ -4289,7 +4275,7 @@ { if ( !v54 || byte_4D864C && pGame->uFlags & 2 ) { - ErrD3D(pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, 1u)); + ErrD3D(pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, 1u));//Ðåæèìû âèçóàëèçàöèè òî÷å÷íûõ ñïðàéòîâ ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_CW)); if (bUsingSpecular) { @@ -7079,7 +7065,7 @@ if (pRenderD3D) { pGame->draw_debug_outlines(); - DoRenderBillboards_D3D(); //Ritor1: it's temporarily + //DoRenderBillboards_D3D(); //Ritor1: it's temporarily pGame->pStru6Instance->RenderSpecialEffects(); pRenderD3D->pDevice->EndScene(); }