aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2009-06-26 00:12:08 +0000
committerJohannes Schickel2009-06-26 00:12:08 +0000
commite212c068452fa959e560c251f332da1fb38f2821 (patch)
tree34cf9845cd51f6a4d15ffa9f1d718029e41bb8d2 /engines/kyra
parente45a941f9dc39bb48c500748841203cfe051510b (diff)
downloadscummvm-rg350-e212c068452fa959e560c251f332da1fb38f2821.tar.gz
scummvm-rg350-e212c068452fa959e560c251f332da1fb38f2821.tar.bz2
scummvm-rg350-e212c068452fa959e560c251f332da1fb38f2821.zip
Implement palette difference in Kanji drawing code for PC98.
svn-id: r41896
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/screen.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 5a61a5cb82..4b65387523 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -3082,8 +3082,17 @@ int SJIStoFMTChunk(int f, int s) { // copied from scumm\charset.cpp
} // 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);