diff options
author | Johannes Schickel | 2009-06-25 15:53:09 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-06-25 15:53:09 +0000 |
commit | c202a119d401c663d8f53b99077d21248397fe26 (patch) | |
tree | a246b075b3541f15e00d7cbf6a30c089cc07d514 /engines/kyra | |
parent | df6e41e2ba6beb04c212c02614978a4c5d65b725 (diff) | |
download | scummvm-rg350-c202a119d401c663d8f53b99077d21248397fe26.tar.gz scummvm-rg350-c202a119d401c663d8f53b99077d21248397fe26.tar.bz2 scummvm-rg350-c202a119d401c663d8f53b99077d21248397fe26.zip |
Fix japanese font colors in Kyra 1 PC98 16 color.
svn-id: r41870
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/screen_lok.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/engines/kyra/screen_lok.cpp b/engines/kyra/screen_lok.cpp index e96ca9b2ed..a436a97dfd 100644 --- a/engines/kyra/screen_lok.cpp +++ b/engines/kyra/screen_lok.cpp @@ -459,9 +459,26 @@ void Screen_LoK_16::convertTo16Colors(uint8 *page, int w, int h, int pitch, int } 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) { |