changeset 1076:9b6e252658e8

more DecalBuilder
author zipi
date Sat, 25 May 2013 14:43:27 +0100
parents 1e38e5c049f3
children 2210109f280d
files DecalBuilder.cpp mm7_data.cpp
diffstat 2 files changed, 14 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/DecalBuilder.cpp	Sat May 25 14:07:26 2013 +0100
+++ b/DecalBuilder.cpp	Sat May 25 14:43:27 2013 +0100
@@ -145,6 +145,9 @@
   int v43; // [sp+3Ch] [bp-Ch]@21
   //DecalBuilder *thisa; // [sp+40h] [bp-8h]@1
   //RenderVertexSoft *a11; // [sp+44h] [bp-4h]@8
+  int a6a;
+  int *a6b;
+
 
 //  __debugbreak();
 
@@ -177,22 +180,12 @@
   //a11 = a6;
   if ( a7 )
   {
-    if ( a5 > 0 )
-    {
-      v11 = static_AE4F90;
-      v12 = (char *)a6 - (char *)static_AE4F90;
-      a6 = (RenderVertexSoft *)a5;
-      do
+	  for(int i=0; i < a5;i++)
       {
-        v13 = (RenderVertexSoft *)((char *)v11 + v12);
-        v14 = v11;
-        ++v11;
-        v15 = a6 == (RenderVertexSoft *)1;
-        a6 = (RenderVertexSoft *)((char *)a6 - 1);
-        memcpy(v14, v13, 0x30u);
+        memcpy(&static_AE4F90[i], a6, 0x30u);
+		++a6;
       }
       while ( !v15 );
-    }
     v16 = a4;
     if ( pGame->pIndoorCameraD3D->_437376(a4, static_AE4F90, (unsigned int *)&a5) == 1 )
     {
@@ -221,14 +214,11 @@
   int _a7 = 0;
   if ( this->uNumDecals > 0 )
   {
-    a6 = (RenderVertexSoft *)this->std__vector_30B00C;
+    a6b = 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(light_level, uSectorID, v35, v36, *(float *)&v37);
+      v21 = &pBloodsplatContainer->std__vector_pBloodsplats[*a6b];
+      v22 = _43F5C8_get_point_light_level_with_respect_to_lights(light_level, uSectorID, v21->x, v21->y, v21->z);
       v23 = v21->b;
       v24 = v21->x;
       v42 = v22;
@@ -242,7 +232,7 @@
       v37 = a8;
       v40 = (signed __int64)v26;
       v28 = v21->dot_dist;
-      LODWORD(v36) = (uint32)a6;
+      //LODWORD(v36) = (uint32)a6;
       a5a = v25;
       v39 = v27;
       LODWORD(v35) = a5;
@@ -257,7 +247,7 @@
       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);
+      ++a6b;
     }
     while ( _a7 < this->uNumDecals );
   }
--- a/mm7_data.cpp	Sat May 25 14:07:26 2013 +0100
+++ b/mm7_data.cpp	Sat May 25 14:43:27 2013 +0100
@@ -1205,10 +1205,10 @@
 __int64 GameUI_RightPanel_BookFlashTimer; // weak
 int _507CD4_RestUI_hourglass_anim_controller; // weak
 int dword_507CD8; // weak
-int dword_50B570[777]; // weak
-int dword_50B638[777]; // weak
+int dword_50B570[50]; // weak
+int dword_50B638[50]; // weak
 int dword_50B700; // weak
-int dword_50B738[777]; // idb
+int dword_50B738[2]; // idb
 int _50B744_view_transformed_ys[45];
 int dword_50B828[777];
 int _50B834_view_transformed_zs[45];