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/script.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/script.cpp')
-rw-r--r-- | engines/draci/script.cpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp index b30a081027..f526bdc874 100644 --- a/engines/draci/script.cpp +++ b/engines/draci/script.cpp @@ -394,20 +394,8 @@ void Script::start(Common::Queue<int> ¶ms) { return; } - int objID = params.pop(); - int animID = params.pop(); - - // Fixes bug in the data files which makes the game crash in the intro - // TODO: This is possibly exclusive to the English version, so check for that - if (animID == 657) { - Common::Queue<int> tmp; - tmp.push(objID); - tmp.push(animID); - this->load(tmp); - } - - objID -= 1; - animID -= 1; + int objID = params.pop() - 1; + int animID = params.pop() - 1; GameObject *obj = _vm->_game->getObject(objID); @@ -780,12 +768,12 @@ int Script::handleMathExpression(Common::MemoryReadStream &reader) { break; case kMathVariable: - value = reader.readSint16LE(); + value = reader.readSint16LE() - 1; - stk.push(_vm->_game->getVariable(value-1)); + stk.push(_vm->_game->getVariable(value)); debugC(3, kDraciBytecodeDebugLevel, "\t\tvariable: %d (%d)", value, - _vm->_game->getVariable(value-1)); + _vm->_game->getVariable(value)); break; case kMathFunctionCall: |