diff mm7_1.cpp @ 1238:77ea5c5f2c0b

m
author Ritor1
date Mon, 10 Jun 2013 00:37:03 +0600
parents 182b910c528d
children b9747d9e9b4e 21a46b38ca24 772f805df4f7
line wrap: on
line diff
--- a/mm7_1.cpp	Sun Jun 09 21:48:48 2013 +0600
+++ b/mm7_1.cpp	Mon Jun 10 00:37:03 2013 +0600
@@ -1487,7 +1487,7 @@
 //----- (00423B5D) --------------------------------------------------------
 int __fastcall sub_423B5D(unsigned int uFaceID)
 {
-  BLVFace *v1; // ebx@1
+  BLVFace *pFace; // ebx@1
   Vec3_short_ *v2; // esi@1
   //int v3; // ST28_4@1
   __int16 v4; // ST2C_2@1
@@ -1577,45 +1577,39 @@
   signed int id; // [sp+24h] [bp-4h]@51
   signed int ie; // [sp+24h] [bp-4h]@61
 
-  v1 = &pIndoor->pFaces[uFaceID];
+  pFace = &pIndoor->pFaces[uFaceID];
   //this = pGame->pIndoorCameraD3D;
-  v2 = &pIndoor->pVertices[v1->pVertexIDs[0]];
+  v2 = &pIndoor->pVertices[pFace->pVertexIDs[0]];
   //v3 = *(_DWORD *)&v2->x;
   v4 = v2->z;
   //v5 = 0;
-  if ( v1->pFacePlane_old.vNormal.x * (v2->x - pBLVRenderParams->vPartyPos.x)
-     + v1->pFacePlane_old.vNormal.y * (v2->y - pBLVRenderParams->vPartyPos.y)
-     + v1->pFacePlane_old.vNormal.z * (v2->z - pBLVRenderParams->vPartyPos.z) < 0 )
+  if ( pFace->pFacePlane_old.vNormal.x * (v2->x - pBLVRenderParams->vPartyPos.x)
+     + pFace->pFacePlane_old.vNormal.y * (v2->y - pBLVRenderParams->vPartyPos.y)
+     + pFace->pFacePlane_old.vNormal.z * (v2->z - pBLVRenderParams->vPartyPos.z) < 0 )
   {
     stru_50B700.field_0 = 1;
   }
   else
   {
     stru_50B700.field_0 = 0;
-    if ( !v1->Portal() )
+    if ( !pFace->Portal() )
       return 0;
   }
   //v66 = v1->uNumVertices;
-  for (uint i = 0; i < v1->uNumVertices; ++i)
+  for (uint i = 0; i < pFace->uNumVertices; ++i)
   {
-      auto v6 = &pIndoor->pVertices[v1->pVertexIDs[i]];
-      pGame->pIndoorCameraD3D->ApplyViewTransform_TrueIfStillVisible(
-        v6->x,
-        v6->y,
-        v6->z,
-        &stru_50B700._view_transformed_xs[i],
-        &stru_50B700._view_transformed_zs[i],
-        &stru_50B700._view_transformed_ys[i],
-        0);
+      auto v6 = &pIndoor->pVertices[pFace->pVertexIDs[i]];
+      pGame->pIndoorCameraD3D->ApplyViewTransform_TrueIfStillVisible(v6->x, v6->y, v6->z,
+        &stru_50B700._view_transformed_xs[i], &stru_50B700._view_transformed_zs[i], &stru_50B700._view_transformed_ys[i], 0);
   }
 
   //v7 = v1->uNumVertices;
   //v8 = 0;
-  if (v1->uNumVertices <= 0)
+  if (pFace->uNumVertices <= 0)
     return 0;
 
   bool bFound = false;
-  for (uint i = 0; i < v1->uNumVertices; ++i)
+  for (uint i = 0; i < pFace->uNumVertices; ++i)
     if (stru_50B700._view_transformed_xs[i] >= 0x80000u)
     {
       bFound = true;
@@ -1625,12 +1619,12 @@
     return 0;
 
   v79 = 0;
-  stru_50B700._view_transformed_xs[v1->uNumVertices] = stru_50B700._view_transformed_xs[0];
-  stru_50B700._view_transformed_zs[v1->uNumVertices] = stru_50B700._view_transformed_zs[0];
-  stru_50B700._view_transformed_ys[v1->uNumVertices] = stru_50B700._view_transformed_ys[0];
+  stru_50B700._view_transformed_xs[pFace->uNumVertices] = stru_50B700._view_transformed_xs[0];
+  stru_50B700._view_transformed_zs[pFace->uNumVertices] = stru_50B700._view_transformed_zs[0];
+  stru_50B700._view_transformed_ys[pFace->uNumVertices] = stru_50B700._view_transformed_ys[0];
   thisa = stru_50B700._view_transformed_xs[0] >= (signed int)0x80000u;
   //int i = 1;
-  for (uint i = 1; i <= v1->uNumVertices; ++i)
+  for (uint i = 1; i <= pFace->uNumVertices; ++i)
   {
       v10 = stru_50B700._view_transformed_xs[i];
       v81 = v10 >= (signed int)0x80000u;