diff Indoor.cpp @ 1408:204cce84300b

FindSound
author Ritor1
date Fri, 26 Jul 2013 18:11:36 +0600
parents d4f57df4c299
children 38df78aba732
line wrap: on
line diff
--- a/Indoor.cpp	Tue Jul 23 16:34:00 2013 +0600
+++ b/Indoor.cpp	Fri Jul 26 18:11:36 2013 +0600
@@ -6908,4 +6908,51 @@
     PortalFace._screen_space_y[bottom_num_vertices] = PortalFace._screen_space_y[0];
   }
   return bottom_num_vertices;
+}
+
+//----- (004AAEA6) --------------------------------------------------------
+int __fastcall sub_4AAEA6_transform(RenderVertexSoft *a1)
+{
+  double v4; // st5@2
+  double v5; // st4@3
+  float v11; // [sp+8h] [bp-8h]@2
+  float v12; // [sp+8h] [bp-8h]@6
+  float v13; // [sp+Ch] [bp-4h]@2
+  float v14; // [sp+Ch] [bp-4h]@6
+
+  if ( pBLVRenderParams->sPartyRotX )
+  {
+    v13 = a1->vWorldPosition.x - (double)pParty->vPosition.x;
+    v11 = a1->vWorldPosition.y - (double)pParty->vPosition.y;
+    v4 = a1->vWorldPosition.z - (double)pParty->vPosition.z;
+    if ( pRenderer->pRenderD3D )
+    {
+      v5 = v11 * pBLVRenderParams->fSineY + v13 * pBLVRenderParams->fCosineY;
+      a1->vWorldViewPosition.y = v13 * pBLVRenderParams->fSineY - v11 * pBLVRenderParams->fCosineY;
+    }
+    else
+    {
+      v5 = v13 * pBLVRenderParams->fCosineY - v11 * pBLVRenderParams->fSineY;
+      a1->vWorldViewPosition.y = v13 * pBLVRenderParams->fSineY + v11 * pBLVRenderParams->fCosineY;
+    }
+    a1->vWorldViewPosition.x = v5 * pBLVRenderParams->fCosineNegX - v4 * pBLVRenderParams->fSineNegX;
+    a1->vWorldViewPosition.z = v5 * pBLVRenderParams->fSineNegX + v4 * pBLVRenderParams->fCosineNegX;
+  }
+  else
+  {
+    v14 = a1->vWorldPosition.x - (double)pParty->vPosition.x;
+    v12 = a1->vWorldPosition.y - (double)pParty->vPosition.y;
+    a1->vWorldViewPosition.z = a1->vWorldPosition.z - (double)pParty->vPosition.z;
+    if ( pRenderer->pRenderD3D )
+    {
+      a1->vWorldViewPosition.x = v12 * pBLVRenderParams->fSineY + v14 * pBLVRenderParams->fCosineY;
+      a1->vWorldViewPosition.y = v14 * pBLVRenderParams->fSineY - v12 * pBLVRenderParams->fCosineY;
+    }
+    else
+    {
+      a1->vWorldViewPosition.x = v14 * pBLVRenderParams->fCosineY - v12 * pBLVRenderParams->fSineY;
+      a1->vWorldViewPosition.y = v14 * pBLVRenderParams->fSineY + v12 * pBLVRenderParams->fCosineY;
+    }
+  }
+  return 0;
 }
\ No newline at end of file