diff options
author | Sylvain Dupont | 2010-10-22 21:42:48 +0000 |
---|---|---|
committer | Sylvain Dupont | 2010-10-22 21:42:48 +0000 |
commit | 9cbb0d557948d8b4c3a8c766a1fc32bb75a2c6c3 (patch) | |
tree | 6f7c64ff9c92507aad056f5b9717c33c54911563 | |
parent | d771d98a92eb7019614bba14bdf822b2022a6558 (diff) | |
download | scummvm-rg350-9cbb0d557948d8b4c3a8c766a1fc32bb75a2c6c3.tar.gz scummvm-rg350-9cbb0d557948d8b4c3a8c766a1fc32bb75a2c6c3.tar.bz2 scummvm-rg350-9cbb0d557948d8b4c3a8c766a1fc32bb75a2c6c3.zip |
TOON: More talk animation fixes
There was a conflict between the idle animation and the talk animation
in some cases (showing the chain anim & idle anim in the arcade)
svn-id: r53713
-rw-r--r-- | engines/toon/anim.h | 1 | ||||
-rw-r--r-- | engines/toon/character.cpp | 6 | ||||
-rw-r--r-- | engines/toon/toon.cpp | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/engines/toon/anim.h b/engines/toon/anim.h index 7bf633220c..5d65959e07 100644 --- a/engines/toon/anim.h +++ b/engines/toon/anim.h @@ -186,6 +186,7 @@ public: EMCState _state; uint32 _lastTimer; bool _frozen; + bool _frozenForConversation; bool _active; }; diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp index 860b106837..4daa3a5fa7 100644 --- a/engines/toon/character.cpp +++ b/engines/toon/character.cpp @@ -248,7 +248,7 @@ void Character::stopSpecialAnim() { delete anim #endif if (_animScriptId != -1) - _vm->getSceneAnimationScript(_animScriptId)->_frozen = false; + _vm->getSceneAnimationScript(_animScriptId)->_frozenForConversation = false; //if (_sceneAnimationId != -1) // _animationInstance->setAnimation(_vm->getSceneAnimation(_sceneAnimationId)->_animation); @@ -348,7 +348,7 @@ void Character::update(int32 timeIncrement) { #endif if (_animScriptId != -1) - _vm->getSceneAnimationScript(_animScriptId)->_frozen = true; + _vm->getSceneAnimationScript(_animScriptId)->_frozenForConversation = true; // TODO setup backup // @@ -955,7 +955,7 @@ void Character::playAnim(int32 animId, int32 unused, int32 flags) { if (_animScriptId != -1 && (flags & 8) == 0) - _vm->getSceneAnimationScript(_animScriptId)->_frozen = true; + _vm->getSceneAnimationScript(_animScriptId)->_frozenForConversation = true; stopSpecialAnim(); diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 3a823071e0..84a28ae990 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -846,7 +846,7 @@ void ToonEngine::updateAnimationSceneScripts(int32 timeElapsed) { do { if (_sceneAnimationScripts[_lastProcessedSceneScript]._lastTimer <= _system->getMillis() && - !_sceneAnimationScripts[_lastProcessedSceneScript]._frozen) { + !_sceneAnimationScripts[_lastProcessedSceneScript]._frozen && !_sceneAnimationScripts[_lastProcessedSceneScript]._frozenForConversation) { _animationSceneScriptRunFlag = true; while (_animationSceneScriptRunFlag && _sceneAnimationScripts[_lastProcessedSceneScript]._lastTimer <= _system->getMillis() && !_shouldQuit) { @@ -855,7 +855,7 @@ void ToonEngine::updateAnimationSceneScripts(int32 timeElapsed) { //waitForScriptStep(); - if (_sceneAnimationScripts[_lastProcessedSceneScript]._frozen) + if (_sceneAnimationScripts[_lastProcessedSceneScript]._frozen || _sceneAnimationScripts[_lastProcessedSceneScript]._frozenForConversation) break; } @@ -1049,6 +1049,7 @@ void ToonEngine::loadScene(int32 SceneId, bool forGameLoad) { _script->start(&_sceneAnimationScripts[i]._state, 9 + i); _sceneAnimationScripts[i]._lastTimer = getSystem()->getMillis(); _sceneAnimationScripts[i]._frozen = false; + _sceneAnimationScripts[i]._frozenForConversation = false; } } @@ -2956,6 +2957,7 @@ bool ToonEngine::loadGame(int32 slot) { for (int32 i = 0; i < state()->_locations[_gameState->_currentScene]._numSceneAnimations; i++) { _sceneAnimationScripts[i]._active = loadFile->readByte(); _sceneAnimationScripts[i]._frozen = loadFile->readByte(); + _sceneAnimationScripts[i]._frozenForConversation = false; int32 oldTimer = loadFile->readSint32BE(); _sceneAnimationScripts[i]._lastTimer = MAX<int32>(0,oldTimer + timerDiff); _script->loadState(&_sceneAnimationScripts[i]._state, loadFile); |