Mercurial > mm7
comparison Indoor.cpp @ 707:436ae1842e92
Decorations in blv
author | Nomad |
---|---|
date | Thu, 21 Mar 2013 10:21:46 +0200 |
parents | 066e2b29b30f |
children | 735dab8d3c9a a5e587c8e30e 737d7fec67f0 |
comparison
equal
deleted
inserted
replaced
706:d6236f6a9882 | 707:436ae1842e92 |
---|---|
73 //int *v1; // ecx@1 | 73 //int *v1; // ecx@1 |
74 //double v2; // ST30_8@3 | 74 //double v2; // ST30_8@3 |
75 //double v3; // ST30_8@6 | 75 //double v3; // ST30_8@6 |
76 //double v4; // ST28_8@6 | 76 //double v4; // ST28_8@6 |
77 int v5; // eax@4 | 77 int v5; // eax@4 |
78 int v6; // eax@7 | 78 //int v6; // eax@7 |
79 unsigned int v7; // ebx@8 | 79 unsigned int v7; // ebx@8 |
80 BLVSector *v8; // esi@8 | 80 BLVSector *v8; // esi@8 |
81 unsigned __int16 *v9; // edi@8 | 81 //unsigned __int16 *v9; // edi@8 |
82 int i; // [sp+18h] [bp-8h]@7 | 82 //int i; // [sp+18h] [bp-8h]@7 |
83 //unsigned __int8 v11; // [sp+1Ch] [bp-4h]@3 | 83 //unsigned __int8 v11; // [sp+1Ch] [bp-4h]@3 |
84 signed int v12; // [sp+1Ch] [bp-4h]@8 | 84 //signed int v12; // [sp+1Ch] [bp-4h]@8 |
85 | 85 |
86 pBLVRenderParams->Reset(_this); | 86 pBLVRenderParams->Reset(_this); |
87 pMobileLightsStack->uNumLightsActive = 0; | 87 pMobileLightsStack->uNumLightsActive = 0; |
88 //uNumMobileLightsApplied = 0; | 88 //uNumMobileLightsApplied = 0; |
89 uNumDecorationsDrawnThisFrame = 0; | 89 uNumDecorationsDrawnThisFrame = 0; |
90 _unused000 = 0; | 90 _unused000 = 0; |
91 uNumSpritesDrawnThisFrame = 0; | 91 uNumSpritesDrawnThisFrame = 0; |
92 uNumBillboardsToDraw = 0; | 92 uNumBillboardsToDraw = 0; |
93 if ( !byte_4D864C || !(pGame->uFlags & 0x1000) ) | 93 |
94 if ( !byte_4D864C || !(pGame->uFlags & 0x1000) ) // lightspot around party | |
94 { | 95 { |
95 //v2 = pParty->flt_TorchlightColorB + 6.7553994e15; | 96 //v2 = pParty->flt_TorchlightColorB + 6.7553994e15; |
96 //v11 = LOBYTE(v2); | 97 //v11 = LOBYTE(v2); |
97 v5 = 800; | 98 v5 = 800; |
98 if (pParty->TorchlightActive()) | 99 if (pParty->TorchlightActive()) |
99 v5 *= pParty->pPartyBuffs[16].uPower; | 100 v5 *= pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uPower; |
100 //LOBYTE(v1) = byte_4E94D0; | 101 //LOBYTE(v1) = byte_4E94D0; |
101 //v4 = pParty->flt_TorchlightColorR + 6.7553994e15; | 102 //v4 = pParty->flt_TorchlightColorR + 6.7553994e15; |
102 //v3 = pParty->flt_TorchlightColorG + 6.7553994e15; | 103 //v3 = pParty->flt_TorchlightColorG + 6.7553994e15; |
103 pMobileLightsStack->AddLight( | 104 pMobileLightsStack->AddLight(pBLVRenderParams->vPartyPos.x, |
104 pBLVRenderParams->vPartyPos.x, | 105 pBLVRenderParams->vPartyPos.y, |
105 pBLVRenderParams->vPartyPos.y, | 106 pBLVRenderParams->vPartyPos.z, |
106 pBLVRenderParams->vPartyPos.z, | 107 pBLVRenderParams->uPartySectorID, |
107 pBLVRenderParams->uPartySectorID, | 108 v5, |
108 v5, | 109 floorf(pParty->flt_TorchlightColorR + 0.5f), |
109 floorf(pParty->flt_TorchlightColorR + 0.5f), | 110 floorf(pParty->flt_TorchlightColorG + 0.5f), |
110 floorf(pParty->flt_TorchlightColorG + 0.5f), | 111 floorf(pParty->flt_TorchlightColorB + 0.5f), |
111 floorf(pParty->flt_TorchlightColorB + 0.5f), | 112 byte_4E94D0); |
112 byte_4E94D0); | |
113 } | 113 } |
114 PrepareBspRenderList_BLV(); | 114 PrepareBspRenderList_BLV(); |
115 PrepareItemsRenderList_BLV(); | 115 PrepareItemsRenderList_BLV(); |
116 PrepareActorRenderList_BLV(); | 116 PrepareActorRenderList_BLV(); |
117 v6 = 0; | 117 |
118 for ( i = 0; i < pBspRenderer->uNumVisibleNotEmptySectors; ++i ) | 118 //v6 = 0; |
119 { | 119 for (uint i = 0; i < pBspRenderer->uNumVisibleNotEmptySectors; ++i) |
120 v7 = pBspRenderer->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v6]; | 120 { |
121 v12 = 0; | 121 v7 = pBspRenderer->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[i]; |
122 v8 = &pIndoor->pSectors[pBspRenderer->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v6]]; | 122 //v12 = 0; |
123 v9 = v8->pDecorationIDs; | 123 v8 = &pIndoor->pSectors[pBspRenderer->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[i]]; |
124 if ( v8->uNumDecorations > 0 ) | 124 //v9 = v8->pDecorationIDs; |
125 | |
126 for (uint j = 0; j < v8->uNumDecorations; ++j) | |
127 //if ( v8->uNumDecorations > 0 ) | |
125 { | 128 { |
126 do | 129 // do |
127 PrepareDecorationsRenderList_BLV(v9[v12++], v7); | 130 PrepareDecorationsRenderList_BLV(v8->pDecorationIDs[j], v7); |
128 while ( v12 < v8->uNumDecorations ); | 131 // while ( v12 < v8->uNumDecorations ); |
129 } | 132 } |
130 v6 = i + 1; | 133 //v6 = i + 1; |
131 } | 134 } |
132 FindBillboardsLightLevels_BLV(); | 135 FindBillboardsLightLevels_BLV(); |
133 pGame->PrepareBloodsplats(); | 136 pGame->PrepareBloodsplats(); |
134 } | 137 } |
135 | 138 |