diff options
author | Johannes Schickel | 2005-12-22 01:49:59 +0000 |
---|---|---|
committer | Johannes Schickel | 2005-12-22 01:49:59 +0000 |
commit | d468c48bdaafcd15cc808115ecc9991d11f44c76 (patch) | |
tree | 729b79073457ea0ad89b18e2e9a9a159683062a3 /kyra | |
parent | ca03d5a3e4804aa011911349ceb68737092824e5 (diff) | |
download | scummvm-rg350-d468c48bdaafcd15cc808115ecc9991d11f44c76.tar.gz scummvm-rg350-d468c48bdaafcd15cc808115ecc9991d11f44c76.tar.bz2 scummvm-rg350-d468c48bdaafcd15cc808115ecc9991d11f44c76.zip |
Fixed bug with an endless loop while clicking on herman after giving him the saw.
svn-id: r19827
Diffstat (limited to 'kyra')
-rw-r--r-- | kyra/script_v1.cpp | 11 | ||||
-rw-r--r-- | kyra/sprites.cpp | 8 | ||||
-rw-r--r-- | kyra/sprites.h | 1 |
3 files changed, 12 insertions, 8 deletions
diff --git a/kyra/script_v1.cpp b/kyra/script_v1.cpp index 6ed617a0ea..0a8b897ea9 100644 --- a/kyra/script_v1.cpp +++ b/kyra/script_v1.cpp @@ -1003,17 +1003,20 @@ int KyraEngine::cmd_changeCharactersXAndY(ScriptState *script) { } int KyraEngine::cmd_clearSceneAnimatorBeacon(ScriptState *script) { - warning("STUB: cmd_clearSceneAnimatorBeacon"); + debug(3, "cmd_clearSceneAnimatorBeacon(0x%X) ()"); + _sprites->_sceneAnimatorBeaconFlag = 0; return 0; } int KyraEngine::cmd_querySceneAnimatorBeacon(ScriptState *script) { - warning("STUB: cmd_querySceneAnimatorBeacon"); - return 0; + debug(3, "cmd_querySceneAnimatorBeacon(0x%X) ()"); + return _sprites->_sceneAnimatorBeaconFlag; } int KyraEngine::cmd_refreshSceneAnimator(ScriptState *script) { - warning("STUB: cmd_refreshSceneAnimator"); + debug(3, "cmd_refreshSceneAnimator(0x%X) ()"); + _sprites->updateSceneAnims(); + updateAllObjectShapes(); return 0; } diff --git a/kyra/sprites.cpp b/kyra/sprites.cpp index 5f7aa59ac6..968a1ac6e6 100644 --- a/kyra/sprites.cpp +++ b/kyra/sprites.cpp @@ -41,6 +41,7 @@ Sprites::Sprites(KyraEngine *engine, OSystem *system) { _animDelay = 16; _spriteDefStart = 0; memset(_drawLayerTable, 0, sizeof(_drawLayerTable)); + _sceneAnimatorBeaconFlag = 0; } Sprites::~Sprites() { @@ -350,11 +351,11 @@ void Sprites::updateSceneAnims() { break; case 0xFFB1: data += 2; - debug(1, "TODO func: Set animator beacon flag"); + _sceneAnimatorBeaconFlag = 1; break; case 0xFFB2: data += 2; - debug(1, "TODO func: Reset animator beacon flag"); + _sceneAnimatorBeaconFlag = 0; break; case 0xFFB4: data += 2; @@ -370,8 +371,7 @@ void Sprites::updateSceneAnims() { break; case 0xFFA7: data += 2; - debug(1, "TODO func: Unknown FFA7"); - debug(1, " %i", READ_LE_UINT16(data)); + _anims[READ_LE_UINT16(data)].play = 1; data += 2; break; default: diff --git a/kyra/sprites.h b/kyra/sprites.h index e559cdad5c..81405e7cee 100644 --- a/kyra/sprites.h +++ b/kyra/sprites.h @@ -74,6 +74,7 @@ public: int getDrawLayer(int y); + int _sceneAnimatorBeaconFlag; protected: void freeSceneShapes(); |