From ed7364101d763f11fbf73f2c8921697c816d3e7c Mon Sep 17 00:00:00 2001 From: Martin Gerhardy Date: Fri, 1 Jan 2021 15:28:21 +0100 Subject: [PATCH] TWINE: fixed interupted spoken text https://bugs.scummvm.org/ticket/11982 --- engines/twine/scene/gamestate.cpp | 2 ++ engines/twine/text.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/engines/twine/scene/gamestate.cpp b/engines/twine/scene/gamestate.cpp index f42f24c8906..f509a82cc9e 100644 --- a/engines/twine/scene/gamestate.cpp +++ b/engines/twine/scene/gamestate.cpp @@ -384,6 +384,8 @@ void GameState::processFoundItem(int32 item) { } } + _engine->_text->playVoxSimple(_engine->_text->currDialTextEntry); + _engine->lbaTime++; } diff --git a/engines/twine/text.cpp b/engines/twine/text.cpp index 3fbe375b62f..8f3f0467d64 100644 --- a/engines/twine/text.cpp +++ b/engines/twine/text.cpp @@ -620,9 +620,11 @@ bool Text::displayText(int32 index, bool showText, bool playVox) { aborted = true; break; } + + _engine->_text->playVoxSimple(_engine->_text->currDialTextEntry); } } - while (_engine->_sound->isSamplePlaying(currDialTextEntry)) { + while (_engine->_text->playVoxSimple(_engine->_text->currDialTextEntry)) { ScopedFPS scopedFps; _engine->readKeys(); if (_engine->shouldQuit() || _engine->_input->toggleAbortAction()) {