diff options
author | Paweł Kołodziejski | 2002-08-08 11:14:45 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2002-08-08 11:14:45 +0000 |
commit | 9409960e599d862edbe7aee34ed765b9e9a7b8e7 (patch) | |
tree | 57c7e56ef8aeddc1a7073849a20a335f532457a1 | |
parent | a92a750f48f406435f949764cbc30547fbb9e6cd (diff) | |
download | scummvm-rg350-9409960e599d862edbe7aee34ed765b9e9a7b8e7.tar.gz scummvm-rg350-9409960e599d862edbe7aee34ed765b9e9a7b8e7.tar.bz2 scummvm-rg350-9409960e599d862edbe7aee34ed765b9e9a7b8e7.zip |
Patch #591581 to fix #558711. Please check SMALL_HEADER games to make
sure this doesn't cause any sideeffects.
svn-id: r4718
-rw-r--r-- | script_v1.cpp | 4 | ||||
-rw-r--r-- | scummvm.cpp | 21 |
2 files changed, 16 insertions, 9 deletions
diff --git a/script_v1.cpp b/script_v1.cpp index ecba63dc4c..6788418497 100644 --- a/script_v1.cpp +++ b/script_v1.cpp @@ -1922,8 +1922,8 @@ void Scumm::o5_roomOps() b = getVarOrDirectWord(0x40); } checkRange(256, 0, a, "o5_roomOps: 2: Illegal room color slot (%d)"); - _shadowPalette[a] = b; - // _fullRedraw = 1; + _shadowPalette[b] = a; + setDirtyColors(b, b); } else { a = getVarOrDirectWord(0x80); b = getVarOrDirectWord(0x40); diff --git a/scummvm.cpp b/scummvm.cpp index 2298dd6356..aaef953b3e 100644 --- a/scummvm.cpp +++ b/scummvm.cpp @@ -1381,19 +1381,26 @@ void Scumm::updatePalette() { int first = _palDirtyMin; int num = _palDirtyMax - first + 1; int i; - byte *data = _currentPalette + first * 3; byte palette_colors[1024],*p = palette_colors; // Sam & Max film noir mode if (_gameId == GID_SAMNMAX && readVar(0x8000)) desaturatePalette(); - - for (i = 0; i != num; i++, data += 3, p+=4) { - p[0] = data[0]; - p[1] = data[1]; - p[2] = data[2]; - p[3] = 0; + + for (i = _palDirtyMin; i <= _palDirtyMax; i++) { + byte *data; + + if (_features & GF_SMALL_HEADER) + data = _currentPalette + _shadowPalette[i] * 3; + else + data = _currentPalette + i * 3; + + *p++ = data[0]; + *p++ = data[1]; + *p++ = data[2]; + *p++ = 0; + } _system->set_palette(palette_colors, first, num); |