[Scummvm-cvs-logs] scummvm master -> de8cd7eb3f7e529ba4ac139feafcfcb5431c1b8c

dreammaster dreammaster at scummvm.org
Sun Jul 12 21:00:06 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
de8cd7eb3f SHERLOCK: RT: Fix conversation replies when talking to characters


Commit: de8cd7eb3f7e529ba4ac139feafcfcb5431c1b8c
    https://github.com/scummvm/scummvm/commit/de8cd7eb3f7e529ba4ac139feafcfcb5431c1b8c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-07-12T14:59:02-04:00

Commit Message:
SHERLOCK: RT: Fix conversation replies when talking to characters

Changed paths:
    engines/sherlock/talk.h
    engines/sherlock/tattoo/widget_talk.cpp



diff --git a/engines/sherlock/talk.h b/engines/sherlock/talk.h
index 4ee7a09..ddb81f1 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 7d86736..7edc280 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)






More information about the Scummvm-git-logs mailing list