Mercurial > mm7
comparison mm7_4.cpp @ 948:5a2dbb00c399
Code cleaning.
author | Nomad |
---|---|
date | Wed, 01 May 2013 17:31:10 +0200 |
parents | 4dd4184d4248 |
children | c0d0656aa662 |
comparison
equal
deleted
inserted
replaced
947:99aa9c8464cf | 948:5a2dbb00c399 |
---|---|
7800 uDialogueType = 81;//enum JoinGuildDialog | 7800 uDialogueType = 81;//enum JoinGuildDialog |
7801 current_npc_text = (char *)pNPCTopics[pEventCode + 99].pText; | 7801 current_npc_text = (char *)pNPCTopics[pEventCode + 99].pText; |
7802 ContractSelectText(pEventCode); | 7802 ContractSelectText(pEventCode); |
7803 pDialogueWindow->Release(); | 7803 pDialogueWindow->Release(); |
7804 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15E, WINDOW_MainMenu, pEventCode, 0); | 7804 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15E, WINDOW_MainMenu, pEventCode, 0); |
7805 pBtn_ExitCancel = pDialogueWindow->CreateButton(0x1D7, 0x1BD, 0xA9, 0x23, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34], // Cancel | 7805 pBtn_ExitCancel = pDialogueWindow->CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uExitCancelTextureId), 0); // Cancel |
7806 pIcons_LOD->GetTexture(uExitCancelTextureId), 0); | 7806 pDialogueWindow->CreateButton( 0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); |
7807 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); | 7807 pDialogueWindow->CreateButton(480, 160, 140, 30, 1, 0, UIMSG_ClickNPCTopic, 0x52u, 0, pGlobalTXT_LocalizationStrings[122], 0); |
7808 pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x52u, 0, pGlobalTXT_LocalizationStrings[122], 0); | |
7809 pDialogueWindow->_41D08F(1, 1, 0, 2); | 7808 pDialogueWindow->_41D08F(1, 1, 0, 2); |
7810 dialog_menu_id = HOUSE_DIALOGUE_OTHER; | 7809 dialog_menu_id = HOUSE_DIALOGUE_OTHER; |
7811 } | 7810 } |
7812 // F8B19C: using guessed type int dword_F8B19C; | 7811 // F8B19C: using guessed type int dword_F8B19C; |
7813 | 7812 |
7823 _4B254D_SkillMasteryTeacher(a4); | 7822 _4B254D_SkillMasteryTeacher(a4); |
7824 pDialogueWindow->Release(); | 7823 pDialogueWindow->Release(); |
7825 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15Eu, WINDOW_MainMenu, v1, 0); | 7824 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15Eu, WINDOW_MainMenu, v1, 0); |
7826 v2 = ""; | 7825 v2 = ""; |
7827 pBtn_ExitCancel = pDialogueWindow->CreateButton( 0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0, | 7826 pBtn_ExitCancel = pDialogueWindow->CreateButton( 0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0, |
7828 pGlobalTXT_LocalizationStrings[34], | 7827 pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uExitCancelTextureId), 0); |
7829 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), | |
7830 0); | |
7831 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); | 7828 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); |
7832 if ( contract_approved ) | 7829 if ( contract_approved ) |
7833 v2 = pGlobalTXT_LocalizationStrings[535]; | 7830 v2 = pGlobalTXT_LocalizationStrings[535]; |
7834 pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Fu, 0, v2, 0); | 7831 pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Fu, 0, v2, 0); |
7835 pDialogueWindow->_41D08F(1, 1, 0, 2); | 7832 pDialogueWindow->_41D08F(1, 1, 0, 2); |
7848 v1 = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) - 1)]; | 7845 v1 = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) - 1)]; |
7849 pDialogueWindow->Release(); | 7846 pDialogueWindow->Release(); |
7850 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15Eu, WINDOW_MainMenu, 0, 0); | 7847 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15Eu, WINDOW_MainMenu, 0, 0); |
7851 pBtn_ExitCancel = pDialogueWindow->CreateButton( 0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0, | 7848 pBtn_ExitCancel = pDialogueWindow->CreateButton( 0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0, |
7852 pGlobalTXT_LocalizationStrings[34], //"Cancel" | 7849 pGlobalTXT_LocalizationStrings[34], //"Cancel" |
7853 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), | 7850 pIcons_LOD->GetTexture(uExitCancelTextureId), |
7854 0); | 7851 0); |
7855 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); | 7852 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); |
7856 if ( pNPCStats->pProfessions[v1->uProfession].pBenefits)//*(&pNPCStats->field_13A5C + 5 * v1->uProfession) ) | 7853 if ( pNPCStats->pProfessions[v1->uProfession].pBenefits)//*(&pNPCStats->field_13A5C + 5 * v1->uProfession) ) |
7857 { | 7854 { |
7858 pDialogueWindow->CreateButton( 0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Du, 0, | 7855 pDialogueWindow->CreateButton( 0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Du, 0, |
7884 if ( _this + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic ) | 7881 if ( _this + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic ) |
7885 { | 7882 { |
7886 pDialogueWindow->Release(); | 7883 pDialogueWindow->Release(); |
7887 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); | 7884 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); |
7888 sprintfex(sHouseName, pGlobalTXT_LocalizationStrings[LOCSTR_ENTER_S], pMapStats->pInfos[uHouse_ExitPic].pName); | 7885 sprintfex(sHouseName, pGlobalTXT_LocalizationStrings[LOCSTR_ENTER_S], pMapStats->pInfos[uHouse_ExitPic].pName); |
7889 pBtn_ExitCancel = pDialogueWindow->CreateButton( 566, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 0x4Eu, | 7886 pBtn_ExitCancel = pDialogueWindow->CreateButton(566, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 'N', pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0);// "Cancel" |
7890 pGlobalTXT_LocalizationStrings[34],// "Cancel" | 7887 pBtn_YES = pDialogueWindow->CreateButton(486, 445, 75, 33, 1, 0, UIMSG_BF, 1, 'Y', sHouseName, pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0); |
7891 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0),0); | |
7892 pBtn_YES = pDialogueWindow->CreateButton( 486u, 445u, 75u, 33u, 1, 0, UIMSG_BF, 1u, 0x59u, | |
7893 sHouseName, | |
7894 (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0); | |
7895 pDialogueWindow->CreateButton( pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63u, 73u, 1, 0, UIMSG_BF, 1u, 0x20u, sHouseName, 0); | 7888 pDialogueWindow->CreateButton( pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63u, 73u, 1, 0, UIMSG_BF, 1u, 0x20u, sHouseName, 0); |
7896 pDialogueWindow->CreateButton(8u, 8u, 460u, 344u, 1, 0, UIMSG_BF, 1u, 0x59u, sHouseName, 0); | 7889 pDialogueWindow->CreateButton(8, 8, 460, 344, 1, 0, UIMSG_BF, 1, 0x59u, sHouseName, 0); |
7897 } | 7890 } |
7898 else | 7891 else |
7899 { | 7892 { |
7900 v17 = HouseNPCData[_this + 1 - ((dword_591080 != 0) + 1)]; | 7893 v17 = HouseNPCData[_this + 1 - ((dword_591080 != 0) + 1)]; |
7901 if ( dialog_menu_id == HOUSE_DIALOGUE_OTHER ) | 7894 if ( dialog_menu_id == HOUSE_DIALOGUE_OTHER ) |
7908 ((GUIButton *)HouseNPCData[i + 7])->Release(); | 7901 ((GUIButton *)HouseNPCData[i + 7])->Release(); |
7909 } | 7902 } |
7910 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0); | 7903 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0); |
7911 pBtn_ExitCancel = pDialogueWindow->CreateButton( 471u, 445u, 169u, 35u, 1, 0, UIMSG_Escape, 0, 0, | 7904 pBtn_ExitCancel = pDialogueWindow->CreateButton( 471u, 445u, 169u, 35u, 1, 0, UIMSG_Escape, 0, 0, |
7912 pGlobalTXT_LocalizationStrings[74],// "End Conversation" | 7905 pGlobalTXT_LocalizationStrings[74],// "End Conversation" |
7913 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), 0); | 7906 pIcons_LOD->GetTexture(uExitCancelTextureId), 0); |
7914 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); | 7907 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); |
7915 if ( pDialogueNPCCount == 1 && dword_591080 ) | 7908 if ( pDialogueNPCCount == 1 && dword_591080 ) |
7916 { | 7909 { |
7917 sub_4B3B42(in_current_building_type); | 7910 sub_4B3B42(in_current_building_type); |
7918 } | 7911 } |
9107 | 9100 |
9108 //LABEL_6: | 9101 //LABEL_6: |
9109 v12 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 9102 v12 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
9110 v13 = pHouse_ExitPictures[v10]; | 9103 v13 = pHouse_ExitPictures[v10]; |
9111 pTexture_Dialogue_Background = &pIcons_LOD->pTextures[v12]; | 9104 pTexture_Dialogue_Background = &pIcons_LOD->pTextures[v12]; |
9112 pTexture_outside = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v13, TEXTURE_16BIT_PALETTE)]; | 9105 pTexture_outside = pIcons_LOD->LoadTexturePtr(v13, TEXTURE_16BIT_PALETTE); |
9113 if ( v9 ) | 9106 if ( v9 ) |
9114 { | 9107 { |
9115 if ( !v23 ) | 9108 if ( !v23 ) |
9116 //pVideoPlayer->OpenHouseMovie(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_0, 1u); | 9109 //pVideoPlayer->OpenHouseMovie(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_0, 1u); |
9117 pVideoPlayer->OpenHouseMovie(pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].video_name, 1u); | 9110 pVideoPlayer->OpenHouseMovie(pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].video_name, 1u); |