From a86625700fe69ff27e0f704a41307cdd2135a6a8 Mon Sep 17 00:00:00 2001 From: Thanasis Antoniou Date: Mon, 18 Jun 2018 14:10:00 +0300 Subject: BLADERUNNER: Added subtitles support and checkbox in KIA --- engines/bladerunner/actor.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'engines/bladerunner/actor.cpp') 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(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(); } -- cgit v1.2.3