[Scummvm-git-logs] scummvm master -> 56e7ef2f3d96ceecc6bc83a38c81d2000e58f81c

dreammaster dreammaster at scummvm.org
Sun Dec 17 01:46:59 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
56e7ef2f3d XEEN: Fix returning to interactive when leaving Party dialog


Commit: 56e7ef2f3d96ceecc6bc83a38c81d2000e58f81c
    https://github.com/scummvm/scummvm/commit/56e7ef2f3d96ceecc6bc83a38c81d2000e58f81c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-12-16T19:46:49-05:00

Commit Message:
XEEN: Fix returning to interactive when leaving Party dialog

Changed paths:
    engines/xeen/locations.cpp
    engines/xeen/locations.h


diff --git a/engines/xeen/locations.cpp b/engines/xeen/locations.cpp
index d48dcb6..5ce6d92 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 975fabd..98cc013 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





More information about the Scummvm-git-logs mailing list