diff options
author | Paul Gilbert | 2015-07-12 14:59:02 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-12 14:59:02 -0400 |
commit | de8cd7eb3f7e529ba4ac139feafcfcb5431c1b8c (patch) | |
tree | 94d499c1ae2699957c8c4793478dc647b24bcca8 /engines/sherlock | |
parent | 419d2c9ef8343801e25e23d5039e1bf73e314f7f (diff) | |
download | scummvm-rg350-de8cd7eb3f7e529ba4ac139feafcfcb5431c1b8c.tar.gz scummvm-rg350-de8cd7eb3f7e529ba4ac139feafcfcb5431c1b8c.tar.bz2 scummvm-rg350-de8cd7eb3f7e529ba4ac139feafcfcb5431c1b8c.zip |
SHERLOCK: RT: Fix conversation replies when talking to characters
Diffstat (limited to 'engines/sherlock')
-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) |