Mercurial > mm7
comparison mm7_4.cpp @ 832:dfd683c4f538
Hotkeys fixed
Moved GUIButton.h to GUIWindow.h
author | Nomad |
---|---|
date | Wed, 27 Mar 2013 19:50:37 +0200 |
parents | 08d90b633131 |
children | ceef50611567 710cf848ad24 |
comparison
equal
deleted
inserted
replaced
831:9c3f28b31b4a | 832:dfd683c4f538 |
---|---|
4 | 4 |
5 #include "MM7.h" | 5 #include "MM7.h" |
6 #include "MapInfo.h" | 6 #include "MapInfo.h" |
7 #include "Game.h" | 7 #include "Game.h" |
8 #include "GUIWindow.h" | 8 #include "GUIWindow.h" |
9 #include "GUIButton.h" | |
10 #include "GUIFont.h" | 9 #include "GUIFont.h" |
11 #include "Party.h" | 10 #include "Party.h" |
12 #include "AudioPlayer.h" | 11 #include "AudioPlayer.h" |
13 #include "Outdoor.h" | 12 #include "Outdoor.h" |
14 #include "IndoorCamera.h" | 13 #include "IndoorCamera.h" |
7339 { | 7338 { |
7340 v15 = "";//(char *)v54; | 7339 v15 = "";//(char *)v54; |
7341 while ( 1 ) | 7340 while ( 1 ) |
7342 { | 7341 { |
7343 v16 = v52.GetControl(v56); | 7342 v16 = v52.GetControl(v56); |
7344 v17 = v16->uControlParam; | 7343 v17 = v16->msg_param; |
7345 pInString = (char *)v16; | 7344 pInString = (char *)v16; |
7346 if ( (signed int)v17 > 24 ) | 7345 if ( (signed int)v17 > 24 ) |
7347 { | 7346 { |
7348 v24 = v17 - 76; | 7347 v24 = v17 - 76; |
7349 if ( !v24 ) | 7348 if ( !v24 ) |
7396 v23 = v58->evt_F; | 7395 v23 = v58->evt_F; |
7397 LABEL_33: | 7396 LABEL_33: |
7398 v15 = (char *)pNPCTopics[v23-1].pTopic;//(&dword_721660)[8 * v23]; | 7397 v15 = (char *)pNPCTopics[v23-1].pTopic;//(&dword_721660)[8 * v23]; |
7399 if ( !v15 ) | 7398 if ( !v15 ) |
7400 { | 7399 { |
7401 v16->uControlParam = 0; | 7400 v16->msg_param = 0; |
7402 v15 = ""; | 7401 v15 = ""; |
7403 } | 7402 } |
7404 goto LABEL_49; | 7403 goto LABEL_49; |
7405 } | 7404 } |
7406 v18 = v17 - 13; | 7405 v18 = v17 - 13; |
7416 if ( !v20 ) | 7415 if ( !v20 ) |
7417 { | 7416 { |
7418 v15 = (char *)pNPCTopics[v58->evt_B-1].pTopic;//(&dword_721660)[8 * v58->evtb]; | 7417 v15 = (char *)pNPCTopics[v58->evt_B-1].pTopic;//(&dword_721660)[8 * v58->evtb]; |
7419 if ( !v15 ) | 7418 if ( !v15 ) |
7420 { | 7419 { |
7421 v16->uControlParam = 0; | 7420 v16->msg_param = 0; |
7422 v15 = ""; | 7421 v15 = ""; |
7423 } | 7422 } |
7424 if ( uDialogueType != 84 ) | 7423 if ( uDialogueType != 84 ) |
7425 goto LABEL_49; | 7424 goto LABEL_49; |
7426 sprintf(pTmpBuf, format_4E2D80, v55, pItemsTable->pItems[contract_approved].pUnidentifiedName); | 7425 sprintf(pTmpBuf, format_4E2D80, v55, pItemsTable->pItems[contract_approved].pUnidentifiedName); |
7535 } | 7534 } |
7536 | 7535 |
7537 //----- (004B36CC) -------------------------------------------------------- | 7536 //----- (004B36CC) -------------------------------------------------------- |
7538 void CreateButtonInColumn( int column_pos, unsigned int control_id ) | 7537 void CreateButtonInColumn( int column_pos, unsigned int control_id ) |
7539 { | 7538 { |
7540 pDialogueWindow->CreateButton( 480, 30 * column_pos + 146, 140, 30, 1, 0, 0x195u, control_id, 0, "", 0); | 7539 pDialogueWindow->CreateButton( 480, 30 * column_pos + 146, 140, 30, 1, 0, UIMSG_SelectShopDialogueOption, control_id, 0, "", 0); |
7541 } | 7540 } |
7542 | 7541 |
7543 //----- (004B3A72) -------------------------------------------------------- | 7542 //----- (004B3A72) -------------------------------------------------------- |
7544 void sub_4B3A72( int a1 ) | 7543 void sub_4B3A72( int a1 ) |
7545 { | 7544 { |
7796 pDialogueWindow->eWindowType = WINDOW_MainMenu; | 7795 pDialogueWindow->eWindowType = WINDOW_MainMenu; |
7797 pDialogueWindow->Release(); | 7796 pDialogueWindow->Release(); |
7798 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Dialogue, 1, 0); | 7797 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Dialogue, 1, 0); |
7799 if ( pNPCStats->pProfessions[v0->uProfession].pBenefits)//*(&pNPCStats->field_13A5C + 5 * v0->uProfession) ) | 7798 if ( pNPCStats->pProfessions[v0->uProfession].pBenefits)//*(&pNPCStats->field_13A5C + 5 * v0->uProfession) ) |
7800 { | 7799 { |
7801 pDialogueWindow->CreateButton(480, 160, 140, 28, 1, 0, 136, 77, 0, pGlobalTXT_LocalizationStrings[407], 0); | 7800 pDialogueWindow->CreateButton(480, 160, 140, 28, 1, 0, UIMSG_SelectNPCDialogueOption, 77, 0, pGlobalTXT_LocalizationStrings[407], 0); |
7802 v1 = 1; | 7801 v1 = 1; |
7803 } | 7802 } |
7804 pDialogueWindow->CreateButton(480, 30 * v1 + 160, 140, 30, 1, 0, 136, 76, 0, pGlobalTXT_LocalizationStrings[406], 0);//Нанять | 7803 pDialogueWindow->CreateButton(480, 30 * v1 + 160, 140, 30, 1, 0, UIMSG_SelectNPCDialogueOption, 76, 0, pGlobalTXT_LocalizationStrings[406], 0);//Нанять |
7805 pDialogueWindow->_41D08F(v1 + 1, 1, 0, 1); | 7804 pDialogueWindow->_41D08F(v1 + 1, 1, 0, 1); |
7806 } | 7805 } |
7807 | 7806 |
7808 //----- (004B3EF0) -------------------------------------------------------- | 7807 //----- (004B3EF0) -------------------------------------------------------- |
7809 void DrawJoinGuildWindow( int pEventCode ) | 7808 void DrawJoinGuildWindow( int pEventCode ) |
7811 uDialogueType = 81;//enum JoinGuildDialog | 7810 uDialogueType = 81;//enum JoinGuildDialog |
7812 current_npc_text = (char *)pNPCTopics[pEventCode + 99].pText; | 7811 current_npc_text = (char *)pNPCTopics[pEventCode + 99].pText; |
7813 ContractSelectText(pEventCode); | 7812 ContractSelectText(pEventCode); |
7814 pDialogueWindow->Release(); | 7813 pDialogueWindow->Release(); |
7815 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15E, WINDOW_MainMenu, pEventCode, 0); | 7814 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15E, WINDOW_MainMenu, pEventCode, 0); |
7816 pBtn_ExitCancel = pDialogueWindow->CreateButton(0x1D7, 0x1BD, 0xA9, 0x23, 1, 0, 0x71, 0, 0, pGlobalTXT_LocalizationStrings[34], | 7815 pBtn_ExitCancel = pDialogueWindow->CreateButton(0x1D7, 0x1BD, 0xA9, 0x23, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34], // Cancel |
7817 (Texture *)(uExitCancelTextureId != -1 ? &pIcons_LOD->pTextures[uExitCancelTextureId] : 0), 0); | 7816 pIcons_LOD->GetTexture(uExitCancelTextureId), 0); |
7818 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, 0x51u, 0, 0, "", 0); | 7817 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); |
7819 pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, 0xAFu, 0x52u, 0, pGlobalTXT_LocalizationStrings[122], 0); | 7818 pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x52u, 0, pGlobalTXT_LocalizationStrings[122], 0); |
7820 pDialogueWindow->_41D08F(1, 1, 0, 2); | 7819 pDialogueWindow->_41D08F(1, 1, 0, 2); |
7821 dialog_menu_id = HOUSE_DIALOGUE_OTHER; | 7820 dialog_menu_id = HOUSE_DIALOGUE_OTHER; |
7822 } | 7821 } |
7823 // F8B19C: using guessed type int dword_F8B19C; | 7822 // F8B19C: using guessed type int dword_F8B19C; |
7824 | 7823 |
7833 current_npc_text = (char *)pNPCTopics[a4 + 168].pText; | 7832 current_npc_text = (char *)pNPCTopics[a4 + 168].pText; |
7834 _4B254D_SkillMasteryTeacher(a4); | 7833 _4B254D_SkillMasteryTeacher(a4); |
7835 pDialogueWindow->Release(); | 7834 pDialogueWindow->Release(); |
7836 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15Eu, WINDOW_MainMenu, v1, 0); | 7835 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15Eu, WINDOW_MainMenu, v1, 0); |
7837 v2 = ""; | 7836 v2 = ""; |
7838 pBtn_ExitCancel = pDialogueWindow->CreateButton( 0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, | 7837 pBtn_ExitCancel = pDialogueWindow->CreateButton( 0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0, |
7839 pGlobalTXT_LocalizationStrings[34], | 7838 pGlobalTXT_LocalizationStrings[34], |
7840 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), | 7839 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), |
7841 0); | 7840 0); |
7842 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, 0x51u, 0, 0, "", 0); | 7841 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); |
7843 if ( contract_approved ) | 7842 if ( contract_approved ) |
7844 v2 = pGlobalTXT_LocalizationStrings[535]; | 7843 v2 = pGlobalTXT_LocalizationStrings[535]; |
7845 pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, 0xAFu, 0x4Fu, 0, v2, 0); | 7844 pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Fu, 0, v2, 0); |
7846 pDialogueWindow->_41D08F(1, 1, 0, 2); | 7845 pDialogueWindow->_41D08F(1, 1, 0, 2); |
7847 dialog_menu_id = HOUSE_DIALOGUE_OTHER; | 7846 dialog_menu_id = HOUSE_DIALOGUE_OTHER; |
7848 } | 7847 } |
7849 // F8B19C: using guessed type int dword_F8B19C; | 7848 // F8B19C: using guessed type int dword_F8B19C; |
7850 // F8B1A8: using guessed type int dword_F8B1A8; | 7849 // F8B1A8: using guessed type int dword_F8B1A8; |
7857 | 7856 |
7858 v0 = 0; | 7857 v0 = 0; |
7859 v1 = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) - 1)]; | 7858 v1 = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) - 1)]; |
7860 pDialogueWindow->Release(); | 7859 pDialogueWindow->Release(); |
7861 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15Eu, WINDOW_MainMenu, 0, 0); | 7860 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15Eu, WINDOW_MainMenu, 0, 0); |
7862 pBtn_ExitCancel = pDialogueWindow->CreateButton( 0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, | 7861 pBtn_ExitCancel = pDialogueWindow->CreateButton( 0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0, |
7863 pGlobalTXT_LocalizationStrings[34], //"Cancel" | 7862 pGlobalTXT_LocalizationStrings[34], //"Cancel" |
7864 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), | 7863 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), |
7865 0); | 7864 0); |
7866 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, 0x51u, 0, 0, "", 0); | 7865 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); |
7867 if ( pNPCStats->pProfessions[v1->uProfession].pBenefits)//*(&pNPCStats->field_13A5C + 5 * v1->uProfession) ) | 7866 if ( pNPCStats->pProfessions[v1->uProfession].pBenefits)//*(&pNPCStats->field_13A5C + 5 * v1->uProfession) ) |
7868 { | 7867 { |
7869 pDialogueWindow->CreateButton( 0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, 0xAFu, 0x4Du, 0, | 7868 pDialogueWindow->CreateButton( 0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Du, 0, |
7870 pGlobalTXT_LocalizationStrings[407], 0);//"More Information" | 7869 pGlobalTXT_LocalizationStrings[407], 0);//"More Information" |
7871 v0 = 1; | 7870 v0 = 1; |
7872 } | 7871 } |
7873 pDialogueWindow->CreateButton( 0x1E0u, 30 * v0 + 160, 0x8Cu, 0x1Eu, 1, 0, 0xAFu, 0x4Cu, 0, | 7872 pDialogueWindow->CreateButton( 0x1E0u, 30 * v0 + 160, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Cu, 0, |
7874 pGlobalTXT_LocalizationStrings[406], 0); //"Hire" | 7873 pGlobalTXT_LocalizationStrings[406], 0); //"Hire" |
7875 pDialogueWindow->_41D08F(v0 + 1, 1, 0, 2); | 7874 pDialogueWindow->_41D08F(v0 + 1, 1, 0, 2); |
7876 dialog_menu_id = HOUSE_DIALOGUE_OTHER; | 7875 dialog_menu_id = HOUSE_DIALOGUE_OTHER; |
7877 } | 7876 } |
7878 | 7877 |
7895 if ( _this + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic ) | 7894 if ( _this + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic ) |
7896 { | 7895 { |
7897 pDialogueWindow->Release(); | 7896 pDialogueWindow->Release(); |
7898 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); | 7897 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); |
7899 sprintfex(sHouseName, pGlobalTXT_LocalizationStrings[LOCSTR_ENTER_S], pMapStats->pInfos[uHouse_ExitPic].pName); | 7898 sprintfex(sHouseName, pGlobalTXT_LocalizationStrings[LOCSTR_ENTER_S], pMapStats->pInfos[uHouse_ExitPic].pName); |
7900 pBtn_ExitCancel = pDialogueWindow->CreateButton( 566, 445, 75, 33, 1, 0, 0x71u, 0, 0x4Eu, | 7899 pBtn_ExitCancel = pDialogueWindow->CreateButton( 566, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 0x4Eu, |
7901 pGlobalTXT_LocalizationStrings[34],// "Cancel" | 7900 pGlobalTXT_LocalizationStrings[34],// "Cancel" |
7902 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0),0); | 7901 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0),0); |
7903 pBtn_YES = pDialogueWindow->CreateButton( 486u, 445u, 75u, 33u, 1, 0, 0xBFu, 1u, 0x59u, | 7902 pBtn_YES = pDialogueWindow->CreateButton( 486u, 445u, 75u, 33u, 1, 0, UIMSG_BF, 1u, 0x59u, |
7904 sHouseName, | 7903 sHouseName, |
7905 (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0); | 7904 (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0); |
7906 pDialogueWindow->CreateButton( pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63u, 73u, 1, 0, 0xBFu, 1u, 0x20u, sHouseName, 0); | 7905 pDialogueWindow->CreateButton( pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63u, 73u, 1, 0, UIMSG_BF, 1u, 0x20u, sHouseName, 0); |
7907 pDialogueWindow->CreateButton(8u, 8u, 460u, 344u, 1, 0, 0xBFu, 1u, 0x59u, sHouseName, 0); | 7906 pDialogueWindow->CreateButton(8u, 8u, 460u, 344u, 1, 0, UIMSG_BF, 1u, 0x59u, sHouseName, 0); |
7908 } | 7907 } |
7909 else | 7908 else |
7910 { | 7909 { |
7911 v17 = HouseNPCData[_this + 1 - ((dword_591080 != 0) + 1)]; | 7910 v17 = HouseNPCData[_this + 1 - ((dword_591080 != 0) + 1)]; |
7912 if ( dialog_menu_id == HOUSE_DIALOGUE_OTHER ) | 7911 if ( dialog_menu_id == HOUSE_DIALOGUE_OTHER ) |
7917 { | 7916 { |
7918 for ( i = 0; i < uNumDialogueNPCPortraits; ++i ) | 7917 for ( i = 0; i < uNumDialogueNPCPortraits; ++i ) |
7919 ((GUIButton *)HouseNPCData[i + 7])->Release(); | 7918 ((GUIButton *)HouseNPCData[i + 7])->Release(); |
7920 } | 7919 } |
7921 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0); | 7920 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0); |
7922 pBtn_ExitCancel = pDialogueWindow->CreateButton( 471u, 445u, 169u, 35u, 1, 0, 0x71u, 0, 0, | 7921 pBtn_ExitCancel = pDialogueWindow->CreateButton( 471u, 445u, 169u, 35u, 1, 0, UIMSG_Escape, 0, 0, |
7923 pGlobalTXT_LocalizationStrings[74],// "End Conversation" | 7922 pGlobalTXT_LocalizationStrings[74],// "End Conversation" |
7924 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), 0); | 7923 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), 0); |
7925 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, 0x51u, 0, 0, "", 0); | 7924 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); |
7926 if ( pDialogueNPCCount == 1 && dword_591080 ) | 7925 if ( pDialogueNPCCount == 1 && dword_591080 ) |
7927 { | 7926 { |
7928 sub_4B3B42(in_current_building_type); | 7927 sub_4B3B42(in_current_building_type); |
7929 } | 7928 } |
7930 else | 7929 else |
7931 { | 7930 { |
7932 if ( v17->joins ) | 7931 if ( v17->joins ) |
7933 { | 7932 { |
7934 num_menu_buttons = 1; | 7933 num_menu_buttons = 1; |
7935 pDialogueWindow->CreateButton(480u, 160u, 140u, 30u, 1, 0, 0xAFu, 0xDu, 0, "", 0); | 7934 pDialogueWindow->CreateButton(480u, 160u, 140u, 30u, 1, 0, UIMSG_ClickNPCTopic, 0xDu, 0, "", 0); |
7936 } | 7935 } |
7937 if ( v17->evt_A) | 7936 if ( v17->evt_A) |
7938 { | 7937 { |
7939 if ( num_menu_buttons < 4 ) | 7938 if ( num_menu_buttons < 4 ) |
7940 { | 7939 { |
7941 v6 = NPC_EventProcessor(v17->evt_A); | 7940 v6 = NPC_EventProcessor(v17->evt_A); |
7942 if ( v6 == 1 || v6 == 2 ) | 7941 if ( v6 == 1 || v6 == 2 ) |
7943 pDialogueWindow->CreateButton( 480u, 30 * num_menu_buttons++ + 160, 140u, 30u, 1, 0, 0xAFu, 0x13u, 0, "", 0); | 7942 pDialogueWindow->CreateButton( 480u, 30 * num_menu_buttons++ + 160, 140u, 30u, 1, 0, UIMSG_ClickNPCTopic, 0x13u, 0, "", 0); |
7944 } | 7943 } |
7945 } | 7944 } |
7946 if ( v17->evt_B ) | 7945 if ( v17->evt_B ) |
7947 { | 7946 { |
7948 if ( num_menu_buttons < 4 ) | 7947 if ( num_menu_buttons < 4 ) |
7949 { | 7948 { |
7950 v8 = NPC_EventProcessor(v17->evt_B); | 7949 v8 = NPC_EventProcessor(v17->evt_B); |
7951 if ( v8 == 1 || v8 == 2 ) | 7950 if ( v8 == 1 || v8 == 2 ) |
7952 pDialogueWindow->CreateButton( 480u, 30 * num_menu_buttons++ + 160, 140u, 30u, 1, 0, 0xAFu, 0x14u, 0, "", 0); | 7951 pDialogueWindow->CreateButton( 480u, 30 * num_menu_buttons++ + 160, 140u, 30u, 1, 0, UIMSG_ClickNPCTopic, 0x14u, 0, "", 0); |
7953 } | 7952 } |
7954 } | 7953 } |
7955 if ( v17->evt_C ) | 7954 if ( v17->evt_C ) |
7956 { | 7955 { |
7957 if ( num_menu_buttons < 4 ) | 7956 if ( num_menu_buttons < 4 ) |
7958 { | 7957 { |
7959 v10 = NPC_EventProcessor(v17->evt_C); | 7958 v10 = NPC_EventProcessor(v17->evt_C); |
7960 if ( v10 == 1 || v10 == 2 ) | 7959 if ( v10 == 1 || v10 == 2 ) |
7961 pDialogueWindow->CreateButton( 480u, 30 * num_menu_buttons++ + 160, 140u, 30u, 1, 0, 0xAFu, 0x15u, 0, "", 0); | 7960 pDialogueWindow->CreateButton( 480u, 30 * num_menu_buttons++ + 160, 140u, 30u, 1, 0, UIMSG_ClickNPCTopic, 0x15u, 0, "", 0); |
7962 } | 7961 } |
7963 } | 7962 } |
7964 | 7963 |
7965 if ( v17->evt_D ) | 7964 if ( v17->evt_D ) |
7966 { | 7965 { |
7967 if ( num_menu_buttons < 4 ) | 7966 if ( num_menu_buttons < 4 ) |
7968 { | 7967 { |
7969 v12 = NPC_EventProcessor(v17->evt_D); | 7968 v12 = NPC_EventProcessor(v17->evt_D); |
7970 if ( v12 == 1 || v12 == 2 ) | 7969 if ( v12 == 1 || v12 == 2 ) |
7971 pDialogueWindow->CreateButton( 0x1E0u, 30 * num_menu_buttons++ + 160, 0x8Cu, 0x1Eu, 1, 0, 0xAFu, 0x16u, 0, "", 0); | 7970 pDialogueWindow->CreateButton( 0x1E0u, 30 * num_menu_buttons++ + 160, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x16u, 0, "", 0); |
7972 } | 7971 } |
7973 } | 7972 } |
7974 if ( v17->evt_E ) | 7973 if ( v17->evt_E ) |
7975 { | 7974 { |
7976 if ( num_menu_buttons < 4 ) | 7975 if ( num_menu_buttons < 4 ) |
7977 { | 7976 { |
7978 v14 = NPC_EventProcessor(v17->evt_E); | 7977 v14 = NPC_EventProcessor(v17->evt_E); |
7979 if ( v14 == 1 || v14 == 2 ) | 7978 if ( v14 == 1 || v14 == 2 ) |
7980 pDialogueWindow->CreateButton( 0x1E0u, 30 * num_menu_buttons++ + 160, 0x8Cu, 0x1Eu, 1, 0, 0xAFu, 0x17u, 0, "", 0); | 7979 pDialogueWindow->CreateButton( 0x1E0u, 30 * num_menu_buttons++ + 160, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x17u, 0, "", 0); |
7981 } | 7980 } |
7982 } | 7981 } |
7983 if ( v17->evt_F ) | 7982 if ( v17->evt_F ) |
7984 { | 7983 { |
7985 if ( num_menu_buttons < 4 ) | 7984 if ( num_menu_buttons < 4 ) |
7986 { | 7985 { |
7987 v16 = NPC_EventProcessor(v17->evt_F); | 7986 v16 = NPC_EventProcessor(v17->evt_F); |
7988 if ( v16 == 1 || v16 == 2 ) | 7987 if ( v16 == 1 || v16 == 2 ) |
7989 pDialogueWindow->CreateButton( 0x1E0u, 30 * num_menu_buttons++ + 160, 0x8Cu, 0x1Eu, 1, 0, 0xAFu, 0x18u, 0, "", 0); | 7988 pDialogueWindow->CreateButton( 0x1E0u, 30 * num_menu_buttons++ + 160, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x18u, 0, "", 0); |
7990 } | 7989 } |
7991 } | 7990 } |
7992 pDialogueWindow->_41D08F(num_menu_buttons, 1, 0, 2); | 7991 pDialogueWindow->_41D08F(num_menu_buttons, 1, 0, 2); |
7993 dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; | 7992 dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; |
7994 } | 7993 } |
8479 v35 = pDialogueWindow->pStartingPosActiveItem; | 8478 v35 = pDialogueWindow->pStartingPosActiveItem; |
8480 if ( v9 >= v10 ) | 8479 if ( v9 >= v10 ) |
8481 goto LABEL_40; | 8480 goto LABEL_40; |
8482 do | 8481 do |
8483 { | 8482 { |
8484 v11 = v8->GetControl(v35)->uControlParam - 36; | 8483 v11 = v8->GetControl(v35)->msg_param - 36; |
8485 if ( byte_4ED970_skill_learn_ability_by_class_table[v1->classType / 3][v11] && !v1->pActiveSkills[v11] ) | 8484 if ( byte_4ED970_skill_learn_ability_by_class_table[v1->classType / 3][v11] && !v1->pActiveSkills[v11] ) |
8486 { | 8485 { |
8487 v12 = pFontArrus->CalcTextHeight(pSkillNames[v11], &v28, 0, 0); | 8486 v12 = pFontArrus->CalcTextHeight(pSkillNames[v11], &v28, 0, 0); |
8488 v33 += v12; | 8487 v33 += v12; |
8489 ++v34; | 8488 ++v34; |
8515 { | 8514 { |
8516 v33 = 2; | 8515 v33 = 2; |
8517 do | 8516 do |
8518 { | 8517 { |
8519 v14 = v8->GetControl(v35); | 8518 v14 = v8->GetControl(v35); |
8520 v15 = v14->uControlParam - 36; | 8519 v15 = v14->msg_param - 36; |
8521 if ( byte_4ED970_skill_learn_ability_by_class_table[v1->classType / 3][v15] ) | 8520 if ( byte_4ED970_skill_learn_ability_by_class_table[v1->classType / 3][v15] ) |
8522 { | 8521 { |
8523 v16 = 0; | 8522 v16 = 0; |
8524 if ( !v1->pActiveSkills[v15] ) | 8523 if ( !v1->pActiveSkills[v15] ) |
8525 { | 8524 { |