aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/game.cpp
diff options
context:
space:
mode:
authorRobert Špalek2009-10-26 04:59:52 +0000
committerRobert Špalek2009-10-26 04:59:52 +0000
commit74da9e5e3bd842b6b5f44a01aff6fd26dee510ec (patch)
treeb1365db3c9e979b013def7da484df11be26c7a1f /engines/draci/game.cpp
parent6b61700a7bf9ac66acc01b69f19703196b497320 (diff)
downloadscummvm-rg350-74da9e5e3bd842b6b5f44a01aff6fd26dee510ec.tar.gz
scummvm-rg350-74da9e5e3bd842b6b5f44a01aff6fd26dee510ec.tar.bz2
scummvm-rg350-74da9e5e3bd842b6b5f44a01aff6fd26dee510ec.zip
Fix Escape in the intro, and switching map and the inventory
svn-id: r45389
Diffstat (limited to 'engines/draci/game.cpp')
-rw-r--r--engines/draci/game.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index da94c261d3..f771c564f0 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -144,13 +144,19 @@ void Game::start() {
while (!shouldQuit()) {
debugC(1, kDraciGeneralDebugLevel, "Game::start()");
- const bool force_reload = shouldExitLoop() > 1;
-
// Whenever the top-level loop is entered, it should not finish unless
// the exit is triggered by a script
_shouldExitLoop = false;
+ _vm->_script->endCurrentProgram(false);
+ const bool force_reload = shouldExitLoop() > 1;
enterNewRoom(force_reload);
+
+ if (_vm->_script->shouldEndProgram()) {
+ // Room changed during the initialization (intro or Escape pressed).
+ continue;
+ }
+
loop();
}
}