diff options
author | Willem Jan Palenstijn | 2012-02-12 13:18:41 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2012-02-12 13:32:22 +0100 |
commit | 15bbe3bff18178b0b66fb73a33782813f9e96999 (patch) | |
tree | f2d3b4141bf15837ad12c4a0190442dd6f8a8861 | |
parent | 93619b96d33619014a0ed18878410ade85295caa (diff) | |
download | scummvm-rg350-15bbe3bff18178b0b66fb73a33782813f9e96999.tar.gz scummvm-rg350-15bbe3bff18178b0b66fb73a33782813f9e96999.tar.bz2 scummvm-rg350-15bbe3bff18178b0b66fb73a33782813f9e96999.zip |
SCI: Expand adjustGraphColor to work for older EGA games too
See bug #3486899.
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index cfeaaaa803..caae562d67 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -59,11 +59,13 @@ namespace Sci { static int16 adjustGraphColor(int16 color) { - // WORKAROUND: SCI1 EGA and Amiga games can set invalid colors (above 0 - 15). - // Colors above 15 are all white in SCI1 EGA games, which is why this was never - // observed. We clip them all to (0, 15) instead, as colors above 15 are used - // for the undithering algorithm in EGA games - bug #3048908. - if (getSciVersion() >= SCI_VERSION_1_EARLY && g_sci->getResMan()->getViewType() == kViewEga) + // WORKAROUND: EGA and Amiga games can set invalid colors (above 0 - 15). + // It seems only the lower nibble was used in these games. + // bug #3048908, #3486899. + // Confirmed in EGA games KQ4(late), QFG1(ega), LB1 that + // at least FillBox (only one of the functions using adjustGraphColor) + // behaves like this. + if (g_sci->getResMan()->getViewType() == kViewEga) return color & 0x0F; // 0 - 15 else return color; |