diff options
author | athrxx | 2019-03-26 22:37:50 +0100 |
---|---|---|
committer | athrxx | 2019-04-13 18:55:01 +0200 |
commit | 69f2e0caaa3b7257318f2e9943d233da45bfab80 (patch) | |
tree | 4fbd19a73fd00d6bac849185388f76b32ab986fe /engines/kyra/graphics/screen.cpp | |
parent | cbe81aa021bab1082ee6a652cbd15fe323ea2069 (diff) | |
download | scummvm-rg350-69f2e0caaa3b7257318f2e9943d233da45bfab80.tar.gz scummvm-rg350-69f2e0caaa3b7257318f2e9943d233da45bfab80.tar.bz2 scummvm-rg350-69f2e0caaa3b7257318f2e9943d233da45bfab80.zip |
KYRA: (EOB2/Amiga) - fix ingame colors
Diffstat (limited to 'engines/kyra/graphics/screen.cpp')
-rw-r--r-- | engines/kyra/graphics/screen.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/kyra/graphics/screen.cpp b/engines/kyra/graphics/screen.cpp index ea0871f317..b69cc07e77 100644 --- a/engines/kyra/graphics/screen.cpp +++ b/engines/kyra/graphics/screen.cpp @@ -100,6 +100,8 @@ bool Screen::init() { _useSJIS = false; _use16ColorMode = _vm->gameFlags().use16ColorMode; _isAmiga = (_vm->gameFlags().platform == Common::kPlatformAmiga); + // Amiga copper palette magic requires the use of more than 32 colors for some purposes. + _useAmigaExtraColors = (_isAmiga && _vm->game() == GI_EOB2); // We only check the "render_mode" setting for both Eye of the Beholder // games here, since all the other games do not support the render_mode @@ -174,14 +176,18 @@ bool Screen::init() { const int paletteCount = _isAmiga ? 13 : 4; // We allow 256 color palettes in EGA mode, since original EOB II code does the same and requires it const int numColors = _use16ColorMode ? 16 : (_isAmiga ? 32 : (_renderMode == Common::kRenderCGA ? 4 : 256)); + const int numColorsInternal = _useAmigaExtraColors ? 64 : numColors; _interfacePaletteEnabled = false; - _screenPalette = new Palette(numColors); + _screenPalette = new Palette(numColorsInternal); assert(_screenPalette); _palettes.resize(paletteCount); - for (int i = 0; i < paletteCount; ++i) { + _palettes[0] = new Palette(numColorsInternal); + assert(_palettes[0]); + + for (int i = 1; i < paletteCount; ++i) { _palettes[i] = new Palette(numColors); assert(_palettes[i]); } @@ -195,7 +201,7 @@ bool Screen::init() { Screen::setScreenPalette(pal); } - _internFadePalette = new Palette(numColors); + _internFadePalette = new Palette(numColorsInternal); assert(_internFadePalette); setScreenPalette(getPalette(0)); |