diff UI/UIHouses.cpp @ 2453:2a8010d99cf8

_4BF5B2() renamed to BackToHouseMenu()
author Ritor1
date Fri, 25 Jul 2014 15:06:52 +0600
parents 90349b8048a5
children 0f17a30149ec
line wrap: on
line diff
--- a/UI/UIHouses.cpp	Fri Jul 25 14:38:08 2014 +0600
+++ b/UI/UIHouses.cpp	Fri Jul 25 15:06:52 2014 +0600
@@ -3329,13 +3329,13 @@
   {
     case -1:
       _4B4224_UpdateNPCTopics((int)((char *)pDialogueNPCCount - 1));
-      pMediaPlayer->_4BF5B2();
+      BackToHouseMenu();
       break;
 
     case HOUSE_DIALOGUE_SHOP_DISPLAY_EQUIPMENT:
     case HOUSE_DIALOGUE_LEARN_SKILLS:
     case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_MAIN:
-      pMediaPlayer->_4BF5B2();
+      BackToHouseMenu();
       UI_CreateEndConversationButton();
       dialog_menu_id = HOUSE_DIALOGUE_MAIN;
       InitializaDialogueOptions(in_current_building_type);
@@ -3352,7 +3352,7 @@
     case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_RULES:
     case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_VICTORY_CONDITIONS:
     case HOUSE_DIALOGUE_TAVERN_ARCOMAGE_RESULT:
-      pMediaPlayer->_4BF5B2();
+      BackToHouseMenu();
       UI_CreateEndConversationButton();
       dialog_menu_id = HOUSE_DIALOGUE_TAVERN_ARCOMAGE_MAIN;
       InitializaDialogueOptions_Tavern(in_current_building_type);
@@ -3380,14 +3380,37 @@
         }
       }
 
-      pMediaPlayer->_4BF5B2();
+      BackToHouseMenu();
       break;
 
     default:
-      pMediaPlayer->_4BF5B2();
+      BackToHouseMenu();
       dialog_menu_id = HOUSE_DIALOGUE_MAIN;
       InitializaDialogueOptions(in_current_building_type);
       break;
   }
   return 1;
 }
+
+//----- (004BF5B2) --------------------------------------------------------
+void BackToHouseMenu()
+{
+  pMouse->_469E24();
+  if ( window_SpeakInHouse && window_SpeakInHouse->ptr_1C == (void *)165 && !pMovie_Track)//!this->pSmackerMovie )
+  {
+    bGameoverLoop = true;
+    HouseDialogPressCloseBtn();
+    window_SpeakInHouse->Release();
+    pParty->uFlags &= 0xFFFFFFFD;
+    if ( EnterHouse(HOUSE_BODY_GUILD_ERATHIA) )
+    {
+      pAudioPlayer->PlaySound(SOUND_Invalid, 0, 0, -1, 0, 0, 0, 0);
+      window_SpeakInHouse = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_HouseInterior, 165, 0);
+      window_SpeakInHouse->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1, 0x31, "", 0);
+      window_SpeakInHouse->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2, 0x32, "", 0);
+      window_SpeakInHouse->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3, 0x33, "", 0);
+      window_SpeakInHouse->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4, 0x34, "", 0);
+    }
+    bGameoverLoop = 0;
+  }
+}