diff mm7_4.cpp @ 58:41cbaabde2cb

BLV render
author Nomad
date Thu, 25 Oct 2012 02:05:16 +0200
parents 4211cceb3813
children 5159d2e6f559
line wrap: on
line diff
--- a/mm7_4.cpp	Wed Oct 24 17:33:46 2012 +0200
+++ b/mm7_4.cpp	Thu Oct 25 02:05:16 2012 +0200
@@ -123,8 +123,8 @@
     if ( v1->field_2 & 1 )
     {
       v36 = abs(v1->vPosition.x - pParty->vPosition.x);
-      v25 = abs(v3 - pParty->vPosition.z);
-      v28 = abs(v35 - pParty->vPosition.y);
+      v25 = abs(v3 - pParty->vPosition.y);
+      v28 = abs(v35 - pParty->vPosition.z);
       v4 = v36;
       v5 = v25;
       v6 = v28;
@@ -300,7 +300,7 @@
   v43 = v5;
   v42 = v5->pFloors;
   v7 = pIndoor->pVertices;
-  v39 = v5->field_4;
+  v39 = v5->uNumFloors;
   for ( uSectorIDa = 0; uSectorIDa < v39; ++uSectorIDa )
   {
     v40 = (int)&v42[v6];
@@ -3404,7 +3404,7 @@
   signed int v20; // ebx@25
   Player *v21; // esi@25
   ITEM_EQUIP_TYPE v22; // edi@30
-  int v23; // edx@31
+  //int v23; // edx@31
   signed int v24; // ecx@32
   signed int v25; // eax@33
   int v26; // eax@35
@@ -3442,13 +3442,14 @@
   {
     v51 = 0;
     v4 = (v0 - v2) / 5;
-    if ( (signed __int64)pParty->pPartyBuffs[7].uExpireTime > 0 )
+    if (pParty->FlyActive())
     {
       if ( pParty->bFlying )
       {
         if ( !(pParty->pPartyBuffs[7].uFlags & 1) )
         {
           v5 = v4 * pParty->pPartyBuffs[7].uPower;
+          __debugbreak();
           v6 = &stru_AA1058[4].pSounds[6972 * pParty->pPartyBuffs[7].uCaster + 2000];
           v7 = *(int *)v6 - v5 < 0;
           *(int *)v6 -= v5;
@@ -3462,12 +3463,13 @@
         }
       }
     }
-    if ( (signed __int64)pParty->pPartyBuffs[18].uExpireTime > 0 )
-    {
-      if ( pParty->uFlags & 0x80 )
+    if (pParty->WaterWalkActive())
+    {
+      if (pParty->uFlags & 0x80 )
       {
         if ( !(pParty->pPartyBuffs[18].uFlags & 1) )
         {
+          __debugbreak();
           v8 = &stru_AA1058[4].pSounds[6972 * pParty->pPartyBuffs[18].uCaster + 2000];
           v7 = *(int *)v8 - v4 < 0;
           *(int *)v8 -= v4;
@@ -3480,8 +3482,7 @@
         }
       }
     }
-    if ( SHIDWORD(pParty->pPartyBuffs[10].uExpireTime) >= 0
-      && (SHIDWORD(pParty->pPartyBuffs[10].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[10].uExpireTime)) )
+    if (pParty->ImmolationActive())
     {
       //LayingItem::LayingItem(&a1);
       v9 = 0;
@@ -3490,7 +3491,7 @@
       a3.x = 0;
       a1.stru_24.Reset();
       a1.field_4C = pParty->pPartyBuffs[10].uPower;
-      a1.field_50 = pParty->pPartyBuffs[10].uSkill;
+      a1.field_50 = pParty->ImmolationSkillLevel();
       v10 = 0;
       a1.uItemType = 1070;
       a1.field_48 = 8;
@@ -3563,7 +3564,9 @@
     {
       if ( v21->HasItemEquipped(v22) )
       {
-        v24 = *(int *)&v21->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * *(int *)v23 + 5];
+        //v23 = v21->pEquipment.pIndices;
+        auto _idx = v21->pEquipment.pIndices[v22];
+        v24 = v21->pInventoryItems[_idx].uItemID;
         if ( v24 > 134 )
         {
           if ( v24 == 529 )
@@ -3582,7 +3585,7 @@
         }
         else
         {
-          v25 = *(int *)&v21->field_1F5[36 * *(int *)v23 + 7];
+          v25 = v21->pInventoryItems[_idx].uAdditionalValue;
           if ( v25 <= 50 )
           {
             if ( v25 != 50 )
@@ -14786,9 +14789,9 @@
           v7 = *((int *)v5 + 4);
           pIndoorCamera->sRotationY = 0;
           pParty->uFlags |= 2u;
-          pParty->vPosition.z = v7;
-          pParty->vPosition.y = *((int *)v5 + 5);
-          pParty->uFallStartY = pParty->vPosition.y;
+          pParty->vPosition.y = v7;
+          pParty->vPosition.z = *((int *)v5 + 5);
+          pParty->uFallStartY = pParty->vPosition.z;
           pParty->sRotationY = *((int *)v5 + 6);
         }
         HousePlaySomeSound((unsigned int)ptr_507BC0->ptr_1C, 2);