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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri Jun 26 02:12:08 CEST 2009


Revision: 41896
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41896&view=rev
Author:   lordhoto
Date:     2009-06-26 00:12:08 +0000 (Fri, 26 Jun 2009)

Log Message:
-----------
Implement palette difference in Kanji drawing code for PC98.

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

Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp	2009-06-26 00:11:56 UTC (rev 41895)
+++ scummvm/trunk/engines/kyra/screen.cpp	2009-06-26 00:12:08 UTC (rev 41896)
@@ -3082,9 +3082,18 @@
 } // end of anonymous namespace
 
 void Screen::drawCharSJIS(uint16 c, int x, int y) {
-	int color1 = _textColorsMap[1];
-	int color2 = _textColorsMap[0];
+	int color1, color2;
 
+	if (_use16ColorMode) {
+		// PC98 16 color games specify a color value which is for the
+		// PC98 text mode palette, thus we need to remap it.
+		color1 = ((_textColorsMap[1] >> 5) & 0x7) + 16; 
+		color2 = ((_textColorsMap[0] >> 5) & 0x7) + 16;
+	} else {
+		color1 = _textColorsMap[1];
+		color2 = _textColorsMap[0];
+	}
+
 	memset(_sjisTempPage2, _sjisInvisibleColor, 324);
 	memset(_sjisSourceChar, 0, 36);
 	memcpy(_sjisSourceChar, _sjisFontData + 0x20 * SJIStoFMTChunk(c & 0xff, c >> 8), 0x20);


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