aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorRobert Špalek2009-10-04 09:33:07 +0000
committerRobert Špalek2009-10-04 09:33:07 +0000
commit42ee5350c3b44763aa78ca3d105670bbf6bba376 (patch)
tree879b96212f7093ae1677ccb14c727afe3f5000d4 /engines
parentdecdc5771a6c4733ab4a1276fc60c2454c8340a6 (diff)
downloadscummvm-rg350-42ee5350c3b44763aa78ca3d105670bbf6bba376.tar.gz
scummvm-rg350-42ee5350c3b44763aa78ca3d105670bbf6bba376.tar.bz2
scummvm-rg350-42ee5350c3b44763aa78ca3d105670bbf6bba376.zip
Hack Game::_shouldExitLoop.
Immediate exit needed when loading a savegame hurts waiting in an inner (strange) loop inside a GPL program, because animations don't progress at all. Reverted to the previous behavior and kept the immediate exit as a hack for loading the game. svn-id: r44590
Diffstat (limited to 'engines')
-rw-r--r--engines/draci/game.cpp2
-rw-r--r--engines/draci/game.h6
-rw-r--r--engines/draci/saveload.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index 1745a23e10..8600b0fd65 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -226,7 +226,7 @@ void Game::loop() {
_loopStatus, _loopSubstatus);
_vm->handleEvents();
- if (shouldExitLoop()) // after loading
+ if (shouldExitLoop() > 1) // after loading
break;
// Fetch mouse coordinates
diff --git a/engines/draci/game.h b/engines/draci/game.h
index 6a982c80fd..6e17c199fd 100644
--- a/engines/draci/game.h
+++ b/engines/draci/game.h
@@ -305,8 +305,8 @@ public:
bool shouldQuit() const { return _shouldQuit; }
void setQuit(bool quit) { _shouldQuit = quit; }
- bool shouldExitLoop() const { return _shouldExitLoop; }
- void setExitLoop(bool exit) { _shouldExitLoop = exit; }
+ int shouldExitLoop() const { return _shouldExitLoop; }
+ void setExitLoop(int exit) { _shouldExitLoop = exit; }
void setSpeechTick(uint tick);
@@ -388,7 +388,7 @@ private:
LoopSubstatus _loopSubstatus;
bool _shouldQuit;
- bool _shouldExitLoop;
+ int _shouldExitLoop; // 0=false and 1=true are normal, 2=immediate exit after loading
uint _speechTick;
diff --git a/engines/draci/saveload.cpp b/engines/draci/saveload.cpp
index 805e4f607c..cb70000cca 100644
--- a/engines/draci/saveload.cpp
+++ b/engines/draci/saveload.cpp
@@ -147,7 +147,7 @@ Common::Error loadSavegameData(int saveGameIdx, DraciEngine *vm) {
vm->_engineStartTime = vm->_system->getMillis() / 1000 - header.playtime;
vm->_game->scheduleEnteringRoomUsingGate(vm->_game->getRoomNum(), 0);
vm->_game->setRoomNum(oldRoomNum);
- vm->_game->setExitLoop(true);
+ vm->_game->setExitLoop(2); // 2 > true means immediate exit for the loop
vm->_game->inventoryReload();