[Scummvm-cvs-logs] CVS: scummvm/scumm string.cpp,1.318,1.319

Max Horn fingolfin at users.sourceforge.net
Sat Jan 14 13:27:07 CET 2006


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6851

Modified Files:
	string.cpp 
Log Message:
Added an error() to drawString to catch charset mask usage in V7+ games, if any exists

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.318
retrieving revision 1.319
diff -u -d -r1.318 -r1.319
--- string.cpp	10 Jan 2006 21:13:43 -0000	1.318
+++ string.cpp	14 Jan 2006 21:26:19 -0000	1.319
@@ -626,6 +626,25 @@
 
 	convertMessageToString(msg, buf, sizeof(buf));
 
+	if (_version >= 7) {
+		// I recently disabled charset mask related code for V7+ games, thinking
+		// that it should never be needed there. Well, I missed on case: In this
+		// method, it could potentially still be used. Now the question is:
+		// Does this actually ever happen? Basically, drawString is called from
+		// two spots: First off, from drawVerb, which I *think* is not used for
+		// V7+ games (but I am not 100% sure), and secondly from printString().
+		// The latter is much harder to predict. Maybe in some obscure place it
+		// is used after all?
+		//
+		// Hence I am adding this error message, hoping that either somebody
+		// triggers it (at which point I can investigate), or, if nobody ever
+		// triggers it, we can assume that it's safe to keep this error even
+		// after the release.
+		//
+		// TODO/FIXME: Remove or update this hack before the next release!
+		error("drawString(%d, '%s') -- please inform Fingolfin about this crash!", a, buf);
+	}
+
 	_charset->_top = _string[a].ypos + _screenTop;
 	_charset->_startLeft = _charset->_left = _string[a].xpos;
 	_charset->_right = _string[a].right;





More information about the Scummvm-git-logs mailing list