changeset 100:81e93310f73c

rest screen, enemy status color fixed
author zipi
date Thu, 07 Feb 2013 22:23:10 +0000
parents b7ff791b1333
children 8a10c9780e17
files Actor.cpp Player.cpp mm7_2.cpp
diffstat 3 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Actor.cpp	Thu Feb 07 21:02:19 2013 +0000
+++ b/Actor.cpp	Thu Feb 07 22:23:10 2013 +0000
@@ -3930,11 +3930,11 @@
   if ( !v7 )
   {
     if ( (!v2 || (signed __int64)v2->pActorBuffs[12].uExpireTime > 0 || !(v2->uAttributes & 0x80000))
-      && !*((unsigned char *)&pFactionTable->relations + 89 * v8) )
+      && !pFactionTable->relations[v8][0]) 
     {
 LABEL_56:
       if ( v8 < 89 )
-        return *((unsigned char *)&pFactionTable->relations + 89 * v7 + v8);
+        return pFactionTable->relations[v7][v8];
       return 0;
     }
     return 4;
--- a/Player.cpp	Thu Feb 07 21:02:19 2013 +0000
+++ b/Player.cpp	Thu Feb 07 22:23:10 2013 +0000
@@ -6995,7 +6995,7 @@
       goto LABEL_173;
     }
 LABEL_172:
-    ((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->SetCondition(6u, 1);
+    pParty->pPlayers[a2-1].SetCondition(6u, 1);
     goto LABEL_173;
   }
   if ( pItemsTable->pItems[pParty->pPickedItem.uItemID].uEquipType == 14 )
@@ -7760,7 +7760,7 @@
   char v20; // cl@124
   DDM_DLV_Header *v21; // eax@126
   unsigned int v22; // edi@129
-  ItemGen *v23; // esi@134
+  Player *v23; // esi@134
   ItemGen *v24; // ecx@135
   signed int v25; // edx@135
   ITEM_EQUIP_TYPE v26; // ebx@155
@@ -7835,10 +7835,10 @@
         goto _cmp_against_arg;
       case VAR_CircusPrises:
         v4 = 0;
-        v23 = pParty->pPlayers[0].pInventoryItems;
+        v23 = pParty->pPlayers;//[0].pInventoryItems;
         do
         {
-          v24 = v23;
+		  v24 = v23->pInventoryItems;
           v25 = 138;
           do
           {
@@ -7858,9 +7858,9 @@
             --v25;
           }
           while ( v25 );
-          v23 = (ItemGen *)((char *)v23 + 6972);
+          ++v23;
         }
-        while ( (signed int)v23 < (signed int)&pParty->field_777C[85] );
+        while ( v23 <= &pParty->pPlayers[3] );
         goto _cmp_against_arg;
       case VAR_MonthEquals2:
         v17 = pParty->uCurrentMonth == a1;
--- a/mm7_2.cpp	Thu Feb 07 21:02:19 2013 +0000
+++ b/mm7_2.cpp	Thu Feb 07 22:23:10 2013 +0000
@@ -10096,10 +10096,10 @@
   int v7; // esi@9
   signed int v8; // [sp+4h] [bp-Ch]@3
   signed int v9; // [sp+8h] [bp-8h]@4
-  FactionTable *v10; // [sp+Ch] [bp-4h]@1
+  char *v10; // [sp+Ch] [bp-4h]@1
 
   v1 = 0;
-  v10 = this;
+  v10 = (char *)relations;
   if ( pHostileTXT_Raw )
     pAllocator->FreeChunk(pHostileTXT_Raw);
   pHostileTXT_Raw = 0;
@@ -10111,7 +10111,7 @@
     v2 = strtok(v1, "\r") + 1;
     v3 = 0;
     v9 = (signed int)v1;
-    v4 = (int)((char *)&v10[-7] + v8 - 5);
+    v4 = (int)&v10[v8-89];
     do
     {
       v5 = *v2;