Mercurial > might-and-magic-trilogy
diff Indoor.cpp @ 92:9a2fa2f2cce0
minor fixes
author | Nomad |
---|---|
date | Thu, 01 Nov 2012 11:58:02 +0200 |
parents | f9a33f75bae3 |
children | b5e26a133fae |
line wrap: on
line diff
--- a/Indoor.cpp Mon Oct 29 01:36:20 2012 +0200 +++ b/Indoor.cpp Thu Nov 01 11:58:02 2012 +0200 @@ -453,8 +453,8 @@ //char v21; // dl@27 //unsigned int v22; // eax@44 unsigned int v23; // eax@35 - DWORD v24; // eax@37 - int v25; // eax@38 + //DWORD v24; // eax@37 + //int v25; // eax@38 //char *v26; // edi@38 IDirect3DTexture2 *v27; // eax@42 Texture *v28; // [sp+Ch] [bp-1Ch]@15 @@ -503,7 +503,7 @@ static_vertices_F7C228[i].vWorldPosition.y = pIndoor->pVertices[pFace->pVertexIDs[i]].y; static_vertices_F7C228[i].vWorldPosition.z = pIndoor->pVertices[pFace->pVertexIDs[i]].z; static_vertices_F7C228[i].u = (signed short)pFace->pVertexUIDs[i]; - static_vertices_F7C228[i].v = (signed short)pFace->pVertexUIDs[i]; + static_vertices_F7C228[i].v = (signed short)pFace->pVertexVIDs[i]; } if (!pVertices || @@ -568,19 +568,21 @@ if (pFace->Animated()) { - v24 = GetTickCount() / 4; - v25 = v24 - stru_5C6E00->uIntegerHalfPi; - + //auto v24 = GetTickCount() / 4; + //auto v25 = v24 - stru_5C6E00->uIntegerHalfPi; + uint eightSeconds = GetTickCount() % 8000; + float angle = (eightSeconds / 8000.0f) * 2 * 3.1415f; + + //animte lava back and forth for (uint i = 0; i < uNumVerticesa; ++i) - array_507D30[i].v += (double)(pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 & (unsigned int)(stru_5C6E00->SinCos(v25) >> 8)); + //array_507D30[i].v += (double)(pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 & (unsigned int)(stru_5C6E00->SinCos(v25) >> 8)); + array_507D30[i].v += pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 * cosf(angle); v23 = pFace->uBitmapID; goto LABEL_42; } - else + else if (pFace->uAttributes & 0x4000) { - if (pFace->uAttributes & 0x4000) - { v23 = pTextureFrameTable->GetFrameTexture( pFace->uBitmapID, pBLVRenderParams->field_0_timer_); @@ -591,7 +593,6 @@ else pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | 6, v17, 0); return; - } } } }