diff options
author | Johannes Schickel | 2006-01-03 19:03:09 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-01-03 19:03:09 +0000 |
commit | f046a14bb22f1d6c138ed82efa03d5ff89ae85e0 (patch) | |
tree | d22406fef62e5982865fccede353ce8658e793a5 /kyra/script_v1.cpp | |
parent | 025aa4dbb4f714ad88c469411265be8ddd28fd2e (diff) | |
download | scummvm-rg350-f046a14bb22f1d6c138ed82efa03d5ff89ae85e0.tar.gz scummvm-rg350-f046a14bb22f1d6c138ed82efa03d5ff89ae85e0.tar.bz2 scummvm-rg350-f046a14bb22f1d6c138ed82efa03d5ff89ae85e0.zip |
Fixed some bugs with the timers.
also implemented: cmd_dispelMagicAnimation and cmd_runWSAFrames
and implemented color fading of the kyragem in room 210.
svn-id: r19898
Diffstat (limited to 'kyra/script_v1.cpp')
-rw-r--r-- | kyra/script_v1.cpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/kyra/script_v1.cpp b/kyra/script_v1.cpp index d3aa3a8d8c..c0eb528c27 100644 --- a/kyra/script_v1.cpp +++ b/kyra/script_v1.cpp @@ -509,7 +509,27 @@ int KyraEngine::cmd_setSpecialEnterXAndY(ScriptState *script) { } int KyraEngine::cmd_runWSAFrames(ScriptState *script) { - warning("STUB: cmd_runWSAFrames"); + debug(3, "cmd_runWSAFrames(0x%X) (%d, %d, %d, %d, %d, %d)", script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + int xpos = stackPos(0); + int ypos = stackPos(1); + int delayTime = stackPos(2); + int startFrame = stackPos(3); + int endFrame = stackPos(4); + int wsaIndex = stackPos(5); + _screen->hideMouse(); + _movieObjects[wsaIndex]->_x = xpos; + _movieObjects[wsaIndex]->_y = ypos; + _movieObjects[wsaIndex]->_drawPage = 0; + for (; startFrame <= endFrame; ++startFrame) { + uint32 nextRun = _system->getMillis() + delayTime * _tickLength; + _movieObjects[wsaIndex]->displayFrame(startFrame); + while (_system->getMillis() < nextRun) { + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + delay(10); + } + } + _screen->showMouse(); return 0; } @@ -1097,7 +1117,8 @@ int KyraEngine::cmd_bkgdScrollSceneAndMasksRight(ScriptState *script) { } int KyraEngine::cmd_dispelMagicAnimation(ScriptState *script) { - warning("STUB: cmd_dispelMagicAnimation"); + debug(3, "cmd_dispelMagicAnimation(0x%X) ()", script); + seq_dispelMagicAnimation(); return 0; } |