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 /engines/draci/game.cpp | |
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
Diffstat (limited to 'engines/draci/game.cpp')
-rw-r--r-- | engines/draci/game.cpp | 14 |
1 files changed, 14 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]; } |