diff options
author | Martin Kiewitz | 2010-01-25 11:15:40 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-25 11:15:40 +0000 |
commit | 9f1962d00681b0571c476d94b0c70b2151b27d7f (patch) | |
tree | 911fe62c19fc24e93679a62bf0acbb2dd49dcb20 /engines/sci/graphics/palette.cpp | |
parent | 8d12d846098797df7904e9d128a14d3c05942d83 (diff) | |
download | scummvm-rg350-9f1962d00681b0571c476d94b0c70b2151b27d7f.tar.gz scummvm-rg350-9f1962d00681b0571c476d94b0c70b2151b27d7f.tar.bz2 scummvm-rg350-9f1962d00681b0571c476d94b0c70b2151b27d7f.zip |
SCI: support for amiga pictures that change the palette
svn-id: r47552
Diffstat (limited to 'engines/sci/graphics/palette.cpp')
-rw-r--r-- | engines/sci/graphics/palette.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index b7233b5412..617fc5bbf8 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -171,6 +171,21 @@ int16 SciPalette::mapAmigaColor(int16 color) { return _amigaEGAtable[color]; } +// Called from picture class, some amiga sci1 games set half of the palette +void SciPalette::modifyAmigaPalette(byte *data) { + int16 curColor, curPos = 0; + byte byte1, byte2; + for (curColor = 0; curColor < 16; curColor++) { + byte1 = data[curPos++]; + byte2 = data[curPos++]; + _sysPalette.colors[curColor].r = (byte1 & 0x0F) * 0x11; + _sysPalette.colors[curColor].g = ((byte2 & 0xF0) >> 4) * 0x11; + _sysPalette.colors[curColor].b = (byte2 & 0x0F) * 0x11; + } + _screen->setPalette(&_sysPalette); + // TODO: when games do this it seems the EGAmapping isnt used anymore, at least the colors are wrong in any case +} + void SciPalette::setEGA() { int curColor; byte color1, color2; |