diff Indoor.cpp @ 116:918dca162239

stru170 -> BspRenderer
author Nomad
date Thu, 08 Nov 2012 04:57:39 +0200
parents 8be5293b6b33
children b07ebaa9a30d
line wrap: on
line diff
--- a/Indoor.cpp	Wed Nov 07 20:42:12 2012 +0200
+++ b/Indoor.cpp	Thu Nov 08 04:57:39 2012 +0200
@@ -47,8 +47,8 @@
 stru320 stru_F8AD28; // idb
 stru337 stru_F81018;
 stru167_wrap array_5118E8;
-stru170_stru2 stru_F8A590;
-stru170 *pStru170 = new stru170; // idb
+BspRenderer_stru2 stru_F8A590;
+BspRenderer *pBspRenderer = new BspRenderer; // idb
 stru141 stru_721530;
 stru352 stru_F83B80[480];
 
@@ -110,15 +110,15 @@
       floorf(pParty->flt_TorchlightColorB + 0.5f),
       byte_4E94D0);
   }
-  PrepareWallsRenderList_BLV();
+  PrepareBspRenderList_BLV();
   PrepareItemsRenderList_BLV();
   PrepareActorRenderList_BLV();
   v6 = 0;
-  for ( i = 0; i < pStru170->uNumVisibleNotEmptySectors; ++i )
+  for ( i = 0; i < pBspRenderer->uNumVisibleNotEmptySectors; ++i )
   {
-    v7 = pStru170->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v6];
+    v7 = pBspRenderer->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v6];
     v12 = 0;
-    v8 = &pIndoor->pSectors[pStru170->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v6]];
+    v8 = &pIndoor->pSectors[pBspRenderer->pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v6]];
     v9 = v8->pDecorationIDs;
     if ( v8->uNumDecorations > 0 )
     {
@@ -271,28 +271,28 @@
   if (bD3D)
   {
     pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
-    for (uint i = 0; i < pStru170->uNumFaceIDs; ++i)
+    for (uint i = 0; i < pBspRenderer->uNumFaceIDs; ++i)
     {
-      v2 = pStru170->pFaceIDs[2 * i + 1];
-      if ( pStru170->field_FA8[v2].std__vector_0007A8 == -1 )
+      v2 = pBspRenderer->pFaceIDs[2 * i + 1];
+      if ( pBspRenderer->field_FA8[v2].std__vector_0007A8 == -1 )
       {
         v6 = 0;
         v3 = 0;
       }
       else
       {
-        v3 = pStru170->field_FA8[v2].std__vector_0007AC;
-        v6 = pStru170->field_FA8[v2].pVertices;
+        v3 = pBspRenderer->field_FA8[v2].std__vector_0007AC;
+        v6 = pBspRenderer->field_FA8[v2].pVertices;
       }
-      IndoorLocation::ExecDraw_d3d(pStru170->pFaceIDs[2 * i], v3, 4, v6);
+      IndoorLocation::ExecDraw_d3d(pBspRenderer->pFaceIDs[2 * i], v3, 4, v6);
     }
   }
   else
   {
-    for (uint j = 0; j < pStru170->uNumFaceIDs; ++j )
+    for (uint j = 0; j < pBspRenderer->uNumFaceIDs; ++j )
     {
-      v5 = pStru170->pFaceIDs[2 * j];
-      pBLVRenderParams->field_7C = &pStru170->field_FA8[pStru170->pFaceIDs[2 * j + 1]].field_C;
+      v5 = pBspRenderer->pFaceIDs[2 * j];
+      pBLVRenderParams->field_7C = &pBspRenderer->field_FA8[pBspRenderer->pFaceIDs[2 * j + 1]].field_C;
       IndoorLocation::ExecDraw_sw(v5);
     }
   }
@@ -321,17 +321,17 @@
     {
       v1 = pBLVRenderParams->pRenderTarget;
       v6 = 0;
-      if ( (signed int)pStru170->std__vector_000FA8 > 0 )
+      if ( (signed int)pBspRenderer->std__vector_000FA8 > 0 )
       {
         v7 = 0;
-        v2 = (char *)&pStru170->field_FA8[0].field_C._viewport_space_w;
+        v2 = (char *)&pBspRenderer->field_FA8[0].field_C._viewport_space_w;
         do
         {
           v3 = *((int *)v2 - 1);
           v4 = pRenderer->uTargetSurfacePitch * *((int *)v2 - 1);
           if ( v3 <= *(int *)v2 )
           {
-            v5 = (char *)&pStru170->field_FA8[0].field_C.array_3D8[v3 + v7];
+            v5 = (char *)&pBspRenderer->field_FA8[0].field_C.array_3D8[v3 + v7];
             do
             {
               v1[v4 + *((short *)v5 - 480)] = 255;
@@ -346,7 +346,7 @@
           v7 += 1126;
           v2 += 2252;
         }
-        while ( v6 < (signed int)pStru170->std__vector_000FA8 );
+        while ( v6 < (signed int)pBspRenderer->std__vector_000FA8 );
       }
     }
   }
@@ -1259,7 +1259,7 @@
 
 
 //----- (004B0EA8) --------------------------------------------------------
-void stru170::PrepareFaceRenderList_d3d(int a2, unsigned int uFaceID)
+void BspRenderer::PrepareFaceRenderList_d3d(int a2, unsigned int uFaceID)
 {
   //unsigned int v3; // edx@1
   //stru170 *v4; // ebx@1
@@ -1477,9 +1477,9 @@
 
 
 //----- (004AFB86) --------------------------------------------------------
-void stru170::PrepareFaceRenderList_sw(int a2, unsigned int uFaceID)
+void BspRenderer::PrepareFaceRenderList_sw(int a2, unsigned int uFaceID)
 {
-  stru170 *v3; // ebx@1
+  BspRenderer *v3; // ebx@1
   BLVFace *v4; // eax@1
   char *v5; // ecx@2
   unsigned __int16 v6; // ax@11
@@ -1582,7 +1582,7 @@
           && v23 <= *((short *)v20 + 2007)
           && v12 >= *((short *)v20 + 2006)
           && v22 <= *((short *)v20 + 2008)
-          && sub_424829(v10, &v3->field_FA8[v3->std__vector_000FA8].field_C, (stru170_stru2 *)(v20 + 4020), uFaceID) )
+          && sub_424829(v10, &v3->field_FA8[v3->std__vector_000FA8].field_C, (BspRenderer_stru2 *)(v20 + 4020), uFaceID) )
         {
           v16 = v21->uSectorID;
           if ( *((short *)v20 + 2004) == v16 )
@@ -1629,15 +1629,15 @@
   int v6; // ecx@7
   int v7; // esi@8
 
-  for ( i = 0; i < (signed int)pStru170->uNumFaceIDs; ++i )
+  for ( i = 0; i < (signed int)pBspRenderer->uNumFaceIDs; ++i )
   {
-    v1 = pStru170->pFaceIDs[2 * i];
+    v1 = pBspRenderer->pFaceIDs[2 * i];
     if ( v1 >= 0 )
     {
       if ( v1 < (signed int)pIndoor->uNumFaces )
       {
-        v2 = pStru170->pFaceIDs[2 * i];
-        pBLVRenderParams->field_7C = &pStru170->field_FA8[pStru170->pFaceIDs[2 * i + 1]].field_C;
+        v2 = pBspRenderer->pFaceIDs[2 * i];
+        pBLVRenderParams->field_7C = &pBspRenderer->field_FA8[pBspRenderer->pFaceIDs[2 * i + 1]].field_C;
         v3 = sub_423B5D(v2);
         if ( v3 )
         {