[Scummvm-cvs-logs] scummvm master -> 223c27028d92a8e3028143aa73d1d11a85aff9d3

dreammaster dreammaster at scummvm.org
Fri Jun 19 03:54:49 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:
223c27028d SHERLOCK: RT: Replace some constant values with _opcodes[OP_NULL]


Commit: 223c27028d92a8e3028143aa73d1d11a85aff9d3
    https://github.com/scummvm/scummvm/commit/223c27028d92a8e3028143aa73d1d11a85aff9d3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-06-18T21:53:50-04:00

Commit Message:
SHERLOCK: RT: Replace some constant values with _opcodes[OP_NULL]

Changed paths:
    engines/sherlock/tattoo/widget_base.cpp
    engines/sherlock/tattoo/widget_text.cpp



diff --git a/engines/sherlock/tattoo/widget_base.cpp b/engines/sherlock/tattoo/widget_base.cpp
index 16f02a1..4046168 100644
--- a/engines/sherlock/tattoo/widget_base.cpp
+++ b/engines/sherlock/tattoo/widget_base.cpp
@@ -53,7 +53,7 @@ Common::String WidgetBase::splitLines(const Common::String &str, Common::StringA
 		const char *lineStartP = strP;
 
 		// Find how many characters will fit on the next line
-		while (width < maxWidth && *strP && (*strP < 170 || *strP == 225)) {
+		while (width < maxWidth && *strP && (*strP < 170 || *strP == talk._opcodes[OP_NULL])) {
 			width += _surface.charWidth(*strP);
 
 			// Keep track of the last space
@@ -73,7 +73,7 @@ Common::String WidgetBase::splitLines(const Common::String &str, Common::StringA
 		// Move the string ahead to the next line
 		if (*strP == ' ' || *strP == 13)
 			++strP;
-	} while (*strP && (*strP < talk._opcodes[OP_SWITCH_SPEAKER] || *strP == 225));
+	} while (*strP && (*strP < talk._opcodes[OP_SWITCH_SPEAKER] || *strP == talk._opcodes[OP_NULL]));
 
 	// Return any remaining text left over
 	return *strP ? Common::String(strP) : Common::String();
diff --git a/engines/sherlock/tattoo/widget_text.cpp b/engines/sherlock/tattoo/widget_text.cpp
index 2c4fef0..9e99643 100644
--- a/engines/sherlock/tattoo/widget_text.cpp
+++ b/engines/sherlock/tattoo/widget_text.cpp
@@ -58,7 +58,7 @@ void WidgetText::load(const Common::String &str) {
 			width = _surface.widestChar() * 2 + 6;
 			
 			const char *strP = str.c_str();
-			while (*strP && (*strP < talk._opcodes[OP_SWITCH_SPEAKER] || *strP == 225))
+			while (*strP && (*strP < talk._opcodes[OP_SWITCH_SPEAKER] || *strP == talk._opcodes[OP_NULL]))
 				width += _surface.charWidth(*strP++);
 		}
 






More information about the Scummvm-git-logs mailing list