diff AudioPlayer.cpp @ 58:41cbaabde2cb

BLV render
author Nomad
date Thu, 25 Oct 2012 02:05:16 +0200
parents 916bec351934
children a84fb3752681
line wrap: on
line diff
--- a/AudioPlayer.cpp	Wed Oct 24 17:33:46 2012 +0200
+++ b/AudioPlayer.cpp	Thu Oct 25 02:05:16 2012 +0200
@@ -825,12 +825,12 @@
           if ( !a5 )
             v75 = pParty->vPosition.x;
           if ( !a6 )
-            a6 = pParty->vPosition.z;
+            a6 = pParty->vPosition.y;
           if ( uNumRepeats )
             AIL_set_sample_loop_count(v73->hSample, uNumRepeats - 1);
           v83 = sub_4AB66C(v75, a6);
           AIL_set_sample_pan(v73->hSample, v83);
-          v84 = GetSoundStrengthByDistanceFromParty(v75, a6, pParty->vPosition.y);
+          v84 = GetSoundStrengthByDistanceFromParty(v75, a6, pParty->vPosition.z);
           AIL_set_sample_volume(v73->hSample, v84);
           v76 = a3;
           goto LABEL_184;
@@ -1049,8 +1049,8 @@
           v12 = 10;
 LABEL_46:
           a1.vWorldPosition.x = (double)pParty->vPosition.x;
-          a1.vWorldPosition.y = (double)pParty->vPosition.z;
-          v21 = (double)pParty->sEyelevel + (double)pParty->vPosition.y;
+          a1.vWorldPosition.y = (double)pParty->vPosition.y;
+          v21 = (double)pParty->sEyelevel + (double)pParty->vPosition.z;
           goto LABEL_47;
         }
         v12 = 10 * v13 / 16;
@@ -1259,10 +1259,10 @@
           if ( (a3 & 7) != 5 )
           {
             a1.vWorldPosition.x = (double)pParty->vPosition.x;
-            v43 = (double)pParty->vPosition.z;
+            v43 = (double)pParty->vPosition.y;
 LABEL_100:
             a1.vWorldPosition.y = v43;
-            v47 = (double)pParty->sEyelevel + (double)pParty->vPosition.y;
+            v47 = (double)pParty->sEyelevel + (double)pParty->vPosition.z;
             goto LABEL_101;
           }
           v44 = (LayingItem *)&pLevelDecorations[a3 >> 3];
@@ -1427,8 +1427,8 @@
             if ( v10 != 2 )
             {
               a1.vWorldPosition.x = (double)pParty->vPosition.x;
-              a1.vWorldPosition.y = (double)pParty->vPosition.z;
-              v11 = (double)pParty->sEyelevel + (double)pParty->vPosition.y;
+              a1.vWorldPosition.y = (double)pParty->vPosition.y;
+              v11 = (double)pParty->sEyelevel + (double)pParty->vPosition.z;
               goto LABEL_21;
             }
             v12 = (LayingItem *)&pLevelDecorations[v6->field_4 >> 3];
@@ -1451,8 +1451,8 @@
             if ( pBLVRenderParams->sPartyRotX )
             {
               v58 = a1.vWorldPosition.x - (double)pParty->vPosition.x;
-              *(float *)&uNumRepeats = a1.vWorldPosition.y - (double)pParty->vPosition.z;
-              v18 = a1.vWorldPosition.z - (double)pParty->vPosition.y;
+              *(float *)&uNumRepeats = a1.vWorldPosition.y - (double)pParty->vPosition.y;
+              v18 = a1.vWorldPosition.z - (double)pParty->vPosition.z;
               if ( pRenderer->pRenderD3D )
               {
                 v19 = *(float *)&uNumRepeats * v56 + v58 * v55;
@@ -1470,7 +1470,7 @@
             else
             {
               v58 = a1.vWorldPosition.x - (double)pParty->vPosition.x;
-              *(float *)&uNumRepeats = a1.vWorldPosition.y - (double)pParty->vPosition.z;
+              *(float *)&uNumRepeats = a1.vWorldPosition.y - (double)pParty->vPosition.y;
               if ( pRenderer->pRenderD3D )
               {
                 a1.vWorldViewPosition.x = *(float *)&uNumRepeats * v56 + v58 * v55;
@@ -1482,7 +1482,7 @@
                 v21 = v58 * v56 + *(float *)&uNumRepeats * v55;
               }
               a1.vWorldViewPosition.y = v21;
-              a1.vWorldViewPosition.z = a1.vWorldPosition.z - (double)pParty->vPosition.y;
+              a1.vWorldViewPosition.z = a1.vWorldPosition.z - (double)pParty->vPosition.z;
             }
           }
           else
@@ -1623,8 +1623,8 @@
         LODWORD(v56) = 1;
         v43 = 4 * v59 + 6817720;
         v44 = &pLevelDecorations[_6807B8_level_decorations_ids[v59]];
-        v45 = abs(v44->vPosition.z - pParty->vPosition.y);
-        v46 = abs(v44->vPosition.y - pParty->vPosition.z);
+        v45 = abs(v44->vPosition.z - pParty->vPosition.z);
+        v46 = abs(v44->vPosition.y - pParty->vPosition.y);
         v47 = abs(v44->vPosition.x - pParty->vPosition.x);
         if ( sub_4621DA(v47, v46, v45) <= 8192 )
           break;
@@ -1692,7 +1692,7 @@
 {
   signed int v2; // eax@1
 
-  v2 = stru_5C6E00->uDoublePiMask & (stru_5C6E00->Atan2(a1 - pParty->vPosition.x, a2 - pParty->vPosition.z)
+  v2 = stru_5C6E00->uDoublePiMask & (stru_5C6E00->Atan2(a1 - pParty->vPosition.x, a2 - pParty->vPosition.y)
                                   - stru_5C6E00->uIntegerHalfPi
                                   - pParty->sRotationY);
   if ( v2 > (signed int)stru_5C6E00->uIntegerPi )
@@ -1714,8 +1714,8 @@
 
   v3 = a2;
   v4 = a1;
-  v5 = abs(a3 - pParty->vPosition.y);
-  v6 = abs(v3 - pParty->vPosition.z);
+  v5 = abs(a3 - pParty->vPosition.z);
+  v6 = abs(v3 - pParty->vPosition.y);
   v7 = abs(v4 - pParty->vPosition.x);
   v9 = sub_4621DA(v7, v6, v5);
   if ( v9 <= 8192 )
@@ -2201,8 +2201,8 @@
   if ( pBLVRenderParams->sPartyRotX )
   {
     v13 = a1->vWorldPosition.x - (double)pParty->vPosition.x;
-    v11 = a1->vWorldPosition.y - (double)pParty->vPosition.z;
-    v4 = a1->vWorldPosition.z - (double)pParty->vPosition.y;
+    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;
@@ -2220,8 +2220,8 @@
   else
   {
     v14 = a1->vWorldPosition.x - (double)pParty->vPosition.x;
-    v12 = a1->vWorldPosition.y - (double)pParty->vPosition.z;
-    v7 = a1->vWorldPosition.z - (double)pParty->vPosition.y;
+    v12 = a1->vWorldPosition.y - (double)pParty->vPosition.y;
+    v7 = a1->vWorldPosition.z - (double)pParty->vPosition.z;
     if ( pRenderer->pRenderD3D )
     {
       a1->vWorldViewPosition.x = v12 * pBLVRenderParams->fSineY + v14 * pBLVRenderParams->fCosineY;