diff mm7_3.cpp @ 240:e9fabaf75628

map working
author zipi
date Sun, 17 Feb 2013 21:51:35 +0000
parents ea0b5ff2ae23
children 37dcbe8f3cca 48f21f569328 92a551e4dbeb
line wrap: on
line diff
--- a/mm7_3.cpp	Sun Feb 17 21:13:30 2013 +0000
+++ b/mm7_3.cpp	Sun Feb 17 21:51:35 2013 +0000
@@ -14387,7 +14387,7 @@
 {
   int v5; // ebx@1
   int v6; // edi@1
-  unsigned int *v7; // eax@8
+  BLVMapOutlines *v7; // eax@8
   unsigned __int8 v8; // zf@8
   unsigned __int8 v9; // sf@8
   int v10; // esi@10
@@ -14403,7 +14403,7 @@
   int v20; // eax@16
   signed int v21; // esi@18
   int v22; // ecx@21
-  int v23; // ecx@21
+  BLVMapOutline *v23; // ecx@21
   Vec3_short_ *v24; // edx@21
   Vec3_short_ *v25; // eax@21
   int v26; // ecx@21
@@ -14412,7 +14412,7 @@
   int v29; // eax@21
   double v30; // st7@23
   signed __int64 v31; // qax@23
-  char *v32; // edx@23
+  unsigned short *v32; // edx@23
   int v33; // esi@23
   signed int v34; // eax@23
   signed int v35; // ecx@23
@@ -14420,12 +14420,12 @@
   int v37; // ecx@27
   int v38; // edx@31
   unsigned int v39; // eax@33
-  const void *v40; // esi@33
-  unsigned __int16 *v41; // edi@33
+  short *v40; // esi@33
+  short *v41; // edi@33
   unsigned __int8 v42; // cf@33
   unsigned int v43; // ecx@33
-  int v44; // edi@33
-  int v45; // esi@33
+  short *v44; // edi@33
+  short *v45; // esi@33
   int v46; // ecx@33
   signed int v47; // esi@38
   signed int v48; // ecx@38
@@ -14446,7 +14446,7 @@
   signed int v63; // esi@85
   int v64; // eax@87
   unsigned int v65; // ebx@95
-  char *v66; // edx@95
+  unsigned short *v66; // edx@95
   unsigned __int16 *v67; // esi@96
   int v68; // edi@98
   unsigned __int16 v69; // cx@99
@@ -14455,7 +14455,7 @@
   unsigned int v72; // [sp-8h] [bp-4806Ch]@80
   signed int v73; // [sp-4h] [bp-48068h]@59
   unsigned __int16 v74; // [sp-4h] [bp-48068h]@79
-  char v75[65535]; // [sp+Ch] [bp-48058h]@23
+  unsigned short v75[131070]; // [sp+Ch] [bp-48058h]@23
   int v76; // [sp+4800Ch] [bp-58h]@23
   unsigned __int16 *v77; // [sp+48010h] [bp-54h]@27
   unsigned __int16 *v78; // [sp+48014h] [bp-50h]@23
@@ -14474,11 +14474,11 @@
   unsigned int i; // [sp+48048h] [bp-1Ch]@9
   unsigned int v92; // [sp+4804Ch] [bp-18h]@16
   unsigned __int16 *v93; // [sp+48050h] [bp-14h]@16
-  unsigned int v94; // [sp+48054h] [bp-10h]@8
+  signed int v94; // [sp+48054h] [bp-10h]@8
   unsigned int v95; // [sp+48058h] [bp-Ch]@16
   int v96; // [sp+4805Ch] [bp-8h]@10
   const void *v97; // [sp+48060h] [bp-4h]@16
-  char *a4a; // [sp+4806Ch] [bp+8h]@85
+  unsigned short *a4a; // [sp+4806Ch] [bp+8h]@85
   int a5a; // [sp+48070h] [bp+Ch]@86
 
   x_ = x;
@@ -14544,7 +14544,7 @@
           do
           {
             *(short *)v32 = v78[*((char *)v77 + v37)];//crash
-            v32 += 2;
+            ++v32;
             v97 = (char *)v97 + v87;
             v37 = (signed int)v97 >> 16;
             --i;
@@ -14570,22 +14570,22 @@
         if ( (signed int)v94 > 0 )
         {
           v39 = v94;
-          v40 = v97;
-          v41 = v93;
+          v40 = (short *)v97;
+          v41 = (short *)v93;
           v42 = v94 & 1;
           v43 = v94 >> 1;
-          memcpy(v93, v97, 4 * (v94 >> 1));
-          v45 = (int)((char *)v40 + 4 * v43);
-          v44 = (int)&v41[2 * v43];
+          memcpy(v93, v97, 2 * (v94 >> 1));
+          v45 = &v40[2 * v43];
+          v44 = &v41[2 * v43];
           v46 = v42;
           v39 *= 2;
           v93 = (unsigned __int16 *)((char *)v93 + v39);
           v97 = (char *)v97 + v39;
           while ( v46 )
           {
-            *(short *)v44 = *(short *)v45;
-            v45 += 2;
-            v44 += 2;
+            *v44 = *v45;
+            ++v45;
+            ++v44;
             --v46;
           }
           v6 = v86;
@@ -14600,7 +14600,7 @@
   {
 	  black = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0, 0);
 	  teal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu);
-	  v7 = (uint *)pIndoor->pMapOutlines;
+	  v7 = pIndoor->pMapOutlines;
 	  uNumBlueFacesInBLVMinimap = 0;
 	  v8 = pIndoor->pMapOutlines->uNumOutlines == 0;
 	  v9 = pIndoor->pMapOutlines->uNumOutlines < 0;
@@ -14649,13 +14649,13 @@
 					v85 + ((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16),
 					v90 - v92,
 					black);
-				  v7 = (uint *)pIndoor->pMapOutlines;
+				  v7 = pIndoor->pMapOutlines;
 			  }
 		  }
 		  ++v94;
 		  i += 12;
 		}
