changeset 39:c3a02d80c84c

no skill screen crash
author zipi
date Sun, 20 Jan 2013 19:32:08 +0000
parents c261e0eea3c9
children cae8922b867a a3e1017bfc21
files mm7_1.cpp mm7_5.cpp mm7_data.h
diffstat 3 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mm7_1.cpp	Sun Jan 20 18:40:58 2013 +0000
+++ b/mm7_1.cpp	Sun Jan 20 19:32:08 2013 +0000
@@ -1198,7 +1198,7 @@
         if ( dword_507CC0 != uActiveCharacter )
         {
           sub_4196A0();
-          sub_419401();
+          CharacterUI_SkillScreen_Draw();
         }
         sub_419379();
         CharacterUI_SkillsTab_Draw(v1);
--- a/mm7_5.cpp	Sun Jan 20 18:40:58 2013 +0000
+++ b/mm7_5.cpp	Sun Jan 20 19:32:08 2013 +0000
@@ -3314,7 +3314,7 @@
           pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 101;
           sub_4196A0();
           sub_419379();
-          sub_419401();
+          CharacterUI_SkillScreen_Draw();
           pButton = pCharacterScreen_SkillsBtn;
           //goto LABEL_716;
           v163 = 0;
@@ -17789,7 +17789,7 @@
 
 
 //----- (00419401) --------------------------------------------------------
-void __cdecl sub_419401()
+void __cdecl CharacterUI_SkillScreen_Draw()
 {
   unsigned int v0; // ecx@3
   GUIButton *pButton; // eax@3
@@ -17809,7 +17809,7 @@
   unsigned int *v15; // [sp+18h] [bp-Ch]@14
   unsigned int *v16; // [sp+18h] [bp-Ch]@19
   unsigned int *v17; // [sp+18h] [bp-Ch]@25
-  char *v18; // [sp+1Ch] [bp-8h]@8
+  unsigned short *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 = &stru_AA1058[3].pSounds[6972 * v0 + 40552];
+  v18 = &pParty->pPlayers[0].pActiveSkills[0];	  //&stru_AA1058[3].pSounds[6972 * v0 + 40552];
   v2 = pFontLucida;
   v14 = (unsigned int *)dword_4E2A2C;
   v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
   do
   {
-    if ( v18[2 * *v14 + 264] & 0x3F )//crash
+    if ( v18[*v14 + 132] & 0x3F )//crash
     {
       v4 = LOBYTE(v2->uFontHeight);
       v3 = v3 + v4 - 3;
@@ -17858,7 +17858,7 @@
   v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6;
   do
   {
-    if ( v18[2 * *v15 + 264] & 0x3F && a2 < 15 )
+    if ( v18[ *v15 + 132] & 0x3F && a2 < 15 )
     {
       v6 = LOBYTE(v2->uFontHeight);
       v5 = v5 + v6 - 3;
@@ -17868,13 +17868,13 @@
     }
     ++v15;
   }
-  while ( (signed int)v15 < (signed int)pAwardsTextColors );
+  while ( (signed int)v15 <= (signed int)_4E2A80_skills[8] );
   v13 = 0;
   v16 = (unsigned int *)dword_4E2A18;
   v7 = 2 * LOBYTE(v2->uFontHeight) + 13;
   do
   {
-    if ( v18[2 * *v16 + 264] & 0x3F )
+    if ( v18[ *v16 + 132] & 0x3F )
     {
       v8 = LOBYTE(v2->uFontHeight);
       v7 = v7 + v8 - 3;
@@ -17892,7 +17892,7 @@
   v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6;
   do
   {
-    if ( v18[2 * *v17 + 264] & 0x3F )
+    if ( v18[ *v17 + 132] & 0x3F )
     {
       v10 = LOBYTE(v2->uFontHeight);
       v9 = v9 + v10 - 3;
--- a/mm7_data.h	Sun Jan 20 18:40:58 2013 +0000
+++ b/mm7_data.h	Sun Jan 20 19:32:08 2013 +0000
@@ -1860,7 +1860,7 @@
 int __cdecl sub_419100();
 void __cdecl sub_419220();
 void __cdecl sub_419379();
-void __cdecl sub_419401();
+void __cdecl CharacterUI_SkillScreen_Draw();
 void __cdecl sub_4196A0();
 char __fastcall CharacterUI_SkillsTab_Draw(unsigned int uPlayerID); // idb
 unsigned int __fastcall CharacterUI_AwardsTab_Draw(unsigned int uPlayerID); // idb