diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sherlock/talk.h | 12 | ||||
-rw-r--r-- | engines/sherlock/tattoo/widget_talk.cpp | 5 |
2 files changed, 10 insertions, 7 deletions
diff --git a/engines/sherlock/talk.h b/engines/sherlock/talk.h index 4ee7a09e56..ddb81f1b04 100644 --- a/engines/sherlock/talk.h +++ b/engines/sherlock/talk.h @@ -178,12 +178,6 @@ private: * Remove any voice commands from a loaded statement list */ void stripVoiceCommands(); - - /** - * Parses a reply for control codes and display text. The found text is printed within - * the text window, handles delays, animations, and animating portraits. - */ - void doScript(const Common::String &script); protected: SherlockEngine *_vm; OpcodeMethod *_opcodeTable; @@ -298,6 +292,12 @@ public: void talkTo(const Common::String &filename); /** + * Parses a reply for control codes and display text. The found text is printed within + * the text window, handles delays, animations, and animating portraits. + */ + void doScript(const Common::String &script); + + /** * Main method for handling conversations when a character to talk to has been * selected. It will make Holmes walk to the person to talk to, draws the * interface window for the conversation and passes on control to give the diff --git a/engines/sherlock/tattoo/widget_talk.cpp b/engines/sherlock/tattoo/widget_talk.cpp index 7d86736925..7edc280a42 100644 --- a/engines/sherlock/tattoo/widget_talk.cpp +++ b/engines/sherlock/tattoo/widget_talk.cpp @@ -374,7 +374,10 @@ void WidgetTalk::handleEvents() { do { talk._scriptSelect = _selector; talk._speaker = talk._talkTo; - talk.talkTo(talk._statements[_selector]._reply); + + // Make a copy of the reply (since talkTo can reload the statements list), and call talkTo + Common::String reply = talk._statements[_selector]._reply; + talk.doScript(reply); // Reset the misc field in case any people changed their sequences for (int idx = 0; idx < MAX_CHARACTERS; ++idx) |