# HG changeset patch # User Nomad # Date 1363981841 -7200 # Node ID 585490c29945c8666cf880cee735dde918502e4e # Parent 852ec78d95481d037b3cf19b34c42d7b64173724 House dialogue ids appended diff -r 852ec78d9548 -r 585490c29945 Events.cpp --- a/Events.cpp Fri Mar 22 23:46:32 2013 +0600 +++ b/Events.cpp Fri Mar 22 21:50:41 2013 +0200 @@ -1353,7 +1353,7 @@ if ( uGameState == 2 ) { pAudioPlayer->StopChannels(-1, -1); - dialog_menu_id = 0; + dialog_menu_id = HOUSE_DIALOGUE_NULL; while ( sub_4BD8B5() ) ; pVideoPlayer->Unload(); @@ -1365,7 +1365,7 @@ viewparams->bRedrawGameUI = 1; pDialogueNPCCount = 0; pDialogueWindow->Release(); - dialog_menu_id = 0; + dialog_menu_id = HOUSE_DIALOGUE_NULL; pDialogueWindow = 0; pIcons_LOD->_40F9C5(); } diff -r 852ec78d9548 -r 585490c29945 UIHouses.cpp --- a/UIHouses.cpp Fri Mar 22 23:46:32 2013 +0600 +++ b/UIHouses.cpp Fri Mar 22 21:50:41 2013 +0200 @@ -30,6 +30,9 @@ int dword_591080; // weak +int in_current_building_type; // 00F8B198 +HOUSE_DIALOGUE_MENU dialog_menu_id; // 00F8B19C + const stru159 pAnimatedRooms[196] = //0x4E5F70 { {"", 0x4, 0x1F4, 0, 0, 0}, @@ -1036,9 +1039,10 @@ v7 = 1; v83 = 1; } + switch(dialog_menu_id) { - case DIALOG_SHOP_MAIN: + case HOUSE_DIALOGUE_MAIN: { if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) return; @@ -1126,9 +1130,10 @@ } break; } - case DIALOG_SHOP_ARCOMAGE_102: + + case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_102: { - __debugbreak; + __debugbreak(); pOutString = pFontArrus; strcpy(pTmpBuf, pNPCTopics[354].pText); dialog_window.uFrameWidth = 460; @@ -1146,9 +1151,9 @@ window_SpeakInHouse->DrawText(pOutString, 12, 354 - pTextHeight, 0, v63, 0, 0, 0); break; } - case DIALOG_SHOP_ARCOMAGE_103: + case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_103: { - __debugbreak; + __debugbreak(); strcpy(pTmpBuf, pNPCTopics[(uint)window_SpeakInHouse->ptr_1C + 247].pText); dialog_window.uFrameWidth = 460; dialog_window.uFrameZ = 452; @@ -1161,7 +1166,7 @@ window_SpeakInHouse->DrawText(pFontArrus, 12, 354 - pTextHeight, 0, v63, 0, 0, 0); break; } - case DIALOG_SHOP_ARCOMAGE_RESULT: + case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_RESULT: { if ( pArcomageGame->bGameInProgress == 1 ) return; @@ -1181,14 +1186,15 @@ dialog_window.DrawTitleText(pFontArrus, 0, v66, pColorYellow, pTmpBuf, 3); break; } - case DIALOG_SHOP_REST: + + case HOUSE_DIALOGUE_TAVERN_REST: { if ( pParty->uNumGold >= (unsigned int)pOutString ) { Party::TakeGold((unsigned int)pOutString); v27 = (int)window_SpeakInHouse->ptr_1C; PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney); - dialog_menu_id = 0; + dialog_menu_id = HOUSE_DIALOGUE_NULL; sub_4BD8B5(); sub_4B1D27(); pVideoPlayer->Unload(); @@ -1207,7 +1213,8 @@ pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, v5, 0); break; } - case DIALOG_SHOP_SKILLS: + + case HOUSE_DIALOGUE_LEARN_SKILLS: { if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) return; @@ -1280,7 +1287,8 @@ dialog_window.DrawTitleText(pFontArrus, 0, pTextHeight, pColorYellow, pTmpBuf, 3); return; } - case DIALOG_SHOP_BYE_FOOD: + + case HOUSE_DIALOGUE_TAVERN_BUY_FOOD: { *(_QWORD *)Str = pParty->uNumFoodRations; //if ( (double)pParty->uNumFoodRations >= p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C] ) @@ -1306,7 +1314,8 @@ pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, v5, 0); break; } - case DIALOG_SHOP_ARCOMAGE_MAIN: + + case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_MAIN: { if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) { @@ -1466,9 +1475,10 @@ dialog_window.uFrameZ = 334; pColorWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); pColorYellow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); + switch(dialog_menu_id) { - case DIALOG_SHOP_MAIN: + case HOUSE_DIALOGUE_MAIN: { pNumActiveItem = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win(); if ( pNumActiveItem ) @@ -1509,7 +1519,8 @@ } break; } - case DIALOG_SHOP_BUY_STANDART: + + case HOUSE_DIALOGUE_SHOP_BUY_STANDARD: { pRenderer->DrawTextureIndexed(8, 8, ShopTexture); v48 = 0; @@ -1596,7 +1607,8 @@ } break; } - case DIALOG_SHOP_SELL: + + case HOUSE_DIALOGUE_SHOP_SELL: { draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); @@ -1614,7 +1626,8 @@ dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v7, 3); break; } - case DIALOG_SHOP_IDENTIFY: + + case HOUSE_DIALOGUE_SHOP_IDENTIFY: { draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); @@ -1641,7 +1654,8 @@ } break; } - case DIALOG_SHOP_REPAIR: + + case HOUSE_DIALOGUE_SHOP_REPAIR: { draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); @@ -1661,7 +1675,8 @@ return; } break; - case DIALOG_SHOP_DISPLAY_EQUIPMENT: + + case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: { draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); @@ -1699,7 +1714,8 @@ } break; } - case DIALOG_SHOP_BUY_SPECIAL: + + case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: { pRenderer->DrawTextureIndexed(8, 8, ShopTexture); v109 = 0; @@ -1782,7 +1798,8 @@ } break; } - case DIALOG_SHOP_SKILLS: + + case HOUSE_DIALOGUE_LEARN_SKILLS: { if (!sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()) return; @@ -1991,7 +2008,7 @@ pColorYellow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); switch(dialog_menu_id) { - case DIALOG_SHOP_MAIN: + case HOUSE_DIALOGUE_MAIN: { if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) { @@ -2032,7 +2049,7 @@ } return; } - case DIALOG_SHOP_BUY_STANDART: + case HOUSE_DIALOGUE_SHOP_BUY_STANDARD: { pRenderer->DrawTextureIndexed(8, 8, ShopTexture); v114 = 0; @@ -2149,7 +2166,7 @@ } return; } - case DIALOG_SHOP_SELL: + case HOUSE_DIALOGUE_SHOP_SELL: { draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); @@ -2167,7 +2184,7 @@ dialog_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, pColorWhite, v21, 3); return; } - case DIALOG_SHOP_IDENTIFY: + case HOUSE_DIALOGUE_SHOP_IDENTIFY: { draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); @@ -2193,7 +2210,7 @@ dialog_window.DrawTitleText(pFontArrus, 0, (174 - v40) / 2 + 138, pColorWhite, v21, 3); return; } - case DIALOG_SHOP_DISPLAY_EQUIPMENT: + case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: { draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); @@ -2231,7 +2248,7 @@ } return; } - case DIALOG_SHOP_BUY_SPECIAL: + case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: { pRenderer->DrawTextureIndexed(8, 8, ShopTexture); v114 = 0; @@ -2352,7 +2369,7 @@ } return; } - case DIALOG_SHOP_SKILLS: + case HOUSE_DIALOGUE_LEARN_SKILLS: { if (!sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win()) return; @@ -2611,7 +2628,7 @@ hilight_color = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); switch (dialog_menu_id) { - case DIALOG_SHOP_MAIN: + case HOUSE_DIALOGUE_MAIN: { if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) return; @@ -2648,7 +2665,7 @@ } } break; - case DIALOG_SHOP_BUY_STANDART: + case HOUSE_DIALOGUE_SHOP_BUY_STANDARD: { pRenderer->DrawTextureIndexed(8, 8, ShopTexture); textureW = 0; @@ -2728,7 +2745,7 @@ return; } break; - case DIALOG_SHOP_SELL: + case HOUSE_DIALOGUE_SHOP_SELL: { draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); @@ -2750,7 +2767,7 @@ return; } break; - case DIALOG_SHOP_IDENTIFY: + case HOUSE_DIALOGUE_SHOP_IDENTIFY: { draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); @@ -2794,7 +2811,7 @@ } } break; - case DIALOG_SHOP_REPAIR: + case HOUSE_DIALOGUE_SHOP_REPAIR: { draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); @@ -2890,7 +2907,7 @@ return; } break; - case DIALOG_SHOP_DISPLAY_EQUIPMENT: + case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: { draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); @@ -2937,7 +2954,7 @@ return; } break; - case DIALOG_SHOP_BUY_SPECIAL: + case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: { pRenderer->DrawTextureIndexed(8, 8, ShopTexture); v11 = 0; @@ -3027,7 +3044,7 @@ return; } break; - case DIALOG_SHOP_SKILLS: + case HOUSE_DIALOGUE_LEARN_SKILLS: { if (!sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) return; diff -r 852ec78d9548 -r 585490c29945 UIHouses.h --- a/UIHouses.h Fri Mar 22 23:46:32 2013 +0600 +++ b/UIHouses.h Fri Mar 22 21:50:41 2013 +0200 @@ -2,23 +2,41 @@ #include "stru159.h" -enum DIALOG_MENU - { - DIALOG_SHOP_MAIN = 1, - DIALOG_SHOP_BUY_STANDART = 2, - DIALOG_SHOP_SELL = 3, - DIALOG_SHOP_IDENTIFY = 4, - DIALOG_SHOP_REPAIR = 5, - DIALOG_SHOP_REST = 15, - DIALOG_SHOP_BYE_FOOD = 16, - DIALOG_SHOP_DISPLAY_EQUIPMENT = 94, - DIALOG_SHOP_BUY_SPECIAL = 95, - DIALOG_SHOP_SKILLS = 96, - DIALOG_SHOP_ARCOMAGE_MAIN = 101, - DIALOG_SHOP_ARCOMAGE_102 = 102, - DIALOG_SHOP_ARCOMAGE_103 = 103, - DIALOG_SHOP_ARCOMAGE_RESULT = 104, - }; +enum HOUSE_DIALOGUE_MENU: unsigned __int32 +{ + HOUSE_DIALOGUE_NULL = 0, + HOUSE_DIALOGUE_MAIN = 1, + HOUSE_DIALOGUE_SHOP_BUY_STANDARD = 2, + HOUSE_DIALOGUE_SHOP_SELL = 3, + HOUSE_DIALOGUE_SHOP_IDENTIFY = 4, + HOUSE_DIALOGUE_SHOP_REPAIR = 5, + HOUSE_DIALOGUE_6 = 6, + HOUSE_DIALOGUE_7 = 7, + HOUSE_DIALOGUE_8 = 8, + HOUSE_DIALOGUE_9 = 9, + HOUSE_DIALOGUE_TEMPLE_HEAL = 10, + HOUSE_DIALOGUE_TEMPLE_DONATE = 11, + HOUSE_DIALOGUE_12 = 12, + HOUSE_DIALOGUE_13 = 13, + HOUSE_DIALOGUE_14 = 14, + HOUSE_DIALOGUE_TAVERN_REST = 15, + HOUSE_DIALOGUE_TAVERN_BUY_FOOD = 16, + HOUSE_DIALOGUE_17 = 17, + HOUSE_DIALOGUE_GULD_BUY_BOOKS = 18, + //... + HOUSE_DIALOGUE_GUILD_LEARN_SKILL = 72, + //... + HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT = 94, + HOUSE_DIALOGUE_SHOP_BUY_SPECIAL = 95, + HOUSE_DIALOGUE_LEARN_SKILLS = 96, + //... + HOUSE_DIALOGUE_TAVERN_ARCOMAGE_MAIN = 101, + HOUSE_DIALOGUE_TAVERN_ARCOMAGE_102 = 102, + HOUSE_DIALOGUE_TAVERN_ARCOMAGE_103 = 103, + HOUSE_DIALOGUE_TAVERN_ARCOMAGE_RESULT = 104, + + HOUSE_DIALOGUE_OTHER = -1 +}; /* 349 */ enum HOUSE_ID @@ -83,4 +101,6 @@ extern int uHouse_ExitPic; // weak extern int dword_591080; // weak - extern const stru159 pAnimatedRooms[196]; +extern const stru159 pAnimatedRooms[196]; +extern int in_current_building_type; // 00F8B198 +extern HOUSE_DIALOGUE_MENU dialog_menu_id; // 00F8B19C \ No newline at end of file diff -r 852ec78d9548 -r 585490c29945 UiGame.cpp --- a/UiGame.cpp Fri Mar 22 23:46:32 2013 +0600 +++ b/UiGame.cpp Fri Mar 22 21:50:41 2013 +0200 @@ -45,6 +45,7 @@ #include "Events2D.h" #include "texts.h" #include "stru351.h" +#include "UIHouses.h" #include "mm7_data.h" @@ -974,7 +975,7 @@ } if ( pCurrentScreen == SCREEN_HOUSE ) { - if ( dialog_menu_id != 2 + if ( dialog_menu_id != HOUSE_DIALOGUE_SHOP_BUY_STANDARD || (v16 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]], v16 == 0) || v16 == -65536 ) //goto _return; diff -r 852ec78d9548 -r 585490c29945 mm7_1.cpp --- a/mm7_1.cpp Fri Mar 22 23:46:32 2013 +0600 +++ b/mm7_1.cpp Fri Mar 22 21:50:41 2013 +0200 @@ -51,6 +51,7 @@ #include "Events2D.h" #include "texts.h" #include "stru351.h" +#include "UIHouses.h" #include "mm7_data.h" @@ -968,8 +969,9 @@ //goto LABEL_28; uActiveCharacter = uPlayerID; return; - if ( dialog_menu_id == 2 || dialog_menu_id == 6 ) + if (dialog_menu_id == HOUSE_DIALOGUE_SHOP_BUY_STANDARD || dialog_menu_id == HOUSE_DIALOGUE_6) { + __debugbreak(); // fix indexing pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; v5 = 14; //goto LABEL_22; diff -r 852ec78d9548 -r 585490c29945 mm7_2.cpp --- a/mm7_2.cpp Fri Mar 22 23:46:32 2013 +0600 +++ b/mm7_2.cpp Fri Mar 22 21:50:41 2013 +0200 @@ -301,7 +301,7 @@ pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, 0x51u, 0, 0, "", 0); pDialogueWindow->CreateButton(480u, 160u, 140u, 30u, 1, 0, 0, 0x53u, 0, "", 0); pDialogueWindow->_41D08F(1, 1, 0, 2); - dialog_menu_id = -1; + dialog_menu_id = HOUSE_DIALOGUE_OTHER; v0 = (int)((char *)window_SpeakInHouse->ptr_1C - 102); if ( (signed __int64)__PAIR__(pParty->field_3C.field_0[2 * v0 + 1], pParty->field_3C.field_0[2 * v0]) < (signed __int64)pParty->uTimePlayed ) { @@ -949,7 +949,7 @@ } } //LABEL_11: - dialog_menu_id = uMessageParam; + dialog_menu_id = (HOUSE_DIALOGUE_MENU)uMessageParam; if ( in_current_building_type < BildingType_19 ) { v9 = pIcons_LOD->LoadTexture(off_4F03B8[in_current_building_type], TEXTURE_16BIT_PALETTE); @@ -1524,7 +1524,7 @@ case 102: case 103: { - dialog_menu_id = uMessageParam; + dialog_menu_id = (HOUSE_DIALOGUE_MENU)uMessageParam; break; } case 104: @@ -1537,7 +1537,7 @@ ++pMessageQueue_50CBD0->uNumMessages; }*/ pMessageQueue_50CBD0->AddMessage(UIMSG_PlayArcomage, 0, 0); - dialog_menu_id = 104; + dialog_menu_id = HOUSE_DIALOGUE_TAVERN_ARCOMAGE_RESULT; break; } case 2: @@ -1655,7 +1655,7 @@ case 4: case 5: { - dialog_menu_id = uMessageParam; + dialog_menu_id = (HOUSE_DIALOGUE_MENU)uMessageParam; sub_421B2C_PlaceInInventory_or_DropPickedItem(); break; } @@ -1943,7 +1943,7 @@ if ( v0 == 3 || v0 == 5 || v0 == 4 ) { UI_CreateEndConversationButton(); - dialog_menu_id = 94; + dialog_menu_id = HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT; sub_4B3AD4(in_current_building_type); } else @@ -1952,26 +1952,26 @@ { pVideoPlayer->_4BF5B2(); //LABEL_28: - dialog_menu_id = 1; + dialog_menu_id = HOUSE_DIALOGUE_MAIN; sub_4B3B42(in_current_building_type); return 1; } pVideoPlayer->_4BF5B2(); UI_CreateEndConversationButton(); - dialog_menu_id = 101; + dialog_menu_id = HOUSE_DIALOGUE_TAVERN_ARCOMAGE_MAIN; sub_4B3A72(in_current_building_type); } return 1; } pVideoPlayer->_4BF5B2(); UI_CreateEndConversationButton(); - dialog_menu_id = 1; + dialog_menu_id = HOUSE_DIALOGUE_MAIN; sub_4B3B42(in_current_building_type); return 1; } pDialogueNPCCount = 0; pDialogueWindow->Release(); - dialog_menu_id = 0; + dialog_menu_id = HOUSE_DIALOGUE_NULL; pDialogueWindow = 0; pIcons_LOD->_40F9C5(); v1 = uNumDialogueNPCPortraits; @@ -2108,15 +2108,16 @@ pAudioPlayer->PlaySound(SOUND_27, v46, v47, v48, v49, v50, v52, v56); return; } + switch(dialog_menu_id) { - case 94: + case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT: { pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; sub_421EA6_OnInventoryLeftClick(); break; } - case 18: + case HOUSE_DIALOGUE_GULD_BUY_BOOKS: { v17 = pMouse->GetCursorPos(&v63); v18 = pRenderer->pActiveZBuffer[v17->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v61)->y]] & 0xFFFF; @@ -2165,7 +2166,8 @@ ShowStatusBarString(v9, v54); break; } - case 3: + + case HOUSE_DIALOGUE_SHOP_SELL: { v14 = pMouse->GetCursorPos(&v71)->x - 14; v79 = (v14 >> 5) + 14 * ((pMouse->GetCursorPos(&v69)->y - 17) >> 5); @@ -2199,7 +2201,7 @@ break; } - case 4: + case HOUSE_DIALOGUE_SHOP_IDENTIFY: { pMouse->GetCursorPos(&v62); v10 = v62.x - 14; @@ -2250,7 +2252,9 @@ } break; } - case 5: + + + case HOUSE_DIALOGUE_SHOP_REPAIR: { v1 = pMouse->GetCursorPos(&a2)->x - 14; v79 = (v1 >> 5) + 14 * ((pMouse->GetCursorPos(&v70)->y - 17) >> 5); @@ -2317,8 +2321,9 @@ } break; } - case 2: - case 95: + + case HOUSE_DIALOGUE_SHOP_BUY_STANDARD: + case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL: { //LABEL_49: v28 = pMouse->GetCursorPos(&v59); @@ -2429,6 +2434,7 @@ default: { + __debugbreak(); // please do record these dialogue ids to the HOUSE_DIALOGUE_MENU enum if( dialog_menu_id >= 36 && dialog_menu_id <= 72 ) { v42 = dialog_menu_id - 36; diff -r 852ec78d9548 -r 585490c29945 mm7_4.cpp --- a/mm7_4.cpp Fri Mar 22 23:46:32 2013 +0600 +++ b/mm7_4.cpp Fri Mar 22 21:50:41 2013 +0200 @@ -7786,7 +7786,7 @@ pParty->field_709 = 0; Party__CountHirelings(); PrepareHouse((HOUSE_ID)(int)window_SpeakInHouse->ptr_1C); - dialog_menu_id = 1; + dialog_menu_id = HOUSE_DIALOGUE_MAIN; pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) @@ -8772,7 +8772,7 @@ //----- (004B3EF0) -------------------------------------------------------- void DrawJoinGuildWindow( int pEventCode ) - { +{ uDialogueType = 81;//enum JoinGuildDialog ptr_F8B1E8 = (char *)pNPCTopics[pEventCode + 99].pText; ContractSelectText(pEventCode); @@ -8783,7 +8783,7 @@ pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, 0x51u, 0, 0, "", 0); pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, 0xAFu, 0x52u, 0, pGlobalTXT_LocalizationStrings[122], 0); pDialogueWindow->_41D08F(1, 1, 0, 2); - dialog_menu_id = -1; + dialog_menu_id = HOUSE_DIALOGUE_OTHER; } // F8B19C: using guessed type int dword_F8B19C; @@ -8809,7 +8809,7 @@ v2 = pGlobalTXT_LocalizationStrings[535]; pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, 0xAFu, 0x4Fu, 0, v2, 0); pDialogueWindow->_41D08F(1, 1, 0, 2); - dialog_menu_id = -1; + dialog_menu_id = HOUSE_DIALOGUE_OTHER; } // F8B19C: using guessed type int dword_F8B19C; // F8B1A8: using guessed type int dword_F8B1A8; @@ -8838,7 +8838,7 @@ pDialogueWindow->CreateButton( 0x1E0u, 30 * v0 + 160, 0x8Cu, 0x1Eu, 1, 0, 0xAFu, 0x4Cu, 0, pGlobalTXT_LocalizationStrings[406], 0); //"Hire" pDialogueWindow->_41D08F(v0 + 1, 1, 0, 2); - dialog_menu_id = -1; + dialog_menu_id = HOUSE_DIALOGUE_OTHER; } @@ -8958,7 +8958,7 @@ pDialogueWindow->_41D08F(num_menu_buttons, 1, 0, 2); dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; } - dialog_menu_id = 1; + dialog_menu_id = HOUSE_DIALOGUE_MAIN; } } @@ -9843,7 +9843,7 @@ } else { - dialog_menu_id = 1; + dialog_menu_id = HOUSE_DIALOGUE_MAIN; pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); } } diff -r 852ec78d9548 -r 585490c29945 mm7_data.cpp --- a/mm7_data.cpp Fri Mar 22 23:46:32 2013 +0600 +++ b/mm7_data.cpp Fri Mar 22 21:50:41 2013 +0200 @@ -2227,8 +2227,6 @@ __int16 word_F8B158[777]; // weak struct Texture *ShopTexture; // idb struct Texture *ItemsInShopTexture[12]; -int in_current_building_type; // 0xF8B198 -int dialog_menu_id; // weak __int16 word_F8B1A0; // weak const char *dword_F8B1A4; // idb int contract_approved; // weak diff -r 852ec78d9548 -r 585490c29945 mm7_data.h --- a/mm7_data.h Fri Mar 22 23:46:32 2013 +0600 +++ b/mm7_data.h Fri Mar 22 21:50:41 2013 +0200 @@ -1683,8 +1683,6 @@ extern __int16 word_F8B158[]; // weak extern struct Texture *ShopTexture; // idb extern struct Texture *ItemsInShopTexture[12]; -extern int in_current_building_type; // weak -extern int dialog_menu_id; // weak extern __int16 word_F8B1A0; // weak extern const char *dword_F8B1A4; // idb extern int contract_approved; // weak