Mercurial > might-and-magic-trilogy
comparison Indoor.cpp @ 127:9eac46182d8f
Слияние
author | Ritor1 |
---|---|
date | Sun, 04 Nov 2012 09:37:39 +0600 |
parents | 2331a331d36a 6305c1cd9f6e |
children | 7b12505a23c0 |
comparison
equal
deleted
inserted
replaced
126:2331a331d36a | 127:9eac46182d8f |
---|---|
65 }; | 65 }; |
66 | 66 |
67 | 67 |
68 | 68 |
69 //----- (0043F39E) -------------------------------------------------------- | 69 //----- (0043F39E) -------------------------------------------------------- |
70 void __fastcall sub_43F39E(IndoorLocation_drawstru *_this) | 70 void __fastcall PrepareDrawLists_BLV(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 |
91 uNumBillboardsToDraw = 0; | 91 uNumBillboardsToDraw = 0; |
92 if ( !byte_4D864C || !(pGame->uFlags & 0x1000) ) | 92 if ( !byte_4D864C || !(pGame->uFlags & 0x1000) ) |
93 { | 93 { |
94 //v2 = pParty->flt_TorchlightColorB + 6.7553994e15; | 94 //v2 = pParty->flt_TorchlightColorB + 6.7553994e15; |
95 //v11 = LOBYTE(v2); | 95 //v11 = LOBYTE(v2); |
96 if ( (signed __int64)pParty->pPartyBuffs[16].uExpireTime <= 0 ) | 96 v5 = 800; |
97 v5 = 800; | 97 if (pParty->TorchlightActive()) |
98 else | 98 v5 *= pParty->pPartyBuffs[16].uPower; |
99 v5 = 800 * pParty->pPartyBuffs[16].uPower; | |
100 //LOBYTE(v1) = byte_4E94D0; | 99 //LOBYTE(v1) = byte_4E94D0; |
101 //v4 = pParty->flt_TorchlightColorR + 6.7553994e15; | 100 //v4 = pParty->flt_TorchlightColorR + 6.7553994e15; |
102 //v3 = pParty->flt_TorchlightColorG + 6.7553994e15; | 101 //v3 = pParty->flt_TorchlightColorG + 6.7553994e15; |
103 pMobileLightsStack->AddLight( | 102 pMobileLightsStack->AddLight( |
104 pBLVRenderParams->vPartyPos.x, | 103 pBLVRenderParams->vPartyPos.x, |
308 unsigned int v4; // edx@9 | 307 unsigned int v4; // edx@9 |
309 char *v5; // eax@10 | 308 char *v5; // eax@10 |
310 signed int v6; // [sp+8h] [bp-8h]@7 | 309 signed int v6; // [sp+8h] [bp-8h]@7 |
311 int v7; // [sp+Ch] [bp-4h]@8 | 310 int v7; // [sp+Ch] [bp-4h]@8 |
312 | 311 |
313 sub_43F39E(_this); | 312 PrepareDrawLists_BLV(_this); |
314 if (pBLVRenderParams->uPartySectorID) | 313 if (pBLVRenderParams->uPartySectorID) |
315 IndoorLocation::ExecDraw(pRenderer->pRenderD3D != 0); | 314 IndoorLocation::ExecDraw(pRenderer->pRenderD3D != 0); |
316 pRenderer->DrawBillboardList_BLV(); | 315 pRenderer->DrawBillboardList_BLV(); |
317 if ( !pRenderer->pRenderD3D ) | 316 if ( !pRenderer->pRenderD3D ) |
318 { | 317 { |
323 v1 = pBLVRenderParams->pRenderTarget; | 322 v1 = pBLVRenderParams->pRenderTarget; |
324 v6 = 0; | 323 v6 = 0; |
325 if ( (signed int)pStru170->std__vector_000FA8 > 0 ) | 324 if ( (signed int)pStru170->std__vector_000FA8 > 0 ) |
326 { | 325 { |
327 v7 = 0; | 326 v7 = 0; |
328 v2 = (char *)&pStru170->field_FA8[0].field_C.field_4; | 327 v2 = (char *)&pStru170->field_FA8[0].field_C._viewport_space_w; |
329 do | 328 do |
330 { | 329 { |
331 v3 = *((int *)v2 - 1); | 330 v3 = *((int *)v2 - 1); |
332 v4 = pRenderer->uTargetSurfacePitch * *((int *)v2 - 1); | 331 v4 = pRenderer->uTargetSurfacePitch * *((int *)v2 - 1); |
333 if ( v3 <= *(int *)v2 ) | 332 if ( v3 <= *(int *)v2 ) |
871 v99 = v5->pLevelOfDetail2; | 870 v99 = v5->pLevelOfDetail2; |
872 v22 = v5->pLevelOfDetail3; | 871 v22 = v5->pLevelOfDetail3; |
873 v23 = 640 * stru_F8A590._viewport_space_y; | 872 v23 = 640 * stru_F8A590._viewport_space_y; |
874 v119 = 640 * stru_F8A590._viewport_space_y; | 873 v119 = 640 * stru_F8A590._viewport_space_y; |
875 v100 = v22; | 874 v100 = v22; |
876 if ( stru_F8A590._viewport_space_y <= stru_F8A590.field_4 ) | 875 if ( stru_F8A590._viewport_space_y <= stru_F8A590._viewport_space_w ) |
877 { | 876 { |
878 v24 = 2 * stru_F8A590._viewport_space_y; | 877 v24 = 2 * stru_F8A590._viewport_space_y; |
879 v120 = 2 * stru_F8A590._viewport_space_y; | 878 v120 = 2 * stru_F8A590._viewport_space_y; |
880 while ( 1 ) | 879 while ( 1 ) |
881 { | 880 { |
1195 v110 += v111; | 1194 v110 += v111; |
1196 v23 += 640; | 1195 v23 += 640; |
1197 v24 += 2; | 1196 v24 += 2; |
1198 v120 = v24; | 1197 v120 = v24; |
1199 v119 = v23; | 1198 v119 = v23; |
1200 if ( a2 > stru_F8A590.field_4 ) | 1199 if ( a2 > stru_F8A590._viewport_space_w ) |
1201 break; | 1200 break; |
1202 v21 = a2; | 1201 v21 = a2; |
1203 } | 1202 } |
1204 } | 1203 } |
1205 return; | 1204 return; |
1644 { | 1643 { |
1645 if ( sub_424829(v3, &stru_F8A590, pBLVRenderParams->field_7C, v1) ) | 1644 if ( sub_424829(v3, &stru_F8A590, pBLVRenderParams->field_7C, v1) ) |
1646 { | 1645 { |
1647 v4 = stru_F8A590._viewport_space_y; | 1646 v4 = stru_F8A590._viewport_space_y; |
1648 v5 = pBLVRenderParams->pRenderTarget; | 1647 v5 = pBLVRenderParams->pRenderTarget; |
1649 if ( stru_F8A590._viewport_space_y <= stru_F8A590.field_4 ) | 1648 if ( stru_F8A590._viewport_space_y <= stru_F8A590._viewport_space_w ) |
1650 { | 1649 { |
1651 v6 = 640 * stru_F8A590._viewport_space_y; | 1650 v6 = 640 * stru_F8A590._viewport_space_y; |
1652 do | 1651 do |
1653 { | 1652 { |
1654 v5[v6 + stru_F8A590.array_18[v4]] = -1; | 1653 v5[v6 + stru_F8A590.array_18[v4]] = -1; |
1655 v7 = v6 + stru_F8A590.array_3D8[v4]; | 1654 v7 = v6 + stru_F8A590.array_3D8[v4]; |
1656 v6 += 640; | 1655 v6 += 640; |
1657 v5[v7] = -1; | 1656 v5[v7] = -1; |
1658 ++v4; | 1657 ++v4; |
1659 } | 1658 } |
1660 while ( v4 <= stru_F8A590.field_4 ); | 1659 while ( v4 <= stru_F8A590._viewport_space_w ); |
1661 } | 1660 } |
1662 } | 1661 } |
1663 } | 1662 } |
1664 } | 1663 } |
1665 } | 1664 } |
2025 //signed int Argsm; // [sp+670h] [bp+8h]@161 | 2024 //signed int Argsm; // [sp+670h] [bp+8h]@161 |
2026 //signed int Argsn; // [sp+670h] [bp+8h]@175 | 2025 //signed int Argsn; // [sp+670h] [bp+8h]@175 |
2027 | 2026 |
2028 //v5 = 0; | 2027 //v5 = 0; |
2029 //v6 = this; | 2028 //v6 = this; |
2030 pNumSoundDecorations = 0; | 2029 _6807E0_num_decorations_with_sounds_6807B8 = 0; |
2031 | 2030 |
2032 #pragma region "loading from txt" | 2031 #pragma region "loading from txt" |
2033 /*sprintf(FileName, "levels\\%s", pFilename); | 2032 /*sprintf(FileName, "levels\\%s", pFilename); |
2034 if ( GetFileAttributesA(FileName) != -1 ) | 2033 if ( GetFileAttributesA(FileName) != -1 ) |
2035 { | 2034 { |
4609 auto pDecortaion = pLevelDecorations + i; | 4608 auto pDecortaion = pLevelDecorations + i; |
4610 | 4609 |
4611 pDecorationList->InitializeDecorationSprite(pDecortaion->uDecorationDescID); | 4610 pDecorationList->InitializeDecorationSprite(pDecortaion->uDecorationDescID); |
4612 | 4611 |
4613 v15 = pDecorationList->pDecorations[pDecortaion->uDecorationDescID].uSoundID; | 4612 v15 = pDecorationList->pDecorations[pDecortaion->uDecorationDescID].uSoundID; |
4614 if (v15 && pNumSoundDecorations < 9) | 4613 if (v15 && _6807E0_num_decorations_with_sounds_6807B8 < 9) |
4615 { | 4614 { |
4616 pSoundList->_4A9A67(v15, 0); | 4615 pSoundList->_4A9A67(v15, 0); |
4617 v16 = pNumSoundDecorations++; | 4616 v16 = _6807E0_num_decorations_with_sounds_6807B8++; |
4618 _6807B8_level_decorations_ids[v16] = i; | 4617 _6807B8_level_decorations_ids[v16] = i; |
4619 } | 4618 } |
4620 | 4619 |
4621 if ( !(pDecortaion->field_2 & 0x20) ) | 4620 if ( !(pDecortaion->field_2 & 0x20) ) |
4622 { | 4621 { |