diff options
author | Travis Howell | 2003-08-27 03:54:50 +0000 |
---|---|---|
committer | Travis Howell | 2003-08-27 03:54:50 +0000 |
commit | e37c9305331f9c5863696462ea59f8f0cacccf49 (patch) | |
tree | d45d800e6cd7bdcad9e1fada677f714f4cab80bd /scumm | |
parent | 06d07054c355e8c76574fd47d27df3e182c6e8d3 (diff) | |
download | scummvm-rg350-e37c9305331f9c5863696462ea59f8f0cacccf49.tar.gz scummvm-rg350-e37c9305331f9c5863696462ea59f8f0cacccf49.tar.bz2 scummvm-rg350-e37c9305331f9c5863696462ea59f8f0cacccf49.zip |
Add change ot fix pallete issue in 256 color small_header games
svn-id: r9874
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/gfx.cpp | 16 | ||||
-rw-r--r-- | scumm/script_v5.cpp | 13 |
2 files changed, 9 insertions, 20 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index b2cb92d8a9..4448321805 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -1898,7 +1898,7 @@ void Gdi::unkDecodeB_trans(byte *dst, const byte *src, int height) { do { FILL_BITS; if (color != _transparentColor) - *dst = color + _palette_mod; + *dst = (_vm->_features & GF_SMALL_HEADER) ? _vm->_roomPalette[color + _palette_mod] : color + _palette_mod; dst++; if (!READ_BIT) { } else if (!READ_BIT) { @@ -1930,7 +1930,7 @@ void Gdi::unkDecodeC(byte *dst, const byte *src, int height) { int h = height; do { FILL_BITS; - *dst = color + _palette_mod; + *dst = (_vm->_features & GF_SMALL_HEADER) ? _vm->_roomPalette[color + _palette_mod] : color + _palette_mod; dst += _vm->_screenWidth; if (!READ_BIT) { } else if (!READ_BIT) { @@ -2036,7 +2036,7 @@ void Gdi::unkDecode8(byte *dst, const byte *src, int height) { byte color = *src++; do { - *dst = color; + *dst = _vm->_roomPalette[color]; NEXT_ROW } while (--run); } @@ -2065,7 +2065,7 @@ void Gdi::unkDecode9(byte *dst, const byte *src, int height) { color += bits << i; } for (i = 0; i < ((c & 3) + 2); i++) { - *dst = (run * 16 + color); + *dst = (run * 16 + _vm->_roomPalette[color]); NEXT_ROW } break; @@ -2077,7 +2077,7 @@ void Gdi::unkDecode9(byte *dst, const byte *src, int height) { READ_256BIT; color += bits << j; } - *dst = (run * 16 + color); + *dst = (run * 16 + _vm->_roomPalette[color]); NEXT_ROW } break; @@ -2106,13 +2106,13 @@ void Gdi::unkDecode10(byte *dst, const byte *src, int height) { for (;;) { byte color = *src++; if (color < numcolors) { - *dst = local_palette[color]; + *dst = local_palette[_vm->_roomPalette[color]]; NEXT_ROW } else { uint run = color - numcolors + 1; color = *src++; do { - *dst = color; + *dst = _vm->_roomPalette[color]; NEXT_ROW } while (--run); } @@ -2129,7 +2129,7 @@ void Gdi::unkDecode11(byte *dst, const byte *src, int height) { do { int h = height; do { - *dst = color; + *dst = _vm->_roomPalette[color]; dst += _vm->_screenWidth; for (i = 0; i < 3; i++) { READ_256BIT diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index 694c31b46c..94281b4fd9 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -1661,18 +1661,7 @@ void Scumm_v5::o5_roomOps() { b = getVarOrDirectWord(0x40); } checkRange(256, 0, a, "o5_roomOps: 2: Illegal room color slot (%d)"); - // FIXME - fingolfin thinks our whole _shadowPalette usage is weird. - // It seems very suspicious that subopcode 2 is identical to subopcode 4 - // for GF_SMALL_HEADER games. Needs investigation. -// printf("copyPalColor(%d, %d)\n", a, b); -// copyPalColor(a, b); - if (_features & GF_16COLOR) { - _roomPalette[b] = a; - } else { - _shadowPalette[b] = a; - setDirtyColors(b, b); - } - } else { + _roomPalette[b] = a; error("room-color is no longer a valid command"); } break; |