Mercurial > mm7
diff UIHouses.cpp @ 747:585490c29945
House dialogue ids appended
author | Nomad |
---|---|
date | Fri, 22 Mar 2013 21:50:41 +0200 |
parents | 9cc972ebd3cf |
children | f39fbeb65b28 |
line wrap: on
line diff
--- 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;