Mercurial > mm7
diff Render.cpp @ 179:f102bbff6fd8
15.02.13 Water
author | Ritor1 |
---|---|
date | Fri, 15 Feb 2013 17:14:24 +0600 |
parents | d1dde383af89 |
children | d65528fc3bda 038a4d09406f |
line wrap: on
line diff
--- a/Render.cpp Fri Feb 15 10:41:54 2013 +0600 +++ b/Render.cpp Fri Feb 15 17:14:24 2013 +0600 @@ -20,6 +20,7 @@ #include "OSInfo.h" #include "Actor.h" #include "Log.h" +#include "TileFrameTable.h" #include "mm7_data.h" @@ -1711,6 +1712,7 @@ int v6; // ecx@8 //int v7; // ecx@8 struct stru148 *v8; // ebx@8 +// RenderVertexSoft *v8a; // edi@3 //char v11; // zf@8 struct stru148 *v16; unsigned int v18; // edi@22 @@ -1739,6 +1741,7 @@ int v64; // [sp+57h] [bp-1h]@2 int v62; //struct IndoorCameraD3D *pIndoorCameraD3D; + //RenderVertexSoft *pVertices; // [sp+C4h] [bp-Ch]@6 v63 = 0; // basic optimizations @@ -1787,12 +1790,17 @@ v8->flags = 0; v8->field_32 = 0; //unsigned int uTileID = pOutdoor->pTerrain.pTilemap[z * 128 + x]; - //struct TileDesc *pTile = pOutdoor->pTerrain->pTileTable->GetTileById(uTileID); + //struct TileDesc *pTile = pTileTable->GetTileById(uTileID); v8->uTileBitmapID = pOutdoor->DoGetTileTexture(x, z); - v6 = v8->uTileBitmapID; - v8->pTexture = (Texture *)&pBitmaps_LOD->pHardwareTextures[v6]; + //v6 = v8->uTileBitmapID; + v8->pTexture = (Texture *)&pBitmaps_LOD->pHardwareTextures[v8->uTileBitmapID]; if (v8->uTileBitmapID == 0xFFFF) continue; + v8->flags = 0x8010 |pOutdoor->GetSomeOtherTileInfo(x, z); + v8->field_32 = 0; + v8->field_59 = 1; + //v8->field_5D = (char)WorldPosToGridCellZ(floorf((pVertices->vWorldPosition.z + v8a->vWorldPosition.z) / 2 + 0.5f)); + //v8->field_5C = WorldPosToGridCellX(floorf((v101->vWorldPosition.x + v8->vWorldPosition.x) / 2 + 0.5f));; v8->sTextureDeltaU = 0; v8->sTextureDeltaV = 0; memcpy(array_73D150 + 0, &pTerrainVertices[z * 128 + x], sizeof(RenderVertexSoft)); @@ -1828,6 +1836,17 @@ array_50AC10[k]._rhw = 1.0 / (array_73D150[k].vWorldViewPosition.x + 0.0000001000000011686097); } + if ( v8->flags & 2 && v8->uTileBitmapID == pRenderer->field_1036AC_bitmapid ) + { + //v80 = false; + v6 = pRenderer->pHDWaterBitmapIDs[pRenderer->field_1036A8_bitmapid]; + } + else + { + v6 = v8->uTileBitmapID; + //v80 = true; + } + assert(v6 < 1000); // many random crashes here pRenderer->DrawTerrainPolygon(v8, pBitmaps_LOD->pHardwareTextures[v6]); --pOutdoorCamera->numStru148s;