-		while ( (signed int)v94 < (signed int)*v7 );
+		while ( v94 < (signed int)v7->uNumOutlines );
 	  }
 	  v21 = 0;
 	  if ( (signed int)uNumBlueFacesInBLVMinimap > 0 )
@@ -14664,9 +14664,9 @@
 		{
 		  v22 = pBlueFacesInBLVMinimapIDs[v21];
 		  v87 = v5;
-		  v23 = (int)&v7[3 * v22 + 1];
-		  v24 = &pIndoor->pVertices[*(short *)v23];
-		  v25 = &pIndoor->pVertices[*(short *)(v23 + 2)];
+		  v23 = &v7->pOutlines[v22];
+		  v24 = &pIndoor->pVertices[v23->uVertex1ID];
+		  v25 = &pIndoor->pVertices[v23->uVertex2ID];
 		  v26 = v25->x;
 		  v27 = (unsigned __int16 *)(v24->x - v86);
 		  v28 = v24->y - v84;
@@ -14687,7 +14687,7 @@
 		  ++v21;
 		  if ( v21 >= (signed int)uNumBlueFacesInBLVMinimap )
 			break;
-		  v7 = (uint *)pIndoor->pMapOutlines;
+		  v7 = pIndoor->pMapOutlines;
 		}
 		v6 = v86;
 	  }
@@ -14867,14 +14867,14 @@
             if ( pOutdoor->_47F097(v81, v96) )
             {
               if ( !((a5a + v85) % 2) )
-                *(short *)a4a = i;
+                *a4a = i;
             }
             else
             {
-              *(short *)a4a = 0;
-            }
-          }
-          a4a += 2;
+              *a4a = 0;
+            }
+          }
+          ++a4a;
           v97 = (char *)v97 + black;
           v64 = (signed int)v97 >> 16;
           ++a5a;
@@ -14883,7 +14883,7 @@
       }
       v62 += black;
       v97 = (const void *)v60;
-      a4a += 2 * (v90 - a5a);
+      a4a += v90 - a5a;
       v63 = v62 >> 16;
       ++v85;
       teal = (unsigned int)v78;
@@ -14904,7 +14904,7 @@
             v69 = *(short *)v66;
             if ( !*(short *)v66 || v69 == (short)i )
               *v67 = v69;
-            v66 += 2;
+            ++v66;
             ++v67;
             --v68;
           }