From 70375ec29b1f3f22098f8438be394b536c9f513c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 20 Jan 2018 17:32:10 -0500 Subject: XEEN: Break out of gameplay when party is killed --- engines/xeen/worldofxeen/worldofxeen.cpp | 13 ++++++------- engines/xeen/xeen.cpp | 3 +++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/engines/xeen/worldofxeen/worldofxeen.cpp b/engines/xeen/worldofxeen/worldofxeen.cpp index cc797d77ff..e67024c883 100644 --- a/engines/xeen/worldofxeen/worldofxeen.cpp +++ b/engines/xeen/worldofxeen/worldofxeen.cpp @@ -40,32 +40,31 @@ void WorldOfXeenEngine::outerGameLoop() { //_pendingAction = getGameID() == GType_DarkSide ? WOX_DARKSIDE_INTRO : WOX_CLOUDS_INTRO; _pendingAction = WOX_MENU; - if (_loadSaveSlot != -1 || gDebugLevel >= 1) - // Skip main menu and go straight to the game + if (_loadSaveSlot != -1) + // Loading savegame from launcher, so Skip menu and go straight to game _pendingAction = WOX_PLAY_GAME; while (!shouldQuit() && _pendingAction != WOX_QUIT) { - switch (_pendingAction) { + WOXGameAction action = _pendingAction; + _pendingAction = WOX_MENU; + + switch (action) { case WOX_CLOUDS_INTRO: if (showCloudsTitle()) showCloudsIntro(); - _pendingAction = WOX_MENU; break; case WOX_CLOUDS_ENDING: showCloudsEnding(); - _pendingAction = WOX_MENU; break; case WOX_DARKSIDE_INTRO: if (showDarkSideTitle()) showDarkSideIntro(); - _pendingAction = WOX_MENU; break; case WOX_DARKSIDE_ENDING: showDarkSideEnding(); - _pendingAction = WOX_MENU; break; case WOX_WORLD_ENDING: diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp index 44679eeb90..1b0688304c 100644 --- a/engines/xeen/xeen.cpp +++ b/engines/xeen/xeen.cpp @@ -225,6 +225,9 @@ void XeenEngine::gameLoop() { // Main user interface handler for waiting for and processing user input _interface->perform(); + + if (_party->_dead) + break; } } -- cgit v1.2.3