diff options
author | Max Horn | 2002-12-11 20:48:32 +0000 |
---|---|---|
committer | Max Horn | 2002-12-11 20:48:32 +0000 |
commit | 6e5f8e0111d913359dcd94d79a65205d8457a8ed (patch) | |
tree | 5ea8bf79e59a9a50b13631b93c69e8e68097cef6 | |
parent | bf62494fd5fc578a609b5986237035997c214b15 (diff) | |
download | scummvm-rg350-6e5f8e0111d913359dcd94d79a65205d8457a8ed.tar.gz scummvm-rg350-6e5f8e0111d913359dcd94d79a65205d8457a8ed.tar.bz2 scummvm-rg350-6e5f8e0111d913359dcd94d79a65205d8457a8ed.zip |
Patch #651882: Noir mode fix
svn-id: r5906
-rw-r--r-- | scumm/script_v2.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index 484de5170a..0a556a0838 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -1579,16 +1579,18 @@ void Scumm::o6_roomOps() break; case 213: /* set palette */ - // One case where this is used is to turn off Sam & Max film - // noir mode. Unfortunately it only restores color to the - // palette, it doesn't take palette manipulation (darkening, - // etc.) into account. So, for instance, if you turn on film - // noir mode in Sam & Max's office, turn off the light and turn - // off film noir mode, the room will no longer look dark. - // - // This bug is present in the original interpreter, so it may - // not be worth the trouble fixing it. - setPalette(pop()); + a = pop(); + + // This opcode is used when turning off noir mode in Sam & Max, + // but since our implementation of this feature doesn't change + // the original palette there's no need to reload it. Doing it + // this way, we avoid some graphics glitches that the original + // interpreter had. + + if (_gameId == GID_SAMNMAX && vm.slot[_currentScript].number == 64) + setDirtyColors(0, 255); + else + setPalette(a); break; default: |