[Scummvm-cvs-logs] SF.net SVN: scummvm: [31238] scummvm/trunk/engines/agos

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Wed Mar 26 04:10:40 CET 2008


Revision: 31238
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31238&view=rev
Author:   Kirben
Date:     2008-03-25 20:10:40 -0700 (Tue, 25 Mar 2008)

Log Message:
-----------
Move code to ignore invalid characters.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/charset-fontdata.cpp
    scummvm/trunk/engines/agos/charset.cpp

Modified: scummvm/trunk/engines/agos/charset-fontdata.cpp
===================================================================
--- scummvm/trunk/engines/agos/charset-fontdata.cpp	2008-03-26 02:11:22 UTC (rev 31237)
+++ scummvm/trunk/engines/agos/charset-fontdata.cpp	2008-03-26 03:10:40 UTC (rev 31238)
@@ -1582,20 +1582,12 @@
 		h = 13;
 		w =  feebleFontSize[chr - 32];
 
-		// Ignore invalid characters
-		if (chr - 32 > 195)
-			return;
-
 		src = feeble_windowFont + (chr - 32) * 13;
 	} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
 		dst = (byte *)screen->pixels + y * _dxSurfacePitch + x + window->textColumnOffset;
 		h = 8;
 		w = 6;
 
-		// Ignore invalid characters
-		if (chr - 32 > 98)
-			return;
-
 		switch (_language) {
 		case Common::CZ_CZE:
 			src = czech_simonFont + (chr - 32) * 8;
@@ -1632,10 +1624,6 @@
 		h = 8;
 		w = 6;
 
-		// Ignore invalid characters
-		if (chr - 32 > 98)
-			return;
-
 		// TODO: Add font tables for German
 		switch (_language) {
 		case Common::ES_ESP:

Modified: scummvm/trunk/engines/agos/charset.cpp
===================================================================
--- scummvm/trunk/engines/agos/charset.cpp	2008-03-26 02:11:22 UTC (rev 31237)
+++ scummvm/trunk/engines/agos/charset.cpp	2008-03-26 03:10:40 UTC (rev 31238)
@@ -527,11 +527,19 @@
 		}
 	} else if (c >= 32) {
 		if (getGameType() == GType_FF || getGameType() == GType_PP) {
+			// Ignore invalid characters
+			if (c - 32 > 195)
+				return;
+
 			windowDrawChar(window, window->textColumn + window->x, window->textRow + window->y, c);
 			window->textColumn += getFeebleFontSize(c);
 			return;
 		}
 
+		// Ignore invalid characters
+		if (c - 32 > 98)
+			return;
+
 		if (window->textLength == window->textMaxLength) {
 			windowNewLine(window);
 		} else if (window->textRow == window->height) {


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