diff options
author | Denis Kasak | 2009-08-01 03:07:18 +0000 |
---|---|---|
committer | Denis Kasak | 2009-08-01 03:07:18 +0000 |
commit | 240871aa2020c5bfc86b6d997465a12fc9a2e3b8 (patch) | |
tree | 22dc3554658761334a7ded63dc3e5fa7857ddf08 | |
parent | 52a1c5df915fc5791b42c191c6d2c981d22117b5 (diff) | |
download | scummvm-rg350-240871aa2020c5bfc86b6d997465a12fc9a2e3b8.tar.gz scummvm-rg350-240871aa2020c5bfc86b6d997465a12fc9a2e3b8.tar.bz2 scummvm-rg350-240871aa2020c5bfc86b6d997465a12fc9a2e3b8.zip |
* Added support for loop substatus
* Set loop substatus to Ordinary when changing rooms
svn-id: r42971
-rw-r--r-- | engines/draci/game.cpp | 14 | ||||
-rw-r--r-- | engines/draci/game.h | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index 3665c09d71..995cd5d013 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -154,16 +154,22 @@ Game::Game(DraciEngine *vm) : _vm(vm) { void Game::start() { while (!shouldQuit()) { + // If the scheduled room differs from the current one, do a room change if (_newRoom != _currentRoom._roomNum) { + setLoopSubstatus(kStatusOrdinary); + + // Do the actual change changeRoom(_newRoom); + // Set the current room / gate to the new value _currentRoom._roomNum = _newRoom; _currentGate = _newGate; // HACK: Won't be needed once I've implemented the loop properly _roomChange = false; + // Run the program for the gate the dragon came through runGateProgram(_newGate); } @@ -679,10 +685,18 @@ void Game::setLoopStatus(LoopStatus status) { _loopStatus = status; } +void Game::setLoopSubstatus(LoopStatus status) { + _loopSubstatus = status; +} + LoopStatus Game::getLoopStatus() { return _loopStatus; } +LoopStatus Game::getLoopSubstatus() { + return _loopSubstatus; +} + int Game::getVariable(int numVar) { return _variables[numVar]; } diff --git a/engines/draci/game.h b/engines/draci/game.h index 1e488ca083..a38b71a256 100644 --- a/engines/draci/game.h +++ b/engines/draci/game.h @@ -216,7 +216,9 @@ public: void setMarkedAnimationIndex(int index); void setLoopStatus(LoopStatus status); + void setLoopSubstatus(LoopStatus status); LoopStatus getLoopStatus(); + LoopStatus getLoopSubstatus(); bool shouldQuit() { return _shouldQuit; } void setQuit(bool quit) { _shouldQuit = quit; } @@ -245,6 +247,7 @@ private: int _newGate; LoopStatus _loopStatus; + LoopStatus _loopSubstatus; bool _shouldQuit; bool _shouldExitLoop; |