diff options
author | Peter Kohaut | 2019-02-11 22:44:38 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-02-11 22:49:18 +0100 |
commit | 916221dc562c9062839918d58d1a9968eb8f2b5e (patch) | |
tree | 9c4e29ef5c2b4004d8a08922ab4e4b67e6a700f1 /engines/bladerunner/script | |
parent | 6854ea3ddd83798a9045307763bbb346d8a1736b (diff) | |
download | scummvm-rg350-916221dc562c9062839918d58d1a9968eb8f2b5e.tar.gz scummvm-rg350-916221dc562c9062839918d58d1a9968eb8f2b5e.tar.bz2 scummvm-rg350-916221dc562c9062839918d58d1a9968eb8f2b5e.zip |
BLADERUNNER: Added original logic for speech skipping
And some small cleanup of unnecessary comments.
Diffstat (limited to 'engines/bladerunner/script')
-rw-r--r-- | engines/bladerunner/script/script.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp index 14f34c4946..9e2097b2d9 100644 --- a/engines/bladerunner/script/script.cpp +++ b/engines/bladerunner/script/script.cpp @@ -318,9 +318,11 @@ void ScriptBase::Actor_Says_With_Pause(int actorId, int sentenceId, float pause, } Player_Loses_Control(); while (_vm->_gameIsRunning) { - _vm->_speechSkipped = false; + _vm->_actorIsSpeaking = true; + _vm->_actorSpeakStopIsRequested = false; _vm->gameTick(); - if (_vm->_speechSkipped || !actor->isSpeeching()) { + _vm->_actorIsSpeaking = false; + if (_vm->_actorSpeakStopIsRequested || !actor->isSpeeching()) { actor->speechStop(); break; } @@ -336,7 +338,7 @@ void ScriptBase::Actor_Says_With_Pause(int actorId, int sentenceId, float pause, } } - if (pause > 0.0f && !_vm->_speechSkipped) { + if (pause > 0.0f && !_vm->_actorSpeakStopIsRequested) { Delay(pause * 1000); } @@ -355,10 +357,12 @@ void ScriptBase::Actor_Voice_Over(int sentenceId, int actorId) { actor->speechPlay(sentenceId, true); Player_Loses_Control(); - while(_vm->_gameIsRunning) { - _vm->_speechSkipped = false; + while (_vm->_gameIsRunning) { + _vm->_actorIsSpeaking = true; + _vm->_actorSpeakStopIsRequested = false; _vm->gameTick(); - if(_vm->_speechSkipped || !actor->isSpeeching()) { + _vm->_actorIsSpeaking = false; + if (_vm->_actorSpeakStopIsRequested || !actor->isSpeeching()) { actor->speechStop(); break; } |