Mercurial > mm7
comparison mm7_2.cpp @ 651:2bf48d11d742
Training hall UI fixed
author | Nomad |
---|---|
date | Tue, 12 Mar 2013 03:10:35 +0200 |
parents | 14d13880daa9 |
children | 28109e4eee44 9824e2eeee30 |
comparison
equal
deleted
inserted
replaced
650:14d13880daa9 | 651:2bf48d11d742 |
---|---|
822 0); | 822 0); |
823 return pDialogueWindow->CreateButton(8, 8, 450, 320, 1, 0, 0x51u, 0, 0, "", 0); | 823 return pDialogueWindow->CreateButton(8, 8, 450, 320, 1, 0, 0x51u, 0, 0, "", 0); |
824 } | 824 } |
825 | 825 |
826 //----- (004BCACC) -------------------------------------------------------- | 826 //----- (004BCACC) -------------------------------------------------------- |
827 void __fastcall DrawLearnSkillDialog(signed int uMessageParam) | 827 void __fastcall OnSelectShopDialogueOption(signed int uMessageParam) |
828 { | 828 { |
829 unsigned int v1; // edi@1 | 829 //unsigned int v1; // edi@1 |
830 //signed int v2; // ebx@1 | 830 //signed int v2; // ebx@1 |
831 //signed int v3; // ecx@2 | 831 //signed int v3; // ecx@2 |
832 int v4; // eax@5 | 832 int v4; // eax@5 |
833 signed int v5; // esi@5 | 833 signed int v5; // esi@5 |
834 //Player *v6; // ecx@5 | 834 //Player *v6; // ecx@5 |
881 signed int v53; // edi@260 | 881 signed int v53; // edi@260 |
882 int v54; // eax@262 | 882 int v54; // eax@262 |
883 //signed int v55; // [sp+10h] [bp-10h]@1 | 883 //signed int v55; // [sp+10h] [bp-10h]@1 |
884 int v56; // [sp+14h] [bp-Ch]@31 | 884 int v56; // [sp+14h] [bp-Ch]@31 |
885 | 885 |
886 v1 = 0; | 886 //v1 = 0; |
887 //v2 = a1; | 887 //v2 = a1; |
888 //v55 = a1; | 888 //v55 = a1; |
889 if ( !pDialogueWindow->pNumPresenceButton ) | 889 if ( !pDialogueWindow->pNumPresenceButton ) |
890 return; | 890 return; |
891 pRenderer->ClearZBuffer(0, 479); | 891 pRenderer->ClearZBuffer(0, 479); |
908 { | 908 { |
909 do | 909 do |
910 v4 += v5++ + 1; | 910 v4 += v5++ + 1; |
911 while ( v5 < pPlayers[uActiveCharacter]->uLevel ); | 911 while ( v5 < pPlayers[uActiveCharacter]->uLevel ); |
912 } | 912 } |
913 if ( pPlayers[uActiveCharacter]->uLevel < (unsigned __int16)word_4F0866[(unsigned int)window_SpeakInHouse->ptr_1C] | 913 if (pPlayers[uActiveCharacter]->uLevel < pMaxLevelPerTrainingHallType[(unsigned int)window_SpeakInHouse->ptr_1C - 89] && |
914 && (signed __int64)pPlayers[uActiveCharacter]->uExperience < 1000 * v4 ) | 914 (signed __int64)pPlayers[uActiveCharacter]->uExperience < 1000 * v4) |
915 return; | 915 return; |
916 } | 916 } |
917 pDialogueWindow->Release(); | 917 pDialogueWindow->Release(); |
918 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, v1, v1); | 918 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0); |
919 pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, v1, 0x71u, v1, v1, pGlobalTXT_LocalizationStrings[74],// "End Conversation" | 919 pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[74],// "End Conversation" |
920 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), v1); | 920 pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); |
921 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, v1, 0x51u, v1, v1, "", (Texture *)v1); | 921 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, 0x51u, 0, 0, "", nullptr); |
922 // LABEL_10: | 922 // LABEL_10: |
923 //v3 = dword_F8B198; | 923 //v3 = dword_F8B198; |
924 v8 = window_SpeakInHouse; | 924 v8 = window_SpeakInHouse; |
925 } | 925 } |
926 else | 926 else |
927 { | 927 { |
928 v8 = window_SpeakInHouse; | 928 v8 = window_SpeakInHouse; |
929 if ( (in_current_building_type == BildingType_Stables || in_current_building_type == BildingType_Boats) | 929 if ( (in_current_building_type == BildingType_Stables || in_current_building_type == BildingType_Boats) |
930 && (v1 = 0, *(&byte_4F09B1[32 * (unsigned __int8)*(&byte_4F0CCF[4 * (unsigned int)window_SpeakInHouse->ptr_1C] + uMessageParam)] + pParty->uDaysPlayed % 7)) | 930 && (*(&byte_4F09B1[32 * (unsigned __int8)*(&byte_4F0CCF[4 * (unsigned int)window_SpeakInHouse->ptr_1C] + uMessageParam)] + pParty->uDaysPlayed % 7)) |
931 || in_current_building_type != BildingType_Temple || uMessageParam != BildingType_MindGuild ) | 931 || in_current_building_type != BildingType_Temple || uMessageParam != BildingType_MindGuild ) |
932 { | 932 { |
933 //LABEL_9: | 933 //LABEL_9: |
934 pDialogueWindow->Release(); | 934 pDialogueWindow->Release(); |
935 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, v1, v1); | 935 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0); |
936 pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, v1, 0x71u, v1, v1, pGlobalTXT_LocalizationStrings[74],// "End Conversation" | 936 pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[74],// "End Conversation" |
937 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), v1); | 937 pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); |
938 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, v1, 0x51u, v1, v1, "", (Texture *)v1); | 938 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, 0x51u, 0, 0, "", nullptr); |
939 // LABEL_10: | 939 // LABEL_10: |
940 //v3 = dword_F8B198; | 940 //v3 = dword_F8B198; |
941 v8 = window_SpeakInHouse; | 941 v8 = window_SpeakInHouse; |
942 } | 942 } |
943 else if ( uActiveCharacter != v1 ) | 943 else if (uActiveCharacter) |
944 { | 944 { |
945 if ( !pPlayers[uActiveCharacter]->_4B6FF9() ) | 945 if ( !pPlayers[uActiveCharacter]->_4B6FF9() ) |
946 return; | 946 return; |
947 v8 = window_SpeakInHouse; | 947 v8 = window_SpeakInHouse; |
948 } | 948 } |
971 } | 971 } |
972 else | 972 else |
973 { | 973 { |
974 if ( in_current_building_type != BildingType_Tavern ) | 974 if ( in_current_building_type != BildingType_Tavern ) |
975 { | 975 { |
976 if ( in_current_building_type <= (signed int)v1 ) | 976 if (in_current_building_type <= 0) |
977 return; | 977 return; |
978 if ( in_current_building_type > BildingType_AlchemistShop ) | 978 if ( in_current_building_type > BildingType_AlchemistShop ) |
979 { | 979 { |
980 if ( in_current_building_type <= BildingType_16 ) | 980 if ( in_current_building_type <= BildingType_16 ) |
981 { | 981 { |
1182 v26 = pParty->field_750[v25]; | 1182 v26 = pParty->field_750[v25]; |
1183 v27 = pParty->field_75A[v25] == v13; | 1183 v27 = pParty->field_75A[v25] == v13; |
1184 word_F8B1A0 = pParty->field_750[v25]; | 1184 word_F8B1A0 = pParty->field_750[v25]; |
1185 if ( v27 ) | 1185 if ( v27 ) |
1186 { | 1186 { |
1187 v1 = 0; | 1187 //v1 = 0; |
1188 v27 = v26 == v13; | 1188 v27 = v26 == v13; |
1189 v29 = (int)pNPCTopics[351].pText; | 1189 v29 = (int)pNPCTopics[351].pText; |
1190 if ( v27 ) | 1190 if ( v27 ) |
1191 v29 = (int)pNPCTopics[353].pText; | 1191 v29 = (int)pNPCTopics[353].pText; |
1192 dword_F8B1A4 = (char *)v29; | 1192 dword_F8B1A4 = (char *)v29; |
1205 while ( (signed int)v28 < (signed int)pParty->pHirelings ); | 1205 while ( (signed int)v28 < (signed int)pParty->pHirelings ); |
1206 pParty->uNumBountiesCollected += 100 * pMonsterStats->pInfos[pParty->field_750[v25]].uLevel; | 1206 pParty->uNumBountiesCollected += 100 * pMonsterStats->pInfos[pParty->field_750[v25]].uLevel; |
1207 pParty->field_750[v25] = v13; | 1207 pParty->field_750[v25] = v13; |
1208 pParty->field_75A[v25] = v13; | 1208 pParty->field_75A[v25] = v13; |
1209 } | 1209 } |
1210 v1 = 0; | 1210 //v1 = 0; |
1211 dword_F8B1A4 = pNPCTopics[352].pText; | 1211 dword_F8B1A4 = pNPCTopics[352].pText; |
1212 } | 1212 } |
1213 } | 1213 } |
1214 else if ( uMessageParam == 100 ) | 1214 else if ( uMessageParam == 100 ) |
1215 { | 1215 { |
1245 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)29; | 1245 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)29; |
1246 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v1; | 1246 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v1; |
1247 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1; | 1247 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1; |
1248 ++pMessageQueue_50CBD0->uNumMessages; | 1248 ++pMessageQueue_50CBD0->uNumMessages; |
1249 }*/ | 1249 }*/ |
1250 pMessageQueue_50CBD0->AddMessage(UIMSG_PlayArcomage, v1, v1); | 1250 pMessageQueue_50CBD0->AddMessage(UIMSG_PlayArcomage, 0, 0); |
1251 dialog_menu_id = 104; | 1251 dialog_menu_id = 104; |
1252 break; | 1252 break; |
1253 } | 1253 } |
1254 return; | 1254 return; |
1255 } | 1255 } |