[Scummvm-cvs-logs] SF.net SVN: scummvm:[44489] scummvm/trunk/engines/kyra/sequences_lol.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Wed Sep 30 16:54:18 CEST 2009


Revision: 44489
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44489&view=rev
Author:   lordhoto
Date:     2009-09-30 14:54:18 +0000 (Wed, 30 Sep 2009)

Log Message:
-----------
Got rid of old workaround, which was only needed because our SJIS font did not feature any ASCII chars.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/sequences_lol.cpp

Modified: scummvm/trunk/engines/kyra/sequences_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_lol.cpp	2009-09-30 14:53:57 UTC (rev 44488)
+++ scummvm/trunk/engines/kyra/sequences_lol.cpp	2009-09-30 14:54:18 UTC (rev 44489)
@@ -303,25 +303,13 @@
 		for (int i = 0; i < 4; ++i) {
 			_screen->printText((const char *)_charNamesPC98[i], _charPosXPC98[i], 168, 0xC1, 0x00);
 
-			// Since our SJIS font does not support ASCII digits currently, we have to use the
-			// digits from the SJIS range, which looks different to the original.
+			Screen::FontId old = _screen->setFont(Screen::FID_SJIS_FNT);
 			for (int j = 0; j < 3; ++j) {
-				uint8 buffer[5];
-				snprintf((char *)buffer, 5, "%2d", _charPreviews[i].attrib[j]);
-
-				buffer[3] = buffer[1] - '0' + 0x4F;
-				buffer[2] = 0x82;
-				if (buffer[0] != ' ') {
-					buffer[1] = buffer[0] - '0' + 0x4F;
-					buffer[0] = 0x82;
-				} else {
-					buffer[1] = 0x40;
-					buffer[0] = 0x81;
-				}
-				buffer[4] = 0x00;
-
-				_screen->printText((const char *)buffer, _charPosXPC98[i] + 16, 176 + j * 8, 0x81, 0x00);
+				char buffer[3];
+				snprintf(buffer, sizeof(buffer), "%2d", _charPreviews[i].attrib[j]);
+				_screen->printText(buffer, _charPosXPC98[i] + 16, 176 + j * 8, 0x81, 0x00);
 			}
+			_screen->setFont(old);
 		}
 
 		_screen->printText(_tim->getCTableEntry(51), 72, 176, 0x81, 0x00);


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