diff options
author | Denis Kasak | 2009-08-12 05:20:25 +0000 |
---|---|---|
committer | Denis Kasak | 2009-08-12 05:20:25 +0000 |
commit | 534158af87985a8ca74b99928a74d99681aca79d (patch) | |
tree | d80e97f3d65dc6f863e024c22b6194eda4c41c8b /engines/draci/game.cpp | |
parent | 303085c66b7288c9bdb375a7091de611dd1c187d (diff) | |
download | scummvm-rg350-534158af87985a8ca74b99928a74d99681aca79d.tar.gz scummvm-rg350-534158af87985a8ca74b99928a74d99681aca79d.tar.bz2 scummvm-rg350-534158af87985a8ca74b99928a74d99681aca79d.zip |
* When setting the first two game variables (room and gate), first convert them back to 1-based indexing so they play well with the rest of the scripts. This fixes a number of bugs, e.g. the dragon now appears automatically when the game starts and the question mark animation in the intro is played / stopped at an appropriate time.
* Removed hack from Script::start() which loaded animation 657 before playing it to stop a crash. The fix above seems to fix this bug as well.
svn-id: r43308
Diffstat (limited to 'engines/draci/game.cpp')
-rw-r--r-- | engines/draci/game.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index 6051e0d651..419e2e9c29 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -168,8 +168,10 @@ void Game::start() { if (_newRoom != _currentRoom._roomNum) { // Set the first two variables to the new room / gate - _variables[0] = _newGate; - _variables[1] = _newRoom; + // Before setting these variables we have to convert the values to + // 1-based indexing because this is how everything is stored in the data files + _variables[0] = _newGate + 1; + _variables[1] = _newRoom + 1; // If the new room is the map room, set the appropriate coordinates // for the dragon in the persons array @@ -263,8 +265,10 @@ void Game::init() { _newRoom = _currentRoom._roomNum; _newGate = _currentGate; - _variables[0] = _currentGate; - _variables[1] = _currentRoom._roomNum; + // Before setting these variables we have to convert the values to 1-based indexing + // because this is how everything is stored in the data files + _variables[0] = _currentGate + 1; + _variables[1] = _currentRoom._roomNum + 1; changeRoom(_currentRoom._roomNum); runGateProgram(_currentGate); |