From d9140ab62683c624a8f2fc294df027cc94c01c84 Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Thu, 17 Feb 2011 15:02:34 +0100 Subject: TUCKER: fix #2628056 - Text Dialogue is out of sync always synchronize text with speech sound. Note, some subtitles present in the datafiles are inconsistent (written text different from spoken). --- engines/tucker/tucker.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp index 6e766aac16..ad10b5b73a 100644 --- a/engines/tucker/tucker.cpp +++ b/engines/tucker/tucker.cpp @@ -556,13 +556,7 @@ void TuckerEngine::mainLoop() { if (_inputKeys[kInputKeyToggleTextSpeech]) { _inputKeys[kInputKeyToggleTextSpeech] = false; if ((_gameFlags & kGameFlagNoSubtitles) == 0) { - if (_displaySpeechText) { - _displaySpeechText = false; -// kDefaultCharSpeechSoundCounter = 1; - } else { - _displaySpeechText = true; -// kDefaultCharSpeechSoundCounter = 70; - } + _displaySpeechText = !_displaySpeechText; ConfMan.setBool("subtitles", _displaySpeechText); } } @@ -2889,7 +2883,11 @@ void TuckerEngine::updateCharSpeechSound(bool displayText) { if (_charSpeechSoundCounter == 0) { return; } - --_charSpeechSoundCounter; + if (_displaySpeechText) { + _charSpeechSoundCounter = 0; + } else { + --_charSpeechSoundCounter; + } if (_charSpeechSoundCounter == 0) { _charSpeechSoundCounter = isSpeechSoundPlaying() ? 1 : 0; if (_charSpeechSoundCounter == 0) { -- cgit v1.2.3