diff options
author | Travis Howell | 2009-01-04 00:58:45 +0000 |
---|---|---|
committer | Travis Howell | 2009-01-04 00:58:45 +0000 |
commit | 4670e37a78409bfe9279c5d73c8d581f0d66143e (patch) | |
tree | 3bf9094f7ff49bb7a81488a22a2f28d0d5916f8f /engines/scumm/akos.cpp | |
parent | 3a4b4831dce092ac04f0756b48c3d73c8638449c (diff) | |
download | scummvm-rg350-4670e37a78409bfe9279c5d73c8d581f0d66143e.tar.gz scummvm-rg350-4670e37a78409bfe9279c5d73c8d581f0d66143e.tar.bz2 scummvm-rg350-4670e37a78409bfe9279c5d73c8d581f0d66143e.zip |
Use slow palette color match, for 16bit color HE games for now.
svn-id: r35713
Diffstat (limited to 'engines/scumm/akos.cpp')
-rw-r--r-- | engines/scumm/akos.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp index 19c7c3320b..fc4aabcf88 100644 --- a/engines/scumm/akos.cpp +++ b/engines/scumm/akos.cpp @@ -303,6 +303,19 @@ void AkosRenderer::setPalette(byte *new_palette) { if (_vm->_game.heversion >= 99 && _paletteNum) { for (i = 0; i < size; i++) _palette[i] = (byte)_vm->_hePalettes[_paletteNum * 1024 + 768 + akpl[i]]; + } else if (_vm->_game.heversion >= 99 && rgbs) { + for (i = 0; i < size; i++) { + if (new_palette[i] == 0xFF) { + uint8 col = akpl[i]; + uint8 r = rgbs[col * 3 + 0]; + uint8 g = rgbs[col * 3 + 1]; + uint8 b = rgbs[col * 3 + 2]; + + _palette[i] = _vm->remapPaletteColor(r, g, b, -1); + } else { + _palette[i] = new_palette[i]; + } + } } else { for (i = 0; i < size; i++) { _palette[i] = new_palette[i] != 0xFF ? new_palette[i] : akpl[i]; @@ -336,6 +349,7 @@ void AkosRenderer::setCostume(int costume, int shadow) { akpl = _vm->findResourceData(MKID_BE('AKPL'), akos); _codec = READ_LE_UINT16(&akhd->codec); akct = _vm->findResourceData(MKID_BE('AKCT'), akos); + rgbs = _vm->findResourceData(MKID_BE('RGBS'), akos); xmap = 0; if (shadow) { |