diff options
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(); } |