diff DecalBuilder.cpp @ 920:34ed2d5e7cfb

MagicShopDialog clean and other
author Ritor1
date Sun, 28 Apr 2013 19:11:36 +0600
parents 346f7069676a
children c45d51b3f4f4
line wrap: on
line diff
--- a/DecalBuilder.cpp	Sat Apr 27 09:37:22 2013 +0600
+++ b/DecalBuilder.cpp	Sun Apr 28 19:11:36 2013 +0600
@@ -130,7 +130,7 @@
   double v28; // st7@21
   int v29; // ST10_4@21
   int v30; // ST08_4@21
-  DecalBuilder *v31; // esi@21
+  //DecalBuilder *v31; // esi@21
   int v32; // [sp+4h] [bp-44h]@18
   RenderVertexSoft *v33; // [sp+8h] [bp-40h]@21
   stru314 *v34; // [sp+Ch] [bp-3Ch]@21
@@ -143,15 +143,15 @@
   int v41; // [sp+34h] [bp-14h]@22
   int v42; // [sp+38h] [bp-10h]@21
   int v43; // [sp+3Ch] [bp-Ch]@21
-  DecalBuilder *thisa; // [sp+40h] [bp-8h]@1
-  RenderVertexSoft *a11; // [sp+44h] [bp-4h]@8
+  //DecalBuilder *thisa; // [sp+40h] [bp-8h]@1
+  //RenderVertexSoft *a11; // [sp+44h] [bp-4h]@8
 
-  __debugbreak();
+//  __debugbreak();
 
-  auto a2 = light_level;
-  auto a9 = uSectorID;
+  //auto a2 = light_level;
+  //auto a9 = uSectorID;
 
-  thisa = this;
+  //thisa = this;
   if ( !a5 )
     return 0;
 
@@ -174,7 +174,7 @@
     stru314::stru314(&static_AE4F60);
   }*/
 
-  a11 = a6;
+  //a11 = a6;
   if ( a7 )
   {
     if ( a5 > 0 )
@@ -198,7 +198,7 @@
     {
       if ( !a5 )
         return 0;
-      a11 = static_AE4F90;
+      a6 = static_AE4F90;
     }
   }
   else
@@ -214,25 +214,21 @@
   LODWORD(v36) = (DWORD)&static_AE4F60.field_10;
   static_AE4F60.field_4.z = v18;
   static_AE4F60.dist = v16->face_plane.dist;
-  if ( !pGame->pIndoorCameraD3D->GetFacetOrientation(
-          v16->polygonType,
-          &static_AE4F60.field_4,
-          &static_AE4F60.field_10,
-          &static_AE4F60.field_1C) )
+  if ( !pGame->pIndoorCameraD3D->GetFacetOrientation(v16->polygonType, &static_AE4F60.field_4, &static_AE4F60.field_10, &static_AE4F60.field_1C) )
   {
       MessageBoxW(nullptr, L"Error: Failed to get the facet orientation", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:101", 0);
   }
   int _a7 = 0;
-  if ( thisa->uNumDecals > 0 )
+  if ( this->uNumDecals > 0 )
   {
-    a6 = (RenderVertexSoft *)thisa->std__vector_30B00C;
+    a6 = (RenderVertexSoft *)this->std__vector_30B00C;
     do
     {
       v21 = &pBloodsplatContainer->std__vector_pBloodsplats[LODWORD(a6->vWorldPosition.x)];
       *(float *)&v37 = v21->z;
       v36 = v21->y;
       v35 = v21->x;
-      v22 = _43F5C8_get_point_light_level_with_respect_to_lights(a2, a9, v35, v36, *(float *)&v37);
+      v22 = _43F5C8_get_point_light_level_with_respect_to_lights(light_level, uSectorID, v35, v36, *(float *)&v37);
       v23 = v21->b;
       v24 = v21->x;
       v42 = v22;
@@ -246,7 +242,7 @@
       v37 = a8;
       v40 = (signed __int64)v26;
       v28 = v21->dot_dist;
-      LODWORD(v36) = (uint32)a11;
+      LODWORD(v36) = (uint32)a6;
       a5a = v25;
       v39 = v27;
       LODWORD(v35) = a5;
@@ -255,26 +251,15 @@
       v32 = v23 | (v22 << 8);
       *(float *)&v29 = v21->radius;
       v30 = (int)v21;
-      v31 = thisa;
-      if ( !thisa->_49B790_build_decal_geometry(
-              v42,
-              a3,
-              v30,
-              (int)&a5a,
-              v29,
-              v43,
-              v33,
-              &static_AE4F60,
-              a5,
-              a11,
-              a8) )
+      //v31 = thisa;
+      if ( !this->_49B790_build_decal_geometry(v42, a3, v30, (int)&a5a, v29, v43, v33, &static_AE4F60, a5, a6, a8) )
       {
       MessageBoxW(nullptr, L"Error: Failed to build decal geometry", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\PolyProjector.cpp:114", 0);
       }
       ++_a7;
       a6 = (RenderVertexSoft *)((char *)a6 + 4);
     }
-    while ( _a7 < v31->uNumDecals );
+    while ( _a7 < this->uNumDecals );
   }
   return 1;
 }