changeset 41:fc3016f5a07a

more skills screen fix
author zipi
date Sun, 20 Jan 2013 20:52:13 +0000
parents cae8922b867a
children 2bcc7b24c831
files mm7_1.cpp mm7_5.cpp mm7_data.cpp mm7_data.h
diffstat 4 files changed, 23 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/mm7_1.cpp	Sun Jan 20 19:41:05 2013 +0000
+++ b/mm7_1.cpp	Sun Jan 20 20:52:13 2013 +0000
@@ -206,7 +206,7 @@
   v85 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem;
   v86 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0);
   v79 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
-  pPlayer = (Player *)&stru_AA1058[3].pSounds[6972 * v1 + 40552];
+  pPlayer = &pParty->pPlayers[v1-1];//(Player *)&stru_AA1058[3].pSounds[6972 * v1 + 40552];
   v3 = pIcons_LOD->LoadTexture("fr_skill", TEXTURE_16BIT_PALETTE);
   pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v3 != -1 ? (int)&pIcons_LOD->pTextures[v3] : 0));
   v4 = v79;
@@ -214,7 +214,7 @@
     v4 = 65535;
   sprintf(
     pTmpBuf,
-    "%s ",
+    "%s \f%05d%s\f00000\r177%s: \f%05d%d\f00000",
     pGlobalTXT_LocalizationStrings[206],        // Skills for
     a5,
     pPlayer->pName,
@@ -409,7 +409,7 @@
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 248, v27, a5, pTmpBuf, 0, 0, 0);
   v28 = pGUIWindow_CurrentMenu;
   v72 = 0;
-  v82 = dword_4E2A18;
+  v82 = pArmorSkills;
   do
   {
     v29 = 0;
--- 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
--- a/mm7_data.cpp	Sun Jan 20 19:41:05 2013 +0000
+++ b/mm7_data.cpp	Sun Jan 20 20:52:13 2013 +0000
@@ -478,7 +478,7 @@
 __int16 RightClickPortraitXmin[4];
 __int16 RightClickPortraitXmax[4];
 void *off_4E2A12; // weak
-int dword_4E2A18[5]={ 9, 10, 11, 8, 30};
+int pArmorSkills[5]={ 9, 10, 11, 8, 30};
 int dword_4E2A2C[9]={3, 5, 2, 6, 4, 0, 1, 31, 7};
 int dword_4E2A50[12]={35, 33, 24, 21, 32, 36, 29, 25, 22, 26, 23, 34};
 int _4E2A80_skills[9]={12, 13, 14, 15, 16, 17, 18, 19, 20};
--- a/mm7_data.h	Sun Jan 20 19:41:05 2013 +0000
+++ b/mm7_data.h	Sun Jan 20 20:52:13 2013 +0000
@@ -464,7 +464,7 @@
 extern __int16 RightClickPortraitXmin[4];
 extern __int16 RightClickPortraitXmax[4];
 extern void *off_4E2A12; // weak
-extern int dword_4E2A18[5];
+extern int pArmorSkills[5];
 extern int dword_4E2A2C[9];
 extern int dword_4E2A50[12];
 extern int _4E2A80_skills[9];