diff options
author | Denis Kasak | 2009-07-30 03:37:04 +0000 |
---|---|---|
committer | Denis Kasak | 2009-07-30 03:37:04 +0000 |
commit | 181b155a2f50a05ec2982fa581d7ad5893746a35 (patch) | |
tree | 26ef91f52a9c12a0928c2dcb2b12a1d1a0ed8a1e | |
parent | 7532845feea721b554fd38f59e5dc28321ea9bfa (diff) | |
download | scummvm-rg350-181b155a2f50a05ec2982fa581d7ad5893746a35.tar.gz scummvm-rg350-181b155a2f50a05ec2982fa581d7ad5893746a35.tar.bz2 scummvm-rg350-181b155a2f50a05ec2982fa581d7ad5893746a35.zip |
* Added support for keeping track of gates (exits from rooms)
* Added getters and setters for current room and gate numbers
svn-id: r42915
-rw-r--r-- | engines/draci/game.cpp | 19 | ||||
-rw-r--r-- | engines/draci/game.h | 8 |
2 files changed, 26 insertions, 1 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index 0122ae1626..90cdf77434 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -175,6 +175,7 @@ void Game::init() { _vm->_script->run(dragon->_program, dragon->_init); _currentRoom._roomNum = _info._startRoom; + _currentGate = 0; changeRoom(_info._startRoom); } @@ -350,7 +351,7 @@ void Game::loadRoom(int roomNum) { Common::Array<int> gates; for (uint i = 0; i < _currentRoom._numGates; ++i) { - gates.push_back(roomReader.readSint16LE()); + gates.push_back(roomReader.readSint16LE() - 1); } // Load the room's objects @@ -600,6 +601,22 @@ void Game::changeRoom(uint roomNum) { loadOverlays(); } +int Game::getRoomNum() { + return _currentRoom; +} + +void Game::setRoomNum(int room) { + _currentRoom = room; +} + +int Game::getGateNum() { + return _currentGate; +} + +void Game::setGateNum(int gate) { + _currentGate = gate; +} + void Game::setLoopStatus(LoopStatus status) { _loopStatus = status; } diff --git a/engines/draci/game.h b/engines/draci/game.h index de995a4300..ba69673642 100644 --- a/engines/draci/game.h +++ b/engines/draci/game.h @@ -204,6 +204,12 @@ public: int getVariable(int varNum); void setVariable(int varNum, int value); + int getRoomNum(); + void setRoomNum(int room); + + int getGateNum(); + void setGateNum(int gate); + int getIconStatus(int iconID); int getMarkedAnimationIndex(); @@ -230,6 +236,8 @@ private: GameObject *_objects; Room _currentRoom; + int _currentGate; + LoopStatus _loopStatus; bool _shouldQuit; |