[Scummvm-cvs-logs] SF.net SVN: scummvm:[52031] scummvm/trunk/engines/sci/graphics/text16.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Thu Aug 12 11:52:00 CEST 2010


Revision: 52031
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52031&view=rev
Author:   m_kiewitz
Date:     2010-08-12 09:52:00 +0000 (Thu, 12 Aug 2010)

Log Message:
-----------
SCI: fixing text color support

fixes some words not being red in pepper (part of bug #3040039)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/text16.cpp

Modified: scummvm/trunk/engines/sci/graphics/text16.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/text16.cpp	2010-08-12 06:45:13 UTC (rev 52030)
+++ scummvm/trunk/engines/sci/graphics/text16.cpp	2010-08-12 09:52:00 UTC (rev 52031)
@@ -92,7 +92,7 @@
 	const char *textCode = text;
 	int16 textCodeSize = 0;
 	char curCode;
-	unsigned char curCodeParm;
+	signed char curCodeParm;
 
 	// Find the end of the textcode
 	while ((++textCodeSize) && (*text != 0) && (*text++ != 0x7C)) { }
@@ -105,11 +105,11 @@
 	if (isdigit(curCodeParm)) {
 		curCodeParm -= '0';
 	} else {
-		curCodeParm = 0;
+		curCodeParm = -1;
 	}
 	switch (curCode) {
 	case 'c': // set text color
-		if (curCodeParm == 0) {
+		if (curCodeParm == -1) {
 			_ports->_curPort->penClr = orgPenColor;
 		} else {
 			if (curCodeParm < _codeColorsCount) {
@@ -117,8 +117,8 @@
 			}
 		}
 		break;
-	case 'f':
-		if (curCodeParm == 0) {
+	case 'f': // set text font
+		if (curCodeParm == -1) {
 			SetFont(orgFontId);
 		} else {
 			if (curCodeParm < _codeFontsCount) {
@@ -126,6 +126,9 @@
 			}
 		}
 		break;
+	case 'r': // reference?!
+		// Used in Pepper, no idea how this works out
+		break;
 	}
 	return textCodeSize;
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list