diff options
author | Travis Howell | 2003-10-05 02:58:11 +0000 |
---|---|---|
committer | Travis Howell | 2003-10-05 02:58:11 +0000 |
commit | 9e0b1ca890fb0ae355bd2744f5a95d88455f69a0 (patch) | |
tree | ebcbcfde0b14accc4b7757730a7089cf7385ef85 | |
parent | 661d58330354cefa2b291b1acdad84f90768b9f7 (diff) | |
download | scummvm-rg350-9e0b1ca890fb0ae355bd2744f5a95d88455f69a0.tar.gz scummvm-rg350-9e0b1ca890fb0ae355bd2744f5a95d88455f69a0.tar.bz2 scummvm-rg350-9e0b1ca890fb0ae355bd2744f5a95d88455f69a0.zip |
Use _roomPalette for 256 color 'SMALL_HEADER' games too, since it seems to help some.
svn-id: r10599
-rw-r--r-- | scumm/gfx.cpp | 24 | ||||
-rw-r--r-- | scumm/script_v5.cpp | 9 |
2 files changed, 14 insertions, 19 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index f86b4e568d..381e6fb92a 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -1770,7 +1770,7 @@ void Gdi::unkDecodeA(byte *dst, const byte *src, int height) { int x = 8; do { FILL_BITS; - *dst++ = color + _palette_mod; + *dst++ = (_vm->_features & GF_SMALL_HEADER) ? _vm->_roomPalette[color + _palette_mod] : color + _palette_mod; againPos: if (!READ_BIT) { @@ -1819,7 +1819,7 @@ void Gdi::unkDecodeA_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++; againPos: @@ -1870,7 +1870,7 @@ void Gdi::unkDecodeB(byte *dst, const byte *src, int height) { int x = 8; do { FILL_BITS; - *dst++ = color + _palette_mod; + *dst++ = (_vm->_features & GF_SMALL_HEADER) ? _vm->_roomPalette[color + _palette_mod] : color + _palette_mod; if (!READ_BIT) { } else if (!READ_BIT) { FILL_BITS; @@ -1901,7 +1901,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) { @@ -1933,7 +1933,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) { @@ -1966,7 +1966,7 @@ void Gdi::unkDecodeC_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 += _vm->_screenWidth; if (!READ_BIT) { } else if (!READ_BIT) { @@ -2043,7 +2043,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); } @@ -2072,7 +2072,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; @@ -2084,7 +2084,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; @@ -2113,13 +2113,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); } @@ -2136,7 +2136,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 857883cfa2..670622aa6a 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -1834,13 +1834,8 @@ void ScummEngine_v5::o5_roomOps() { b = getVarOrDirectWord(0x40); } checkRange(256, 0, a, "o5_roomOps: 2: Illegal room color slot (%d)"); - if (_features & GF_16COLOR) { - _roomPalette[b] = a; - _fullRedraw = true; - } else { - _shadowPalette[b] = a; - setDirtyColors(b, b); - } + _roomPalette[b] = a; + _fullRedraw = true; } else { error("room-color is no longer a valid command"); } |