mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
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
This commit is contained in:
parent
d771d98a92
commit
9cbb0d5579
@ -186,6 +186,7 @@ public:
|
||||
EMCState _state;
|
||||
uint32 _lastTimer;
|
||||
bool _frozen;
|
||||
bool _frozenForConversation;
|
||||
bool _active;
|
||||
};
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user