aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/scalpel/scalpel_user_interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sherlock/scalpel/scalpel_user_interface.cpp')
-rw-r--r--engines/sherlock/scalpel/scalpel_user_interface.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp
index b39ccbe0c5..20ba4f53fa 100644
--- a/engines/sherlock/scalpel/scalpel_user_interface.cpp
+++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp
@@ -31,6 +31,11 @@
#include "sherlock/scalpel/settings.h"
#include "sherlock/scalpel/scalpel.h"
#include "sherlock/sherlock.h"
+#include "common/config-manager.h"
+
+#ifdef USE_TTS
+#include "common/text-to-speech.h"
+#endif
namespace Sherlock {
@@ -2058,6 +2063,14 @@ void ScalpelUserInterface::printObjectDesc(const Common::String &str, bool first
screen.slamRect(Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH,
SHERLOCK_SCREEN_HEIGHT));
}
+
+ #ifdef USE_TTS
+ if (ConfMan.getBool("tts_narrator")) {
+ Common::TextToSpeechManager *_ttsMan = g_system->getTextToSpeechManager();
+ _ttsMan->stop();
+ _ttsMan->say(str.c_str());
+ }
+ #endif
}
void ScalpelUserInterface::printObjectDesc() {