[Scummvm-cvs-logs] SF.net SVN: scummvm: [21742] scummvm/trunk/engines/simon/charset.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun Apr 9 23:19:05 CEST 2006


Revision: 21742
Author:   eriktorbjorn
Date:     2006-04-09 23:18:39 -0700 (Sun, 09 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21742&view=rev

Log Message:
-----------
Slight change to make it easier to change the FF and Simon word-wrapping rules
individually. Changed the FF rule so that it doesn't matter whether or not the
variables are signed or unsigned. This fixes missing line breaks in some of the
Oracle articles.

Modified Paths:
--------------
    scummvm/trunk/engines/simon/charset.cpp
Modified: scummvm/trunk/engines/simon/charset.cpp
===================================================================
--- scummvm/trunk/engines/simon/charset.cpp	2006-04-10 05:37:31 UTC (rev 21741)
+++ scummvm/trunk/engines/simon/charset.cpp	2006-04-10 06:18:39 UTC (rev 21742)
@@ -317,8 +317,19 @@
 		print_char_helper_1(&chr, 1);
 		print_char_helper_5(_textWindow);
 	} else if (chr == 0 || chr == ' ' || chr == 10) {
-		uint count = (getGameType() == GType_FF) ? _printCharPixelCount + 1 : _printCharPixelCount;
-		if (_printCharMaxPos - _printCharCurPos >= count) {
+		bool fit;
+
+		// Note that in FF, _printCharCurPos may be greater than
+		// _printCharMaxPos. In Simon, that is probably prevented by
+		// testing if _printCharCurPos == _printCharMaxPos below.
+
+		if (getGameType() == GType_FF) {
+			fit = _printCharMaxPos > _printCharCurPos + _printCharPixelCount;
+		} else {
+			fit = _printCharMaxPos - _printCharCurPos >= _printCharPixelCount;
+		}
+
+		if (fit) {
 			_printCharCurPos += _printCharPixelCount;
 			print_char_helper_1(_lettersToPrintBuf, _numLettersToPrint);
 


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