diff Indoor.cpp @ 724:737d7fec67f0

Слияние
author Ritor1
date Thu, 21 Mar 2013 16:09:59 +0600
parents 256211e8243a 436ae1842e92
children 9d13d2ec35a6
line wrap: on
line diff
--- a/Indoor.cpp	Thu Mar 21 16:09:44 2013 +0600
+++ b/Indoor.cpp	Thu Mar 21 16:09:59 2013 +0600
@@ -75,13 +75,13 @@
   //double v3; // ST30_8@6
   //double v4; // ST28_8@6
   int v5; // eax@4
-  int v6; // eax@7
+  //int v6; // eax@7
   unsigned int v7; // ebx@8
   BLVSector *v8; // esi@8
-  unsigned __int16 *v9; // edi@8
-  int i; // [sp+18h] [bp-8h]@7
+  //unsigned __int16 *v9; // edi@8
+  //int i; // [sp+18h] [bp-8h]@7
   //unsigned __int8 v11; // [sp+1Ch] [bp-4h]@3
-  signed int v12; // [sp+1Ch] [bp-4h]@8
+  //signed int v12; // [sp+1Ch] [bp-4h]@8
 
   pBLVRenderParams->Reset(_this);
   pMobileLightsStack->uNumLightsActive = 0;
@@ -90,44 +90,47 @@
   _unused000 = 0;
   uNumSpritesDrawnThisFrame = 0;
   uNumBillboardsToDraw = 0;
-  if ( !byte_4D864C || !(pGame->uFlags & 0x1000) )
+
+  if ( !byte_4D864C || !(pGame->uFlags & 0x1000) )  // lightspot around party
   {
     //v2 = pParty->flt_TorchlightColorB + 6.7553994e15;
     //v11 = LOBYTE(v2);
     v5 = 800;
     if (pParty->TorchlightActive())
-      v5 *= pParty->pPartyBuffs[16].uPower;
+      v5 *= pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uPower;
     //LOBYTE(v1) = byte_4E94D0;
     //v4 = pParty->flt_TorchlightColorR + 6.7553994e15;
     //v3 = pParty->flt_TorchlightColorG + 6.7553994e15;
-    pMobileLightsStack->AddLight(
-      pBLVRenderParams->vPartyPos.x,
-      pBLVRenderParams->vPartyPos.y,
-      pBLVRenderParams->vPartyPos.z,
-      pBLVRenderParams->uPartySectorID,
-      v5,
-      floorf(pParty->flt_TorchlightColorR + 0.5f),
-      floorf(pParty->flt_TorchlightColorG + 0.5f),
-      floorf(pParty->flt_TorchlightColorB + 0.5f),
-      byte_4E94D0);
+    pMobileLightsStack->AddLight(pBLVRenderParams->vPartyPos.x,
+                                 pBLVRenderParams->vPartyPos.y,
+                                 pBLVRenderParams->vPartyPos.z,
+                                 pBLVRenderParams->uPartySectorID,
+                                 v5,
+                                 floorf(pParty->flt_TorchlightColorR + 0.5f),
+                                 floorf(pParty->flt_TorchlightColorG + 0.5f),
+                                 floorf(pParty->flt_TorchlightColorB + 0.5f),
+                                 byte_4E94D0);
   }
   PrepareBspRenderList_BLV();
   PrepareItemsRenderList_BLV();
   PrepareActorRenderList_BLV();
-  v6 = 0;
-  for ( i = 0; i < pBspRenderer->uNumVisibleNotEmptySectors; ++i )
+
+  //v6 = 0;
+  for (uint i = 0; i < pBspRenderer->uNumVisibleNotEmptySectors; ++i)
   {
-    v7 = pBspRenderer->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v6];
-    v12 = 0;
-    v8 = &pIndoor->pSectors[pBspRenderer->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v6]];
-    v9 = v8->pDecorationIDs;
-    if ( v8->uNumDecorations > 0 )
+    v7 = pBspRenderer->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[i];
+    //v12 = 0;
+    v8 = &pIndoor->pSectors[pBspRenderer->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[i]];
+    //v9 = v8->pDecorationIDs;
+
+    for (uint j = 0; j < v8->uNumDecorations; ++j)
+    //if ( v8->uNumDecorations > 0 )
     {
-      do
-        PrepareDecorationsRenderList_BLV(v9[v12++], v7);
-      while ( v12 < v8->uNumDecorations );
+    //  do
+      PrepareDecorationsRenderList_BLV(v8->pDecorationIDs[j], v7);
+    //  while ( v12 < v8->uNumDecorations );
     }
-    v6 = i + 1;
+    //v6 = i + 1;
   }
   FindBillboardsLightLevels_BLV();
   pGame->PrepareBloodsplats();