diff options
author | Robert Špalek | 2009-10-28 00:04:59 +0000 |
---|---|---|
committer | Robert Špalek | 2009-10-28 00:04:59 +0000 |
commit | bbb72eee553ce9ad89ca1a9dfc0a934862c53250 (patch) | |
tree | 5bc2813263a65cd3eef8d3c49b14eb9a9f8e1622 | |
parent | ed87e5cd318c9d869934daaf0cb6d67270d54c75 (diff) | |
download | scummvm-rg350-bbb72eee553ce9ad89ca1a9dfc0a934862c53250.tar.gz scummvm-rg350-bbb72eee553ce9ad89ca1a9dfc0a934862c53250.tar.bz2 scummvm-rg350-bbb72eee553ce9ad89ca1a9dfc0a934862c53250.zip |
Fix entering the same room when re-loading the game.
(Most objects were not loaded due to incorrect cleaning of a flag). Also,
clean up accessing some boolean attributes.
svn-id: r45452
-rw-r--r-- | engines/draci/game.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index 73a5a34d9a..ef39d18531 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -146,10 +146,10 @@ void Game::start() { // Whenever the top-level loop is entered, it should not finish unless // the exit is triggered by a script - _shouldExitLoop = false; + const bool force_reload = shouldExitLoop() > 1; + setExitLoop(false); _vm->_script->endCurrentProgram(false); - const bool force_reload = shouldExitLoop() > 1; enterNewRoom(force_reload); if (_vm->_script->shouldEndProgram()) { @@ -162,8 +162,8 @@ void Game::start() { } void Game::init() { - _shouldQuit = false; - _shouldExitLoop = false; + setQuit(false); + setExitLoop(false); _scheduledPalette = 0; setLoopStatus(kStatusGate); setLoopSubstatus(kSubstatusOrdinary); @@ -256,7 +256,7 @@ void Game::loop() { } if (_vm->_mouse->lButtonPressed() || _vm->_mouse->rButtonPressed()) { - _shouldExitLoop = true; + setExitLoop(true); _vm->_mouse->lButtonSet(false); _vm->_mouse->rButtonSet(false); } @@ -426,7 +426,7 @@ void Game::loop() { _vm->_mouse->rButtonPressed() || (_vm->_system->getMillis() - _speechTick) >= _speechDuration) { - _shouldExitLoop = true; + setExitLoop(true); _vm->_mouse->lButtonSet(false); _vm->_mouse->rButtonSet(false); } @@ -442,8 +442,8 @@ void Game::loop() { _vm->_system->delayMillis(20); // HACK: Won't be needed once the game loop is implemented properly - _shouldExitLoop = _shouldExitLoop || (_newRoom != getRoomNum() && - (_loopStatus == kStatusOrdinary || _loopStatus == kStatusGate)); + setExitLoop(shouldExitLoop() || (_newRoom != getRoomNum() && + (_loopStatus == kStatusOrdinary || _loopStatus == kStatusGate))); } while (!shouldExitLoop()); } @@ -812,7 +812,7 @@ int Game::dialogueDraw() { if (_dialogueLinesNum > 1) { _vm->_mouse->cursorOn(); - _shouldExitLoop = false; + setExitLoop(false); loop(); _vm->_mouse->cursorOff(); |