Mercurial > mm7
diff Indoor.cpp @ 831:9c3f28b31b4a
Party actions in blv
author | Nomad |
---|---|
date | Wed, 27 Mar 2013 15:04:59 +0200 |
parents | 08d90b633131 |
children | dfd683c4f538 |
line wrap: on
line diff
--- a/Indoor.cpp Wed Mar 27 11:59:37 2013 +0200 +++ b/Indoor.cpp Wed Mar 27 15:04:59 2013 +0200 @@ -28,6 +28,7 @@ #include "GUIFont.h" #include "mm7_data.h" +#include "MM7.h" @@ -533,54 +534,45 @@ if (pDecalBuilder->uNumDecals > 0) pDecalBuilder->ApplyDecals(a4a, 1, &stru_F7B60C, uNumVerticesa, array_507D30, pVertices, 0, pFace->uSectorID); - if (pFace->Fluid() && - pFace->uBitmapID == pRenderer->hd_water_tile_id ) - { - v23 = pRenderer->pHDWaterBitmapIDs[pRenderer->hd_water_current_frame]; - v27 = pBitmaps_LOD->pHardwareTextures[v23]; - if (pFace->uAttributes & FACE_DO_NOT_LIGHT) - _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); - else - pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | OBJECT_BModel, v17, 0); - return; - } if (pFace->Fluid()) { - //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 += pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 * cosf(angle); - v23 = pFace->uBitmapID; - v27 = pBitmaps_LOD->pHardwareTextures[v23]; - if (pFace->uAttributes & FACE_DO_NOT_LIGHT) - _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); + if (pFace->uBitmapID == pRenderer->hd_water_tile_id) + { + v23 = pRenderer->pHDWaterBitmapIDs[pRenderer->hd_water_current_frame]; + v27 = pBitmaps_LOD->pHardwareTextures[v23]; + } else - pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | OBJECT_BModel, v17, 0); - return; + { + //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 += pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 * cosf(angle); + v23 = pFace->uBitmapID; + v27 = pBitmaps_LOD->pHardwareTextures[v23]; + } } else if (pFace->uAttributes & 0x4000) { v23 = pTextureFrameTable->GetFrameTexture(pFace->uBitmapID, pBLVRenderParams->field_0_timer_); v27 = pBitmaps_LOD->pHardwareTextures[v23]; - if (pFace->uAttributes & FACE_DO_NOT_LIGHT) - _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); - else - pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | OBJECT_BModel, v17, 0); - return; } - v17 = 0xFFFFFFFF; - v23 = pFace->uBitmapID; - v27 = pBitmaps_LOD->pHardwareTextures[v23]; + else + { + v17 = 0xFFD0D0D0; + v23 = pFace->uBitmapID; + v27 = pBitmaps_LOD->pHardwareTextures[v23]; + } + if (pFace->uAttributes & FACE_DO_NOT_LIGHT) _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); else - pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | OBJECT_BModel, v17, 0); - return;; + pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, PID(OBJECT_BModel, uFaceID), v17, 0); + return; } } }