diff options
author | Paul Gilbert | 2017-12-16 19:46:49 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-12-16 19:46:49 -0500 |
commit | 56e7ef2f3d96ceecc6bc83a38c81d2000e58f81c (patch) | |
tree | 0859be743eb8df10ab84da0ee8a493263cf9ab6f /engines/xeen | |
parent | 8c850f82ec04f971dfcaadee22adb4b8dbceffb5 (diff) | |
download | scummvm-rg350-56e7ef2f3d96ceecc6bc83a38c81d2000e58f81c.tar.gz scummvm-rg350-56e7ef2f3d96ceecc6bc83a38c81d2000e58f81c.tar.bz2 scummvm-rg350-56e7ef2f3d96ceecc6bc83a38c81d2000e58f81c.zip |
XEEN: Fix returning to interactive when leaving Party dialog
Diffstat (limited to 'engines/xeen')
-rw-r--r-- | engines/xeen/locations.cpp | 16 | ||||
-rw-r--r-- | engines/xeen/locations.h | 1 |
2 files changed, 12 insertions, 5 deletions
diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp index d48dcb6c00..5ce6d92292 100644 --- a/engines/xeen/locations.cpp +++ b/engines/xeen/locations.cpp @@ -34,7 +34,7 @@ namespace Locations { BaseLocation::BaseLocation(LocationAction action) : ButtonContainer(g_vm), _LocationActionId(action), _isDarkCc(g_vm->_files->_isDarkCc), - _vocName("hello1.voc") { + _vocName("hello1.voc"), _exitToUi(false) { _townMaxId = (action >= SPHINX) ? 0 : Res.TOWN_MAXES[_isDarkCc][action]; if (action < NO_ACTION) { _songName = Res.TOWN_ACTION_MUSIC[_isDarkCc][action]; @@ -86,7 +86,7 @@ int BaseLocation::show() { do { wait(); charP = doOptions(charP); - if (_vm->shouldQuit()) + if (_vm->shouldQuit() || _exitToUi) return 0; Common::String msg = createLocationText(*charP); @@ -683,9 +683,7 @@ Character *TavernLocation::doOptions(Character *c) { case Common::KEYCODE_s: { // Sign In - PartyDialog::show(g_vm); - - // Set location and position afterwards + // Set location and position for afterwards idx = _isDarkCc ? (party._mazeId - 29) >> 1 : party._mazeId - 28; assert(idx >= 0); party._mazePosition.x = Res.TAVERN_EXIT_LIST[_isDarkCc ? 1 : 0][_LocationActionId][idx][0]; @@ -704,8 +702,16 @@ Character *TavernLocation::doOptions(Character *c) { party._activeParty[idx]._xeenSide = map._loadDarkSide; } + g_vm->_mode = MODE_17; party.addTime(1440); party._mazeId = 0; + + // Show the party dialog + PartyDialog::show(g_vm); + + if (party._mazeId != 0) + map.load(party._mazeId); + _exitToUi = true; break; } diff --git a/engines/xeen/locations.h b/engines/xeen/locations.h index 975fabdc35..98cc013873 100644 --- a/engines/xeen/locations.h +++ b/engines/xeen/locations.h @@ -54,6 +54,7 @@ protected: int _drawFrameIndex; uint _farewellTime; int _drawCtr1, _drawCtr2; + bool _exitToUi; protected: /** * Draw the window |