diff options
author | Thanasis Antoniou | 2018-06-18 14:10:00 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-12-25 12:35:52 +0100 |
commit | a86625700fe69ff27e0f704a41307cdd2135a6a8 (patch) | |
tree | 3e25f052da3d0cc4bf18d21960cedade06a19911 /engines/bladerunner/actor.cpp | |
parent | 9ceb2e858658cac3c7e4d592c3fa6f59a5776b9a (diff) | |
download | scummvm-rg350-a86625700fe69ff27e0f704a41307cdd2135a6a8.tar.gz scummvm-rg350-a86625700fe69ff27e0f704a41307cdd2135a6a8.tar.bz2 scummvm-rg350-a86625700fe69ff27e0f704a41307cdd2135a6a8.zip |
BLADERUNNER: Added subtitles support and checkbox in KIA
Diffstat (limited to 'engines/bladerunner/actor.cpp')
-rw-r--r-- | engines/bladerunner/actor.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp index 45d6d08277..062fc0f37c 100644 --- a/engines/bladerunner/actor.cpp +++ b/engines/bladerunner/actor.cpp @@ -41,6 +41,9 @@ #include "bladerunner/slice_animations.h" #include "bladerunner/slice_renderer.h" #include "bladerunner/time.h" +#if SUBTITLES_SUPPORT +#include "bladerunner/subtitles.h" +#endif // SUBTITLES_SUPPORT #include "bladerunner/waypoints.h" #include "bladerunner/zbuffer.h" @@ -552,7 +555,11 @@ bool Actor::tick(bool forceDraw, Common::Rect *screenRect) { needsUpdate = true; timeLeft = 0; } - +#if SUBTITLES_SUPPORT + if(!isSpeeching()) { + _vm->_subtitles->hide(); + } +#endif // SUBTITLES_SUPPORT if (needsUpdate) { int newAnimation = 0, newFrame = 0; _vm->_aiScripts->updateAnimation(_id, &newAnimation, &newFrame); @@ -1092,10 +1099,18 @@ void Actor::speechPlay(int sentenceId, bool voiceOver) { balance = CLIP<int>(balance, -127, 127); } +#if SUBTITLES_SUPPORT + _vm->_subtitles->getInGameSubsText(_id, sentenceId); + _vm->_subtitles->show(); +#endif // SUBTITLES_SUPPORT + _vm->_audioSpeech->playSpeech(name, balance); } void Actor::speechStop() { +#if SUBTITLES_SUPPORT + _vm->_subtitles->hide(); +#endif // SUBTITLES_SUPPORT _vm->_audioSpeech->stopSpeech(); } |