aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/interface.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2018-04-07 15:53:27 -0400
committerPaul Gilbert2018-04-07 15:53:27 -0400
commitc1ae84881883363da05bfdb53ad274bd4814c057 (patch)
treeb27dfd25b4f2f16e92c946101fe32f2d98550197 /engines/xeen/interface.cpp
parent569833b4ca80116efaab15e47d0097b5c62ecb6c (diff)
downloadscummvm-rg350-c1ae84881883363da05bfdb53ad274bd4814c057.tar.gz
scummvm-rg350-c1ae84881883363da05bfdb53ad274bd4814c057.tar.bz2
scummvm-rg350-c1ae84881883363da05bfdb53ad274bd4814c057.zip
XEEN: Allow loading savegames during combat using GMM
The original didn't allow loading during combat from it's options dialog, and I'll leave that untouched, but the ability to load out of a unwinnable combat is too convenient to not allow in some form.
Diffstat (limited to 'engines/xeen/interface.cpp')
-rw-r--r--engines/xeen/interface.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp
index 88b33c4164..1a7900274c 100644
--- a/engines/xeen/interface.cpp
+++ b/engines/xeen/interface.cpp
@@ -1519,7 +1519,7 @@ void Interface::doCombat() {
} while (!_vm->shouldExit() && events.timeElapsed() < 1 && !_buttonValue);
} while (!_vm->shouldExit() && !_buttonValue);
if (_vm->shouldExit())
- return;
+ goto exit;
switch (_buttonValue) {
case Common::KEYCODE_TAB:
@@ -1701,7 +1701,7 @@ void Interface::doCombat() {
}
}
}
-
+exit:
w.close();
events.clearEvents();
@@ -1721,18 +1721,20 @@ void Interface::doCombat() {
mainIconsPrint();
combat._monster2Attack = -1;
- if (upDoorText) {
- map.cellFlagLookup(party._mazePosition);
- if (map._currentIsEvent)
- scripts.checkEvents();
- }
+ if (!g_vm->isLoadPending()) {
+ if (upDoorText) {
+ map.cellFlagLookup(party._mazePosition);
+ if (map._currentIsEvent)
+ scripts.checkEvents();
+ }
- if (reloadMap) {
- sound.playFX(51);
- map._loadCcNum = _vm->getGameID() != GType_WorldOfXeen ? 1 : 0;
- map.load(_vm->getGameID() == GType_WorldOfXeen ? 28 : 29);
- party._mazeDirection = _vm->getGameID() == GType_WorldOfXeen ?
- DIR_EAST : DIR_SOUTH;
+ if (reloadMap) {
+ sound.playFX(51);
+ map._loadCcNum = _vm->getGameID() != GType_WorldOfXeen ? 1 : 0;
+ map.load(_vm->getGameID() == GType_WorldOfXeen ? 28 : 29);
+ party._mazeDirection = _vm->getGameID() == GType_WorldOfXeen ?
+ DIR_EAST : DIR_SOUTH;
+ }
}
combat._combatMode = COMBATMODE_1;