[Scummvm-cvs-logs] SF.net SVN: scummvm:[41870] scummvm/trunk/engines/kyra/screen_lok.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Thu Jun 25 17:53:09 CEST 2009
Revision: 41870
http://scummvm.svn.sourceforge.net/scummvm/?rev=41870&view=rev
Author: lordhoto
Date: 2009-06-25 15:53:09 +0000 (Thu, 25 Jun 2009)
Log Message:
-----------
Fix japanese font colors in Kyra 1 PC98 16 color.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/screen_lok.cpp
Modified: scummvm/trunk/engines/kyra/screen_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen_lok.cpp 2009-06-25 15:37:46 UTC (rev 41869)
+++ scummvm/trunk/engines/kyra/screen_lok.cpp 2009-06-25 15:53:09 UTC (rev 41870)
@@ -459,9 +459,26 @@
}
void Screen_LoK_16::mergeOverlay(int x, int y, int w, int h) {
- Screen_LoK::mergeOverlay(x, y, w, h);
+ byte *dst = _sjisOverlayPtrs[0] + y * 640 + x;
- convertTo16Colors(_sjisOverlayPtrs[0] + y * 640 + x, w, h, 640);
+ // We do a game screen rect to 16 color dithering here. It is
+ // important that we do not dither the overlay, since else the
+ // japanese fonts will look wrong.
+ convertTo16Colors(dst, w, h, 640);
+
+ const byte *src = _sjisOverlayPtrs[1] + y * 640 + x;
+
+ int add = 640 - w;
+
+ while (h--) {
+ for (x = 0; x < w; ++x, ++dst) {
+ byte col = *src++;
+ if (col != _sjisInvisibleColor)
+ *dst = _paletteMap[col * 4 + 2];
+ }
+ dst += add;
+ src += add;
+ }
}
void Screen_LoK_16::set16ColorPalette(const uint8 *pal) {
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