Mercurial > might-and-magic-trilogy
comparison Indoor.cpp @ 59:5159d2e6f559
BLV render
author | Nomad |
---|---|
date | Fri, 26 Oct 2012 02:38:26 +0200 |
parents | 41cbaabde2cb |
children | fdacbc653945 |
comparison
equal
deleted
inserted
replaced
58:41cbaabde2cb | 59:5159d2e6f559 |
---|---|
67 | 67 |
68 | 68 |
69 //----- (0043F39E) -------------------------------------------------------- | 69 //----- (0043F39E) -------------------------------------------------------- |
70 void __fastcall sub_43F39E(IndoorLocation_drawstru *_this) | 70 void __fastcall sub_43F39E(IndoorLocation_drawstru *_this) |
71 { | 71 { |
72 int *v1; // ecx@1 | 72 //int *v1; // ecx@1 |
73 //double v2; // ST30_8@3 | 73 //double v2; // ST30_8@3 |
74 //double v3; // ST30_8@6 | 74 //double v3; // ST30_8@6 |
75 //double v4; // ST28_8@6 | 75 //double v4; // ST28_8@6 |
76 int v5; // eax@4 | 76 int v5; // eax@4 |
77 int v6; // eax@7 | 77 int v6; // eax@7 |
80 unsigned __int16 *v9; // edi@8 | 80 unsigned __int16 *v9; // edi@8 |
81 int i; // [sp+18h] [bp-8h]@7 | 81 int i; // [sp+18h] [bp-8h]@7 |
82 //unsigned __int8 v11; // [sp+1Ch] [bp-4h]@3 | 82 //unsigned __int8 v11; // [sp+1Ch] [bp-4h]@3 |
83 signed int v12; // [sp+1Ch] [bp-4h]@8 | 83 signed int v12; // [sp+1Ch] [bp-4h]@8 |
84 | 84 |
85 pBLVRenderParams->Set(_this); | 85 pBLVRenderParams->Reset(_this); |
86 uNumMobileLightsApplied = 0; | 86 pMobileLightsStack->uNumLightsActive = 0; |
87 //uNumMobileLightsApplied = 0; | |
87 uNumDecorationsDrawnThisFrame = 0; | 88 uNumDecorationsDrawnThisFrame = 0; |
88 _unused000 = 0; | 89 _unused000 = 0; |
89 uNumSpritesDrawnThisFrame = 0; | 90 uNumSpritesDrawnThisFrame = 0; |
90 uNumBillboardsToDraw = 0; | 91 uNumBillboardsToDraw = 0; |
91 if ( !byte_4D864C || !(BYTE1(pGame->uFlags) & 0x10) ) | 92 if ( !byte_4D864C || !(pGame->uFlags & 0x1000) ) |
92 { | 93 { |
93 //v2 = pParty->flt_TorchlightColorB + 6.7553994e15; | 94 //v2 = pParty->flt_TorchlightColorB + 6.7553994e15; |
94 //v11 = LOBYTE(v2); | 95 //v11 = LOBYTE(v2); |
95 if ( (signed __int64)pParty->pPartyBuffs[16].uExpireTime <= 0 ) | 96 if ( (signed __int64)pParty->pPartyBuffs[16].uExpireTime <= 0 ) |
96 v5 = 800; | 97 v5 = 800; |
97 else | 98 else |
98 v5 = 800 * pParty->pPartyBuffs[16].uPower; | 99 v5 = 800 * pParty->pPartyBuffs[16].uPower; |
99 LOBYTE(v1) = byte_4E94D0; | 100 //LOBYTE(v1) = byte_4E94D0; |
100 //v4 = pParty->flt_TorchlightColorR + 6.7553994e15; | 101 //v4 = pParty->flt_TorchlightColorR + 6.7553994e15; |
101 //v3 = pParty->flt_TorchlightColorG + 6.7553994e15; | 102 //v3 = pParty->flt_TorchlightColorG + 6.7553994e15; |
102 pMobileLightsStack->AddLight( | 103 pMobileLightsStack->AddLight( |
103 pBLVRenderParams->vPartyPos.x, | 104 pBLVRenderParams->vPartyPos.x, |
104 pBLVRenderParams->vPartyPos.y, | 105 pBLVRenderParams->vPartyPos.y, |
106 pBLVRenderParams->uPartySectorID, | 107 pBLVRenderParams->uPartySectorID, |
107 v5, | 108 v5, |
108 floorf(pParty->flt_TorchlightColorR + 0.5f), | 109 floorf(pParty->flt_TorchlightColorR + 0.5f), |
109 floorf(pParty->flt_TorchlightColorG + 0.5f), | 110 floorf(pParty->flt_TorchlightColorG + 0.5f), |
110 floorf(pParty->flt_TorchlightColorB + 0.5f), | 111 floorf(pParty->flt_TorchlightColorB + 0.5f), |
111 v1); | 112 byte_4E94D0); |
112 } | 113 } |
113 PrepareWallsRenderList_BLV(); | 114 PrepareWallsRenderList_BLV(); |
114 PrepareItemsRenderList_BLV(); | 115 PrepareItemsRenderList_BLV(); |
115 PrepareActorRenderList_BLV(); | 116 PrepareActorRenderList_BLV(); |
116 v6 = 0; | 117 v6 = 0; |
133 } | 134 } |
134 | 135 |
135 | 136 |
136 | 137 |
137 //----- (004407D9) -------------------------------------------------------- | 138 //----- (004407D9) -------------------------------------------------------- |
138 int BLVRenderParams::Set(IndoorLocation_drawstru *a2) | 139 int BLVRenderParams::Reset(IndoorLocation_drawstru *a2) |
139 { | 140 { |
140 IndoorLocation_drawstru *v2; // ebx@1 | 141 IndoorLocation_drawstru *v2; // ebx@1 |
141 BLVRenderParams *v3; // esi@1 | 142 BLVRenderParams *v3; // esi@1 |
142 int v4; // ST08_4@1 | 143 int v4; // ST08_4@1 |
143 int v5; // ST04_4@1 | 144 int v5; // ST04_4@1 |
251 v3->uViewportW = v2->uViewportW; | 252 v3->uViewportW = v2->uViewportW; |
252 v3->pTargetZBuffer = v2->pTargetZ; | 253 v3->pTargetZBuffer = v2->pTargetZ; |
253 result = 0; | 254 result = 0; |
254 v3->field_8C = 0; | 255 v3->field_8C = 0; |
255 v3->field_84 = 0; | 256 v3->field_84 = 0; |
256 v3->field_80 = 0; | 257 v3->uNumFacesRenderedThisFrame = 0; |
257 v3->field_88 = 0; | 258 v3->field_88 = 0; |
258 pBLVRenderParams->field_90 = 64; | 259 pBLVRenderParams->field_90 = 64; |
259 pBLVRenderParams->field_94 = 6; | 260 pBLVRenderParams->field_94 = 6; |
260 return result; | 261 return result; |
261 } | 262 } |
282 else | 283 else |
283 { | 284 { |
284 v3 = pStru170->field_FA8[v2].std__vector_0007AC; | 285 v3 = pStru170->field_FA8[v2].std__vector_0007AC; |
285 v6 = pStru170->field_FA8[v2].pVertices; | 286 v6 = pStru170->field_FA8[v2].pVertices; |
286 } | 287 } |
287 IndoorLocation::ExecDraw_d3d(pStru170->pFaceIDs[2 * i], v3, 4u, v6); | 288 IndoorLocation::ExecDraw_d3d(pStru170->pFaceIDs[2 * i], v3, 4, v6); |
288 } | 289 } |
289 } | 290 } |
290 else | 291 else |
291 { | 292 { |
292 for (uint j = 0; j < pStru170->uNumFaceIDs; ++j ) | 293 for (uint j = 0; j < pStru170->uNumFaceIDs; ++j ) |
408 this->pFacePlane.vNormal.y = (double)(a2->pFacePlane.vNormal.y & 0xFFFF) * 0.000015259022 | 409 this->pFacePlane.vNormal.y = (double)(a2->pFacePlane.vNormal.y & 0xFFFF) * 0.000015259022 |
409 + (double)(a2->pFacePlane.vNormal.y >> 16); | 410 + (double)(a2->pFacePlane.vNormal.y >> 16); |
410 this->pFacePlane.vNormal.z = (double)(a2->pFacePlane.vNormal.z & 0xFFFF) * 0.000015259022 | 411 this->pFacePlane.vNormal.z = (double)(a2->pFacePlane.vNormal.z & 0xFFFF) * 0.000015259022 |
411 + (double)(a2->pFacePlane.vNormal.z >> 16); | 412 + (double)(a2->pFacePlane.vNormal.z >> 16); |
412 this->pFacePlane.dist = (double)(a2->pFacePlane.dist & 0xFFFF) * 0.000015259022 + (double)(a2->pFacePlane.dist >> 16); | 413 this->pFacePlane.dist = (double)(a2->pFacePlane.dist & 0xFFFF) * 0.000015259022 + (double)(a2->pFacePlane.dist >> 16); |
413 this->uAttributes = a2->uFaceAttributes; | 414 this->uAttributes = a2->uAttributes; |
414 this->pBounding.x1 = a2->pBoundingBox.x1; | 415 this->pBounding.x1 = a2->pBoundingBox.x1; |
415 this->pBounding.y1 = a2->pBoundingBox.y1; | 416 this->pBounding.y1 = a2->pBoundingBox.y1; |
416 this->pBounding.z1 = a2->pBoundingBox.z1; | 417 this->pBounding.z1 = a2->pBoundingBox.z1; |
417 this->pBounding.x2 = a2->pBoundingBox.x2; | 418 this->pBounding.x2 = a2->pBoundingBox.x2; |
418 this->pBounding.y2 = a2->pBoundingBox.y2; | 419 this->pBounding.y2 = a2->pBoundingBox.y2; |
444 //char *v13; // edx@18 | 445 //char *v13; // edx@18 |
445 //int v14; // eax@19 | 446 //int v14; // eax@19 |
446 //unsigned __int8 v15; // sf@19 | 447 //unsigned __int8 v15; // sf@19 |
447 //unsigned __int8 v16; // of@19 | 448 //unsigned __int8 v16; // of@19 |
448 int v17; // ebx@25 | 449 int v17; // ebx@25 |
449 double v18; // st7@27 | 450 //double v18; // st7@27 |
450 double v19; // st6@27 | 451 //double v19; // st6@27 |
451 double v20; // st5@27 | 452 //double v20; // st5@27 |
452 char v21; // dl@27 | 453 //char v21; // dl@27 |
453 unsigned int v22; // eax@44 | 454 unsigned int v22; // eax@44 |
454 unsigned int v23; // eax@35 | 455 unsigned int v23; // eax@35 |
455 DWORD v24; // eax@37 | 456 DWORD v24; // eax@37 |
456 int v25; // eax@38 | 457 int v25; // eax@38 |
457 char *v26; // edi@38 | 458 char *v26; // edi@38 |
480 auto pFace = &pIndoor->pFaces[uFaceID]; | 481 auto pFace = &pIndoor->pFaces[uFaceID]; |
481 if (pFace->uNumVertices < 3) | 482 if (pFace->uNumVertices < 3) |
482 return; | 483 return; |
483 | 484 |
484 | 485 |
485 if ( !(pFace->uAttributes & 0x2000) ) | 486 if (pFace->Invisible()) |
486 { | 487 return; |
487 ++pBLVRenderParams->field_80; | 488 |
488 LOBYTE(pFace->uAttributes) |= 0x80u; | 489 ++pBLVRenderParams->uNumFacesRenderedThisFrame; |
489 v28 = pFace->GetTexture(); | 490 pFace->uAttributes |= 0x80u; |
490 if ( v28 ) | 491 |
491 { | 492 if (!pFace->GetTexture()) |
492 //v10 = pGame->pIndoorCameraD3D; | 493 return; |
493 //v31 = pGame->pIndoorCameraD3D; | 494 |
494 //pStru4 = pGame->pLightmapBuilder; | 495 v28 = pFace->GetTexture(); |
495 if ( !pGame->pIndoorCameraD3D->IsFaceFacedTowardsCamera(pFace) ) | 496 |
496 { | 497 if (!pGame->pIndoorCameraD3D->IsCulled(pFace)) |
497 //v11 = 0; | 498 { |
498 //uNumVerticesa = pFace->uNumVertices; | 499 uNumVerticesa = pFace->uNumVertices; |
499 //v12 = pIndoor->pVertices; | 500 for (uint i = 0; i < pFace->uNumVertices; ++i) |
500 //v13 = (char *)&static_vertices_F7C228[0].vWorldPosition.z; | 501 { |
501 for (uint i = 0; i < pFace->uNumVertices; ++i) | 502 static_vertices_F7C228[i].vWorldPosition.x = pIndoor->pVertices[pFace->pVertexIDs[i]].x; |
502 { | 503 static_vertices_F7C228[i].vWorldPosition.y = pIndoor->pVertices[pFace->pVertexIDs[i]].y; |
503 static_vertices_F7C228[i].vWorldPosition.x = pIndoor->pVertices[pFace->pVertexIDs[i]].x; | 504 static_vertices_F7C228[i].vWorldPosition.z = pIndoor->pVertices[pFace->pVertexIDs[i]].z; |
504 static_vertices_F7C228[i].vWorldPosition.y = pIndoor->pVertices[pFace->pVertexIDs[i]].y; | 505 static_vertices_F7C228[i].u = (signed)pFace->pVertexUIDs[i]; |
505 static_vertices_F7C228[i].vWorldPosition.z = pIndoor->pVertices[pFace->pVertexIDs[i]].z; | 506 static_vertices_F7C228[i].v = (signed)pFace->pVertexUIDs[i]; |
506 static_vertices_F7C228[i].u = pFace->pVertexUIDs[i]; | 507 } |
507 static_vertices_F7C228[i].v = pFace->pVertexUIDs[i]; | |
508 //v14 = v11++; | |
509 //*((float *)v13 - 2) = (double)v12[v9->pVertexIDs[v14]].x; | |
510 //*((float *)v13 - 1) = (double)v12[v9->pVertexIDs[v14]].y; | |
511 //*(float *)v13 = (double)v12[v9->pVertexIDs[v14]].z; | |
512 //v13 += 48; | |
513 //v16 = __OFSUB__(v11, uNumVerticesa); | |
514 //v15 = ((v11 - uNumVerticesa) & 0x80000000u) != 0; | |
515 //*((float *)v13 - 5) = (double)v9->pVertexUIDs[v14]; | |
516 //*((float *)v13 - 4) = (double)v9->pVertexVIDs[v14]; | |
517 //while ( v15 ^ v16 ); | |
518 //v10 = v31; | |
519 } | |
520 if ( !pVertices | 508 if ( !pVertices |
521 || (pGame->pStru9Instance->_498377(a4, 4u, pVertices, static_vertices_F7C228, &uNumVerticesa), uNumVerticesa) ) | 509 || (pGame->pStru9Instance->_498377(a4, 4u, pVertices, static_vertices_F7C228, &uNumVerticesa), uNumVerticesa) ) |
522 { | 510 { |
523 if ( pGame->pIndoorCameraD3D->_437285_prolly_colide_vertices_against_frustrum( | 511 if ( pGame->pIndoorCameraD3D->_437285_prolly_colide_vertices_against_frustrum( |
524 static_vertices_F7C228, | 512 static_vertices_F7C228, |
525 &uNumVerticesa, | 513 &uNumVerticesa, |
526 static_vertices_F7B628, | 514 static_vertices_F7B628, |
527 pGame->pIndoorCameraD3D->std__vector_000034_prolly_frustrum, | 515 pGame->pIndoorCameraD3D->std__vector_000034_prolly_frustrum, |
528 4, | 516 4, |
529 0, | 517 false, |
530 0) != 1 | 518 0) != 1 |
531 || uNumVerticesa ) | 519 || uNumVerticesa ) |
532 { | 520 { |
533 a4a = SHIWORD(stru_F8AD28.field_2C); | 521 a4a = SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel); |
534 v17 = (248 - 8 * SHIWORD(stru_F8AD28.field_2C)) | (((248 - 8 * SHIWORD(stru_F8AD28.field_2C)) | ((248 - 8 * SHIWORD(stru_F8AD28.field_2C)) << 8)) << 8); | 522 v17 = (248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) | (((248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) | ((248 - 8 * SHIWORD(stru_F8AD28.uCurrentAmbientLightLevel)) << 8)) << 8); |
535 sub_4B0E07(uFaceID); | 523 sub_4B0E07(uFaceID); |
536 pGame->pLightmapBuilder->ApplyLights_IndoorFace(uFaceID); | 524 pGame->pLightmapBuilder->ApplyLights_IndoorFace(uFaceID); |
537 pDecalBuilder->ApplyBloodsplatDecals_IndoorFace(uFaceID); | 525 pDecalBuilder->ApplyBloodsplatDecals_IndoorFace(uFaceID); |
538 pGame->pIndoorCameraD3D->_4364C5(static_vertices_F7B628, uNumVerticesa, array_507D30, &stru_F8AD28); | 526 pGame->pIndoorCameraD3D->ViewTransfrom_OffsetUV(static_vertices_F7B628, uNumVerticesa, array_507D30, &stru_F8AD28); |
539 pGame->pIndoorCameraD3D->_436BB7_project_and_stuff(array_507D30, uNumVerticesa, 0); | 527 pGame->pIndoorCameraD3D->Project(array_507D30, uNumVerticesa, 0); |
540 pGame->pLightmapBuilder->std__vector_000004_size = 0; | 528 pGame->pLightmapBuilder->std__vector_000004_size = 0; |
541 if ( stru_F8AD28.field_AC > 0 || pDecalBuilder->uNumDecals > 0 ) | 529 if (stru_F8AD28.uNumLightsApplied > 0 || |
530 pDecalBuilder->uNumDecals > 0) | |
542 { | 531 { |
543 v18 = pFace->pFacePlane.dist; | 532 stru_F7B60C.face_plane.vNormal.x = pFace->pFacePlane.vNormal.x; |
544 v19 = pFace->pFacePlane.vNormal.z; | 533 stru_F7B60C.polygonType = pFace->uPolygonType; |
545 v20 = pFace->pFacePlane.vNormal.y; | 534 stru_F7B60C.face_plane.vNormal.y = pFace->pFacePlane.vNormal.y; |
546 v21 = pFace->uPolygonType; | 535 stru_F7B60C.face_plane.vNormal.z = pFace->pFacePlane.vNormal.z; |
547 stru_F7B60C.vNormal.x = pFace->pFacePlane.vNormal.x; | 536 stru_F7B60C.face_plane.dist = pFace->pFacePlane.dist; |
548 stru_F7B60C.field_14 = v21; | |
549 stru_F7B60C.vNormal.y = v20; | |
550 stru_F7B60C.vNormal.z = v19; | |
551 stru_F7B60C.field_10 = v18; | |
552 } | 537 } |
553 if ( stru_F8AD28.field_AC > 0 && !(BYTE2(pFace->uAttributes) & 0x40) ) | 538 if (stru_F8AD28.uNumLightsApplied > 0 && |
539 !(pFace->uAttributes & 0x400000)) | |
554 pGame->pLightmapBuilder->ApplyLights( | 540 pGame->pLightmapBuilder->ApplyLights( |
555 &stru_F8AD28, | 541 &stru_F8AD28, |
556 &stru_F7B60C, | 542 &stru_F7B60C, |
557 uNumVerticesa, | 543 uNumVerticesa, |
558 array_507D30, | 544 array_507D30, |
559 pVertices, | 545 pVertices, |
560 0); | 546 0); |
561 if ( pDecalBuilder->uNumDecals > 0 ) | 547 |
548 if (pDecalBuilder->uNumDecals > 0) | |
562 pDecalBuilder->ApplyDecals( | 549 pDecalBuilder->ApplyDecals( |
563 a4a, | 550 a4a, |
564 1, | 551 1, |
565 &stru_F7B60C, | 552 &stru_F7B60C, |
566 uNumVerticesa, | 553 uNumVerticesa, |
612 } | 599 } |
613 v23 = pFace->uBitmapID; | 600 v23 = pFace->uBitmapID; |
614 goto LABEL_42; | 601 goto LABEL_42; |
615 } | 602 } |
616 } | 603 } |
617 } | 604 } |
618 } | |
619 } | |
620 } | 605 } |
621 | 606 |
622 //----- (004AFF79) -------------------------------------------------------- | 607 //----- (004AFF79) -------------------------------------------------------- |
623 void IndoorLocation::ExecDraw_sw(unsigned int uFaceID) | 608 void IndoorLocation::ExecDraw_sw(unsigned int uFaceID) |
624 { | 609 { |
775 return; | 760 return; |
776 } | 761 } |
777 if ( !(v3 & 0x10) || (sub_4AD504(uFaceID), pRenderer->pRenderD3D) ) | 762 if ( !(v3 & 0x10) || (sub_4AD504(uFaceID), pRenderer->pRenderD3D) ) |
778 { | 763 { |
779 v4 = v2->GetTexture(); | 764 v4 = v2->GetTexture(); |
780 ++pBLVRenderParams->field_80; | 765 ++pBLVRenderParams->uNumFacesRenderedThisFrame; |
781 v5 = v4; | 766 v5 = v4; |
782 v108 = v4; | 767 v108 = v4; |
783 if ( v4 ) | 768 if ( v4 ) |
784 { | 769 { |
785 v6 = v4->palette_id2; | 770 v6 = v4->palette_id2; |
794 { | 779 { |
795 if ( sub_424829(v7, &stru_F8A590, pBLVRenderParams->field_7C, v1) ) | 780 if ( sub_424829(v7, &stru_F8A590, pBLVRenderParams->field_7C, v1) ) |
796 { | 781 { |
797 if ( v2->uPolygonType == 1 ) | 782 if ( v2->uPolygonType == 1 ) |
798 { | 783 { |
799 for ( i = 0; i < stru_F8AD28.field_AC; stru_F8AD28._blv_lights_ys[v18] = v20 ) | 784 for ( i = 0; i < stru_F8AD28.uNumLightsApplied; stru_F8AD28._blv_lights_ys[v18] = v20 ) |
800 { | 785 { |
801 v18 = i; | 786 v18 = i; |
802 v120 = stru_F8AD28._blv_lights_xs[i]; | 787 v120 = stru_F8AD28._blv_lights_xs[i]; |
803 v134 = (unsigned __int64)(v120 * (signed __int64)-stru_F8AD28.plane_4.vNormal.y) >> 16; | 788 v134 = (unsigned __int64)(v120 * (signed __int64)-stru_F8AD28.plane_4.vNormal.y) >> 16; |
804 v133 = stru_F8AD28.plane_4.vNormal.x; | 789 v133 = stru_F8AD28.plane_4.vNormal.x; |
818 { | 803 { |
819 if ( v2->uPolygonType == 4 ) | 804 if ( v2->uPolygonType == 4 ) |
820 { | 805 { |
821 LABEL_16: | 806 LABEL_16: |
822 a2 = 0; | 807 a2 = 0; |
823 if ( stru_F8AD28.field_AC > 0 ) | 808 if ( stru_F8AD28.uNumLightsApplied > 0 ) |
824 { | 809 { |
825 do | 810 do |
826 { | 811 { |
827 v8 = a2; | 812 v8 = a2; |
828 v9 = stru_F8AD28._blv_lights_xs[a2]; | 813 v9 = stru_F8AD28._blv_lights_xs[a2]; |
855 * (signed __int64)stru_F8AD28.vec_20.z) >> 16); | 840 * (signed __int64)stru_F8AD28.vec_20.z) >> 16); |
856 stru_F8AD28._blv_lights_xs[v8] += v12; | 841 stru_F8AD28._blv_lights_xs[v8] += v12; |
857 stru_F8AD28._blv_lights_ys[v8] += v128; | 842 stru_F8AD28._blv_lights_ys[v8] += v128; |
858 ++a2; | 843 ++a2; |
859 } | 844 } |
860 while ( a2 < stru_F8AD28.field_AC ); | 845 while ( a2 < stru_F8AD28.uNumLightsApplied ); |
861 v2 = v103; | 846 v2 = v103; |
862 } | 847 } |
863 goto LABEL_24; | 848 goto LABEL_24; |
864 } | 849 } |
865 if ( v2->uPolygonType != 5 ) | 850 if ( v2->uPolygonType != 5 ) |
867 if ( v2->uPolygonType != 6 ) | 852 if ( v2->uPolygonType != 6 ) |
868 goto LABEL_24; | 853 goto LABEL_24; |
869 goto LABEL_16; | 854 goto LABEL_16; |
870 } | 855 } |
871 } | 856 } |
872 for ( j = 0; j < stru_F8AD28.field_AC; *(int *)v15 = v16 ) | 857 for ( j = 0; j < stru_F8AD28.uNumLightsApplied; *(int *)v15 = v16 ) |
873 { | 858 { |
874 v14 = v128; | 859 v14 = v128; |
875 stru_F8AD28._blv_lights_xs[j] += v126; | 860 stru_F8AD28._blv_lights_xs[j] += v126; |
876 v15 = 4 * j + 16297672; | 861 v15 = 4 * j + 16297672; |
877 v16 = v14 - stru_F8AD28._blv_lights_ys[j++]; | 862 v16 = v14 - stru_F8AD28._blv_lights_ys[j++]; |
2786 | 2771 |
2787 pGameLoadingUI_ProgressBar->Progress(); | 2772 pGameLoadingUI_ProgressBar->Progress(); |
2788 | 2773 |
2789 for (uint i = 0, j = 0; i < uNumSectors; ++i) | 2774 for (uint i = 0, j = 0; i < uNumSectors; ++i) |
2790 { | 2775 { |
2791 pSectors->pLights = (BLVLightMM7 *)(ptr_0002B8_sector_lrdata + j); | 2776 pSectors->pLights = (unsigned __int16 *)(ptr_0002B8_sector_lrdata + j); |
2792 j += pSectors->uNumLights; | 2777 j += pSectors->uNumLights; |
2793 } | 2778 } |
2794 | 2779 |
2795 pGameLoadingUI_ProgressBar->Progress(); | 2780 pGameLoadingUI_ProgressBar->Progress(); |
2796 | 2781 |
4487 dword_6BE13C_uCurrentlyLoadedLocationID = v39; | 4472 dword_6BE13C_uCurrentlyLoadedLocationID = v39; |
4488 pAllocator->FreeChunk(ptr_6A0D08); | 4473 pAllocator->FreeChunk(ptr_6A0D08); |
4489 ptr_6A0D08 = 0; | 4474 ptr_6A0D08 = 0; |
4490 _6A0D0C_txt_lod_loading = 0; | 4475 _6A0D0C_txt_lod_loading = 0; |
4491 TryLoadLevelFromLOD(); | 4476 TryLoadLevelFromLOD(); |
4492 uNumStationaryLightsApplied = 0; | 4477 pStationaryLightsStack->uNumLightsActive = 0; |
4493 v4 = pIndoor->Load( | 4478 v4 = pIndoor->Load( |
4494 pCurrentMapName, | 4479 pCurrentMapName, |
4495 (unsigned int)(signed __int64)((double)pParty->uTimePlayed * 0.234375) / 60 / 60 / 24 + 1, | 4480 (unsigned int)(signed __int64)((double)pParty->uTimePlayed * 0.234375) / 60 / 60 / 24 + 1, |
4496 v1, | 4481 v1, |
4497 (char *)&pDest) | 4482 (char *)&pDest) |