comparison mm7_5.cpp @ 39:c3a02d80c84c

no skill screen crash
author zipi
date Sun, 20 Jan 2013 19:32:08 +0000
parents c261e0eea3c9
children fc3016f5a07a 7082a3f95e7c
comparison
equal deleted inserted replaced
38:c261e0eea3c9 39:c3a02d80c84c
3312 continue; 3312 continue;
3313 case UIMSG_ChangeMusicVolume|0x2: 3313 case UIMSG_ChangeMusicVolume|0x2:
3314 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 101; 3314 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 101;
3315 sub_4196A0(); 3315 sub_4196A0();
3316 sub_419379(); 3316 sub_419379();
3317 sub_419401(); 3317 CharacterUI_SkillScreen_Draw();
3318 pButton = pCharacterScreen_SkillsBtn; 3318 pButton = pCharacterScreen_SkillsBtn;
3319 //goto LABEL_716; 3319 //goto LABEL_716;
3320 v163 = 0; 3320 v163 = 0;
3321 pButton2 = pButton; 3321 pButton2 = pButton;
3322 pWindowType1 = (WindowType)91; 3322 pWindowType1 = (WindowType)91;
17787 } 17787 }
17788 } 17788 }
17789 17789
17790 17790
17791 //----- (00419401) -------------------------------------------------------- 17791 //----- (00419401) --------------------------------------------------------
17792 void __cdecl sub_419401() 17792 void __cdecl CharacterUI_SkillScreen_Draw()
17793 { 17793 {
17794 unsigned int v0; // ecx@3 17794 unsigned int v0; // ecx@3
17795 GUIButton *pButton; // eax@3 17795 GUIButton *pButton; // eax@3
17796 GUIFont *v2; // eax@8 17796 GUIFont *v2; // eax@8
17797 unsigned int v3; // esi@8 17797 unsigned int v3; // esi@8
17807 int v13; // [sp+14h] [bp-10h]@19 17807 int v13; // [sp+14h] [bp-10h]@19
17808 unsigned int *v14; // [sp+18h] [bp-Ch]@8 17808 unsigned int *v14; // [sp+18h] [bp-Ch]@8
17809 unsigned int *v15; // [sp+18h] [bp-Ch]@14 17809 unsigned int *v15; // [sp+18h] [bp-Ch]@14
17810 unsigned int *v16; // [sp+18h] [bp-Ch]@19 17810 unsigned int *v16; // [sp+18h] [bp-Ch]@19
17811 unsigned int *v17; // [sp+18h] [bp-Ch]@25 17811 unsigned int *v17; // [sp+18h] [bp-Ch]@25
17812 char *v18; // [sp+1Ch] [bp-8h]@8 17812 unsigned short *v18; // [sp+1Ch] [bp-8h]@8
17813 int a5; // [sp+20h] [bp-4h]@8 17813 int a5; // [sp+20h] [bp-4h]@8
17814 17814
17815 a2 = 0; 17815 a2 = 0;
17816 if ( dword_507CC0 ) 17816 if ( dword_507CC0 )
17817 sub_4196A0(); 17817 sub_4196A0();
17832 v0 = uActiveCharacter; 17832 v0 = uActiveCharacter;
17833 } 17833 }
17834 } 17834 }
17835 v12 = 0; 17835 v12 = 0;
17836 a5 = pGUIWindow_CurrentMenu->uNumControls; 17836 a5 = pGUIWindow_CurrentMenu->uNumControls;
17837 v18 = &stru_AA1058[3].pSounds[6972 * v0 + 40552]; 17837 v18 = &pParty->pPlayers[0].pActiveSkills[0]; //&stru_AA1058[3].pSounds[6972 * v0 + 40552];
17838 v2 = pFontLucida; 17838 v2 = pFontLucida;
17839 v14 = (unsigned int *)dword_4E2A2C; 17839 v14 = (unsigned int *)dword_4E2A2C;
17840 v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13; 17840 v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
17841 do 17841 do
17842 { 17842 {
17843 if ( v18[2 * *v14 + 264] & 0x3F )//crash 17843 if ( v18[*v14 + 132] & 0x3F )//crash
17844 { 17844 {
17845 v4 = LOBYTE(v2->uFontHeight); 17845 v4 = LOBYTE(v2->uFontHeight);
17846 v3 = v3 + v4 - 3; 17846 v3 = v3 + v4 - 3;
17847 ++a2; 17847 ++a2;
17848 ++v12; 17848 ++v12;
17856 v3 = v3 + LOBYTE(v2->uFontHeight) - 3; 17856 v3 = v3 + LOBYTE(v2->uFontHeight) - 3;
17857 v15 = (unsigned int *)_4E2A80_skills; 17857 v15 = (unsigned int *)_4E2A80_skills;
17858 v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6; 17858 v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6;
17859 do 17859 do
17860 { 17860 {
17861 if ( v18[2 * *v15 + 264] & 0x3F && a2 < 15 ) 17861 if ( v18[ *v15 + 132] & 0x3F && a2 < 15 )
17862 { 17862 {
17863 v6 = LOBYTE(v2->uFontHeight); 17863 v6 = LOBYTE(v2->uFontHeight);
17864 v5 = v5 + v6 - 3; 17864 v5 = v5 + v6 - 3;
17865 ++a2; 17865 ++a2;
17866 pGUIWindow_CurrentMenu->CreateButton(0x18u, v5, 0xCCu, v6 - 3, 3, *v15 | 0x8000, 0x79u, *v15, 0, "", 0, 0); 17866 pGUIWindow_CurrentMenu->CreateButton(0x18u, v5, 0xCCu, v6 - 3, 3, *v15 | 0x8000, 0x79u, *v15, 0, "", 0, 0);
17867 v2 = pFontLucida; 17867 v2 = pFontLucida;
17868 } 17868 }
17869 ++v15; 17869 ++v15;
17870 } 17870 }
17871 while ( (signed int)v15 < (signed int)pAwardsTextColors ); 17871 while ( (signed int)v15 <= (signed int)_4E2A80_skills[8] );
17872 v13 = 0; 17872 v13 = 0;
17873 v16 = (unsigned int *)dword_4E2A18; 17873 v16 = (unsigned int *)dword_4E2A18;
17874 v7 = 2 * LOBYTE(v2->uFontHeight) + 13; 17874 v7 = 2 * LOBYTE(v2->uFontHeight) + 13;
17875 do 17875 do
17876 { 17876 {
17877 if ( v18[2 * *v16 + 264] & 0x3F ) 17877 if ( v18[ *v16 + 132] & 0x3F )
17878 { 17878 {
17879 v8 = LOBYTE(v2->uFontHeight); 17879 v8 = LOBYTE(v2->uFontHeight);
17880 v7 = v7 + v8 - 3; 17880 v7 = v7 + v8 - 3;
17881 ++a2; 17881 ++a2;
17882 ++v13; 17882 ++v13;
17890 v7 = v7 + LOBYTE(v2->uFontHeight) - 3; 17890 v7 = v7 + LOBYTE(v2->uFontHeight) - 3;
17891 v17 = (unsigned int *)dword_4E2A50; 17891 v17 = (unsigned int *)dword_4E2A50;
17892 v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6; 17892 v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6;
17893 do 17893 do
17894 { 17894 {
17895 if ( v18[2 * *v17 + 264] & 0x3F ) 17895 if ( v18[ *v17 + 132] & 0x3F )
17896 { 17896 {
17897 v10 = LOBYTE(v2->uFontHeight); 17897 v10 = LOBYTE(v2->uFontHeight);
17898 v9 = v9 + v10 - 3; 17898 v9 = v9 + v10 - 3;
17899 ++a2; 17899 ++a2;
17900 pGUIWindow_CurrentMenu->CreateButton(0xF6u, v9, 0xCCu, v10 - 3, 3, *v17 | 0x8000, 0x79u, *v17, 0, "", 0, 0); 17900 pGUIWindow_CurrentMenu->CreateButton(0xF6u, v9, 0xCCu, v10 - 3, 3, *v17 | 0x8000, 0x79u, *v17, 0, "", 0, 0);