[Scummvm-cvs-logs] scummvm master -> 24663029035ec9bfd228e2dada39235656ac1daa

dreammaster dreammaster at scummvm.org
Sun Jul 5 23:11:45 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:
2466302903 SHERLOCK: RT: Fixes to display talk window


Commit: 24663029035ec9bfd228e2dada39235656ac1daa
    https://github.com/scummvm/scummvm/commit/24663029035ec9bfd228e2dada39235656ac1daa
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-07-05T17:10:34-04:00

Commit Message:
SHERLOCK: RT: Fixes to display talk window

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



diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index 217b24a..ffc55db 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -374,8 +374,7 @@ void Talk::talkTo(const Common::String &filename) {
 
 				// If the new conversion is a reply first, then we don't need
 				// to display any choices, since the reply needs to be shown
-				if (!newStatement._statement.hasPrefix("*") &&
-						!newStatement._statement.hasPrefix("^")) {
+				if (!newStatement._statement.hasPrefix("*") && !newStatement._statement.hasPrefix("^")) {
 					_talkIndex = select;
 					showTalk();
 
diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp
index d0c4bdc..51704e7 100644
--- a/engines/sherlock/tattoo/tattoo_talk.cpp
+++ b/engines/sherlock/tattoo/tattoo_talk.cpp
@@ -198,9 +198,15 @@ void TattooTalk::talkInterface(const byte *&str) {
 	_wait = true;
 }
 
-void TattooTalk::openTalkWindow() {
+void TattooTalk::showTalk() {
+	TattooPeople &people = *(TattooPeople *)_vm->_people;
+
+	_sequenceStack.clear();
+	people.setListenSequence(_talkTo, 129);
+
 	_talkWidget.load();
 	_talkWidget.summonWindow();
+	_talkWidget.refresh();
 }
 
 OpcodeReturn TattooTalk::cmdSwitchSpeaker(const byte *&str) {
@@ -861,14 +867,6 @@ OpcodeReturn TattooTalk::cmdWalkHomesAndNPCToCoords(const byte *&str) {
 	return RET_SUCCESS;
 }
 
-void TattooTalk::showTalk() {
-	TattooPeople &people = *(TattooPeople *)_vm->_people;
-	
-	_sequenceStack.clear();
-	people.setListenSequence(_talkTo, 129);
-	_talkWidget.refresh();
-}
-
 } // End of namespace Tattoo
 
 } // End of namespace Sherlock
diff --git a/engines/sherlock/tattoo/tattoo_talk.h b/engines/sherlock/tattoo/tattoo_talk.h
index f9a4d01..8abbb1b 100644
--- a/engines/sherlock/tattoo/tattoo_talk.h
+++ b/engines/sherlock/tattoo/tattoo_talk.h
@@ -79,13 +79,6 @@ private:
 	OpcodeReturn cmdWalkNPCToCAnimation(const byte *&str);
 	OpcodeReturn cmdWalkNPCToCoords(const byte *&str);
 	OpcodeReturn cmdWalkHomesAndNPCToCoords(const byte *&str);
-private:
-	void drawTalk(const char *str);
-
-	/**
-	 * Open the talk window
-	 */
-	void openTalkWindow();
 protected:
 	/**
 	 * Display the talk interface window
diff --git a/engines/sherlock/tattoo/widget_talk.cpp b/engines/sherlock/tattoo/widget_talk.cpp
index cc6c49e..7d86736 100644
--- a/engines/sherlock/tattoo/widget_talk.cpp
+++ b/engines/sherlock/tattoo/widget_talk.cpp
@@ -415,7 +415,9 @@ void WidgetTalk::handleEvents() {
 
 						// See if the new file is a standard file, a reply first file, or a Stealth Mode file
 						if (!talk._statements[select]._statement.hasPrefix("*") && !talk._statements[select]._statement.hasPrefix("^")) {
-							talk.openTalkWindow();
+							load();
+							summonWindow();
+
 							setStatementLines();
 							render(HL_NO_HIGHLIGHTING);
 							break;
@@ -557,7 +559,7 @@ void WidgetTalk::setStatementLines() {
 				// But if there isn't (and this shouldn't ever happen), just split the line right at that point
 				if (width > xSize) {
 					if (space) {
-						line = Common::String(str.c_str(), space - 1);
+						line = Common::String(str.c_str(), space);
 						str = Common::String(space + 1);
 					} else {
 						line = Common::String(str.c_str(), ch);






More information about the Scummvm-git-logs mailing list