comparison Indoor.cpp @ 724:737d7fec67f0

Слияние
author Ritor1
date Thu, 21 Mar 2013 16:09:59 +0600
parents 256211e8243a 436ae1842e92
children 9d13d2ec35a6
comparison
equal deleted inserted replaced
723:256211e8243a 724:737d7fec67f0
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