diff mm7_5.cpp @ 41:fc3016f5a07a

more skills screen fix
author zipi
date Sun, 20 Jan 2013 20:52:13 +0000
parents c3a02d80c84c
children 2bcc7b24c831
line wrap: on
line diff
--- a/mm7_5.cpp	Sun Jan 20 19:41:05 2013 +0000
+++ b/mm7_5.cpp	Sun Jan 20 20:52:13 2013 +0000
@@ -17805,11 +17805,11 @@
   int a2; // [sp+10h] [bp-14h]@1
   int v12; // [sp+14h] [bp-10h]@8
   int v13; // [sp+14h] [bp-10h]@19
-  unsigned int *v14; // [sp+18h] [bp-Ch]@8
-  unsigned int *v15; // [sp+18h] [bp-Ch]@14
-  unsigned int *v16; // [sp+18h] [bp-Ch]@19
-  unsigned int *v17; // [sp+18h] [bp-Ch]@25
-  unsigned short *v18; // [sp+1Ch] [bp-8h]@8
+  int *v14; // [sp+18h] [bp-Ch]@8
+  int *v15; // [sp+18h] [bp-Ch]@14
+  int *v16; // [sp+18h] [bp-Ch]@19
+  int *v17; // [sp+18h] [bp-Ch]@25
+  Player *v18; // [sp+1Ch] [bp-8h]@8
   int a5; // [sp+20h] [bp-4h]@8
 
   a2 = 0;
@@ -17834,13 +17834,13 @@
   }
   v12 = 0;
   a5 = pGUIWindow_CurrentMenu->uNumControls;
-  v18 = &pParty->pPlayers[0].pActiveSkills[0];	  //&stru_AA1058[3].pSounds[6972 * v0 + 40552];
+  v18 = &pParty->pPlayers[v0-1];	  //&stru_AA1058[3].pSounds[6972 * v0 + 40552];
   v2 = pFontLucida;
-  v14 = (unsigned int *)dword_4E2A2C;
+  v14 = dword_4E2A2C;
   v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
   do
   {
-    if ( v18[*v14 + 132] & 0x3F )//crash
+    if ( v18->pActiveSkills[*v14] & 0x3F )//crash
     {
       v4 = LOBYTE(v2->uFontHeight);
       v3 = v3 + v4 - 3;
@@ -17851,14 +17851,14 @@
     }
     ++v14;
   }
-  while ( (signed int)v14 < (signed int)dword_4E2A50 );
+  while ( v14 <= &dword_4E2A2C[8] );
   if ( !v12 )
     v3 = v3 + LOBYTE(v2->uFontHeight) - 3;
-  v15 = (unsigned int *)_4E2A80_skills;
+  v15 = _4E2A80_skills;
   v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6;
   do
   {
-    if ( v18[ *v15 + 132] & 0x3F && a2 < 15 )
+    if ( v18->pActiveSkills[*v15] & 0x3F && a2 < 15 )
     {
       v6 = LOBYTE(v2->uFontHeight);
       v5 = v5 + v6 - 3;
@@ -17868,13 +17868,13 @@
     }
     ++v15;
   }
-  while ( (signed int)v15 <= (signed int)_4E2A80_skills[8] );
+  while ( v15 <= &_4E2A80_skills[8] );
   v13 = 0;
-  v16 = (unsigned int *)dword_4E2A18;
+  v16 = pArmorSkills;
   v7 = 2 * LOBYTE(v2->uFontHeight) + 13;
   do
   {
-    if ( v18[ *v16 + 132] & 0x3F )
+    if ( v18->pActiveSkills[*v16] & 0x3F )
     {
       v8 = LOBYTE(v2->uFontHeight);
       v7 = v7 + v8 - 3;
@@ -17885,14 +17885,14 @@
     }
     ++v16;
   }
-  while ( (signed int)v16 < (signed int)dword_4E2A2C );
+  while ( v16 <= &pArmorSkills[4] );
   if ( !v13 )
     v7 = v7 + LOBYTE(v2->uFontHeight) - 3;
-  v17 = (unsigned int *)dword_4E2A50;
+  v17 = dword_4E2A50;
   v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6;
   do
   {
-    if ( v18[ *v17 + 132] & 0x3F )
+    if ( v18->pActiveSkills[*v17] & 0x3F )
     {
       v10 = LOBYTE(v2->uFontHeight);
       v9 = v9 + v10 - 3;
@@ -17902,7 +17902,7 @@
     }
     ++v17;
   }
-  while ( (signed int)v17 < (signed int)_4E2A80_skills );
+  while ( v17 <= &dword_4E2A50[11] );
   if ( a2 )
     pGUIWindow_CurrentMenu->_41D08F(a2, 1, 0, a5);
 }
\ No newline at end of file