diff options
author | Travis Howell | 2004-06-27 10:54:31 +0000 |
---|---|---|
committer | Travis Howell | 2004-06-27 10:54:31 +0000 |
commit | 372296e918e7700c54d762d8924b1d692eecdd81 (patch) | |
tree | ac93cce379e52633a9e431259abb69ea09db3a9d /scumm | |
parent | 4ffcdcdf4f3d16e3583920f5b0c844b67871ffeb (diff) | |
download | scummvm-rg350-372296e918e7700c54d762d8924b1d692eecdd81.tar.gz scummvm-rg350-372296e918e7700c54d762d8924b1d692eecdd81.tar.bz2 scummvm-rg350-372296e918e7700c54d762d8924b1d692eecdd81.zip |
Fix actor palette in HE 7.0 games.
Use roompalette[] for all graphics decoders
svn-id: r14075
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/akos.cpp | 5 | ||||
-rw-r--r-- | scumm/gfx.cpp | 6 | ||||
-rw-r--r-- | scumm/scumm.cpp | 12 | ||||
-rw-r--r-- | scumm/scumm.h | 3 |
4 files changed, 21 insertions, 5 deletions
diff --git a/scumm/akos.cpp b/scumm/akos.cpp index 696e1512ed..e36d960417 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -221,7 +221,10 @@ void AkosRenderer::setPalette(byte *new_palette) { palette[i] = new_palette[i] != 0xFF ? new_palette[i] : the_akpl[i]; } - if (size == 256) { + if (_vm->_heversion == 70 && size) { + for (i = 0; i < size; i++) + palette[i] = _vm->he_actor_palette[palette[i]]; + } else if (size == 256) { byte color = new_palette[0]; if (color == 255) { palette[0] = color; diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index a10b37914a..15aa453e24 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -2236,7 +2236,7 @@ void Gdi::decodeStrip3DO(byte *dst, const byte *src, int height, byte transpChec for (; data > 0; data--, src++, dst++) { if (*src != _transparentColor || !transpCheck) - *dst = *src; + *dst = _roomPalette[*src]; destbytes++; if (!(destbytes & 7)) @@ -2262,7 +2262,7 @@ void Gdi::decodeStrip3DO(byte *dst, const byte *src, int height, byte transpChec for (; data > 0; data--, dst++) { if (color != _transparentColor || !transpCheck) - *dst = color; + *dst = _roomPalette[color]; destbytes++; if (!(destbytes & 7)) dst += 312; @@ -2288,7 +2288,7 @@ void Gdi::decodeStripHE(byte *dst, const byte *src, int height, byte transpCheck while (height) { for (iteration = 0; iteration < 8; iteration++) { if (color != _transparentColor || !transpCheck) - *dst = color; + *dst = _roomPalette[color]; dst++; if (shift <= 16) { data |= *src << shift; diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index cfe04cf4df..02604cb1f9 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -2501,6 +2501,18 @@ void ScummEngine::initRoomSubBlocks() { } } + // Actor Palette in HE 7.0 games + if (_heversion == 70) { + ptr = findResourceData(MKID('REMP'), roomptr); + if (ptr) { + for (i = 0; i < 256; i++) + he_actor_palette[i] = *ptr++; + } else { + for (i = 0; i < 256; i++) + he_actor_palette[i] = i; + } + } + // Transparent color if (_features & GF_OLD_BUNDLE) gdi._transparentColor = 255; // TODO - FIXME diff --git a/scumm/scumm.h b/scumm/scumm.h index 19ca848dd5..e6089fb74d 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -1008,9 +1008,11 @@ protected: bool testGfxOtherUsageBits(int strip, int bit); public: + byte he_actor_palette[256]; byte _proc_special_palette[256]; byte _roomPalette[256]; byte *_shadowPalette; + int _staticVar1, _staticVar2, _staticVar3, _staticVar4, _staticVar5; protected: int _shadowPaletteSize; @@ -1030,7 +1032,6 @@ protected: int _saveSound; bool _native_mt32; int _midiDriver; // Use the MD_ values from mididrv.h - int _staticVar1, _staticVar2, _staticVar3, _staticVar4, _staticVar5; bool _copyProtection; bool _demoMode; bool _confirmExit; |