Mercurial > mm7
comparison Indoor.cpp @ 831:9c3f28b31b4a
Party actions in blv
author | Nomad |
---|---|
date | Wed, 27 Mar 2013 15:04:59 +0200 |
parents | 08d90b633131 |
children | dfd683c4f538 |
comparison
equal
deleted
inserted
replaced
830:08d90b633131 | 831:9c3f28b31b4a |
---|---|
26 #include "GUIWindow.h" | 26 #include "GUIWindow.h" |
27 #include "GUIButton.h" | 27 #include "GUIButton.h" |
28 #include "GUIFont.h" | 28 #include "GUIFont.h" |
29 | 29 |
30 #include "mm7_data.h" | 30 #include "mm7_data.h" |
31 #include "MM7.h" | |
31 | 32 |
32 | 33 |
33 | 34 |
34 | 35 |
35 | 36 |
531 pGame->pLightmapBuilder->ApplyLights(&stru_F8AD28, &stru_F7B60C, uNumVerticesa, array_507D30, pVertices, 0); | 532 pGame->pLightmapBuilder->ApplyLights(&stru_F8AD28, &stru_F7B60C, uNumVerticesa, array_507D30, pVertices, 0); |
532 | 533 |
533 if (pDecalBuilder->uNumDecals > 0) | 534 if (pDecalBuilder->uNumDecals > 0) |
534 pDecalBuilder->ApplyDecals(a4a, 1, &stru_F7B60C, uNumVerticesa, array_507D30, pVertices, 0, pFace->uSectorID); | 535 pDecalBuilder->ApplyDecals(a4a, 1, &stru_F7B60C, uNumVerticesa, array_507D30, pVertices, 0, pFace->uSectorID); |
535 | 536 |
536 if (pFace->Fluid() && | |
537 pFace->uBitmapID == pRenderer->hd_water_tile_id ) | |
538 { | |
539 v23 = pRenderer->pHDWaterBitmapIDs[pRenderer->hd_water_current_frame]; | |
540 v27 = pBitmaps_LOD->pHardwareTextures[v23]; | |
541 if (pFace->uAttributes & FACE_DO_NOT_LIGHT) | |
542 _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); | |
543 else | |
544 pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | OBJECT_BModel, v17, 0); | |
545 return; | |
546 } | |
547 if (pFace->Fluid()) | 537 if (pFace->Fluid()) |
548 { | 538 { |
549 //auto v24 = GetTickCount() / 4; | 539 if (pFace->uBitmapID == pRenderer->hd_water_tile_id) |
550 //auto v25 = v24 - stru_5C6E00->uIntegerHalfPi; | 540 { |
551 uint eightSeconds = GetTickCount() % 8000; | 541 v23 = pRenderer->pHDWaterBitmapIDs[pRenderer->hd_water_current_frame]; |
552 float angle = (eightSeconds / 8000.0f) * 2 * 3.1415f; | 542 v27 = pBitmaps_LOD->pHardwareTextures[v23]; |
553 | 543 } |
554 //animte lava back and forth | |
555 for (uint i = 0; i < uNumVerticesa; ++i) | |
556 //array_507D30[i].v += (double)(pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 & (unsigned int)(stru_5C6E00->SinCos(v25) >> 8)); | |
557 array_507D30[i].v += pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 * cosf(angle); | |
558 v23 = pFace->uBitmapID; | |
559 v27 = pBitmaps_LOD->pHardwareTextures[v23]; | |
560 if (pFace->uAttributes & FACE_DO_NOT_LIGHT) | |
561 _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); | |
562 else | 544 else |
563 pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | OBJECT_BModel, v17, 0); | 545 { |
564 return; | 546 //auto v24 = GetTickCount() / 4; |
547 //auto v25 = v24 - stru_5C6E00->uIntegerHalfPi; | |
548 uint eightSeconds = GetTickCount() % 8000; | |
549 float angle = (eightSeconds / 8000.0f) * 2 * 3.1415f; | |
550 | |
551 //animte lava back and forth | |
552 for (uint i = 0; i < uNumVerticesa; ++i) | |
553 //array_507D30[i].v += (double)(pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 & (unsigned int)(stru_5C6E00->SinCos(v25) >> 8)); | |
554 array_507D30[i].v += pBitmaps_LOD->pTextures[pFace->uBitmapID].uHeightMinus1 * cosf(angle); | |
555 v23 = pFace->uBitmapID; | |
556 v27 = pBitmaps_LOD->pHardwareTextures[v23]; | |
557 } | |
565 } | 558 } |
566 else if (pFace->uAttributes & 0x4000) | 559 else if (pFace->uAttributes & 0x4000) |
567 { | 560 { |
568 v23 = pTextureFrameTable->GetFrameTexture(pFace->uBitmapID, pBLVRenderParams->field_0_timer_); | 561 v23 = pTextureFrameTable->GetFrameTexture(pFace->uBitmapID, pBLVRenderParams->field_0_timer_); |
569 v27 = pBitmaps_LOD->pHardwareTextures[v23]; | 562 v27 = pBitmaps_LOD->pHardwareTextures[v23]; |
570 if (pFace->uAttributes & FACE_DO_NOT_LIGHT) | |
571 _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); | |
572 else | |
573 pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | OBJECT_BModel, v17, 0); | |
574 return; | |
575 } | 563 } |
576 v17 = 0xFFFFFFFF; | 564 else |
577 v23 = pFace->uBitmapID; | 565 { |
578 v27 = pBitmaps_LOD->pHardwareTextures[v23]; | 566 v17 = 0xFFD0D0D0; |
567 v23 = pFace->uBitmapID; | |
568 v27 = pBitmaps_LOD->pHardwareTextures[v23]; | |
569 } | |
570 | |
579 if (pFace->uAttributes & FACE_DO_NOT_LIGHT) | 571 if (pFace->uAttributes & FACE_DO_NOT_LIGHT) |
580 _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); | 572 _479A53_draw_some_blv_poly(uNumVerticesa, uFaceID); |
581 else | 573 else |
582 pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, 8 * uFaceID | OBJECT_BModel, v17, 0); | 574 pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, PID(OBJECT_BModel, uFaceID), v17, 0); |
583 return;; | 575 return; |
584 } | 576 } |
585 } | 577 } |
586 } | 578 } |
587 } | 579 } |
588 | 580 |