From 49fc73e3be33163b63d7a3114bdc27032f5ffdde Mon Sep 17 00:00:00 2001 From: Sylvain Dupont Date: Sat, 16 Oct 2010 17:06:10 +0000 Subject: TOON: Fix bugs #3085967 and #3085969 about guards dance Bug #3085969: "TOON: Missing dialogue for Palace guards dance" Bug #3085969: "TOON: Missing dialogue for Palace Guards sequence" svn-id: r53543 --- engines/toon/script_func.cpp | 11 +++++++---- engines/toon/toon.cpp | 10 +++++++--- engines/toon/toon.h | 4 ++++ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/engines/toon/script_func.cpp b/engines/toon/script_func.cpp index 8755caeab9..bc7a234a86 100644 --- a/engines/toon/script_func.cpp +++ b/engines/toon/script_func.cpp @@ -618,10 +618,7 @@ int32 ScriptFunc::sys_Cmd_In_Conversation(EMCState *state) { int32 ScriptFunc::sys_Cmd_Character_Talking(EMCState *state) { int32 characterId = stackPos(0); - Character *character = _vm->getCharacterById(characterId); - if (character) - return (character->getFlag() & 4) && (character->getFlag() & 8); - return 0; + return (_vm->getCurrentCharacterTalking() == characterId); } int32 ScriptFunc::sys_Cmd_Set_Flux_Facing_Point(EMCState *state) { @@ -873,6 +870,12 @@ int32 ScriptFunc::sys_Cmd_Set_Scene_Anim_Wait(EMCState *state) { _vm->setSceneAnimationScriptUpdate(false); } + // WORKAROUND : Slow down just a little the guards dance animation so that the voices don't cut + if (_vm->state()->_currentScene == 2 && (sceneId == 2 || sceneId == 3)) { + waitTicks = 7; + _vm->setSceneAnimationScriptUpdate(false); + } + waitTicks *= _vm->getTickLength(); if (sceneId >= 0 && sceneId < 40) { diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 993bae9c05..dfb25a7777 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -915,6 +915,8 @@ void ToonEngine::loadScene(int32 SceneId, bool forGameLoad) { addItemToInventory(_gameState->_mouseState); _gameState->_mouseState = -1; + _mouseButton = 0; + _lastMouseButton = 0x3; // load package @@ -1795,9 +1797,11 @@ void ToonEngine::playTalkAnimOnCharacter(int32 animID, int32 characterId, bool t int32 ToonEngine::characterTalk(int32 dialogid, bool blocking) { if (blocking == false && _audioManager->voiceStillPlaying()) { - // someone is already talking, and this voice is not important - // skip it - return 0; + if (_currentTextLineCharacterId == 0 || _currentTextLineCharacterId == 1) { + // Drew or Flux is already talking, and this voice is not important + // skip it + return 0; + } } int32 myId = 0; diff --git a/engines/toon/toon.h b/engines/toon/toon.h index 692d7fab4a..ba3f4a4fd0 100644 --- a/engines/toon/toon.h +++ b/engines/toon/toon.h @@ -253,6 +253,10 @@ public: return _currentTextLineId; } + int32 getCurrentCharacterTalking() { + return _currentTextLineCharacterId; + } + CharacterDrew *getDrew() { return (CharacterDrew *)_drew; } -- cgit v1.2.3