aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/celobj32.cpp
diff options
context:
space:
mode:
authorColin Snover2017-07-13 21:06:24 -0500
committerColin Snover2017-07-13 21:31:21 -0500
commitbbad7ada1b88c18f89590119bccc0ae1bd70b04b (patch)
treebb44f918e578e3751d4054cf207b97e9f441d3ff /engines/sci/graphics/celobj32.cpp
parent7543bd444d46b2a8d4a2c79967c0a8d45a0874d1 (diff)
downloadscummvm-rg350-bbad7ada1b88c18f89590119bccc0ae1bd70b04b.tar.gz
scummvm-rg350-bbad7ada1b88c18f89590119bccc0ae1bd70b04b.tar.bz2
scummvm-rg350-bbad7ada1b88c18f89590119bccc0ae1bd70b04b.zip
SCI32: Ignore chest view palette in Phantasmagoria
This fixes the 3-frame glitch that was also present in the original game when moving in the chapel from room 6500 to 6400 in chapter 7. Fixes Trac#9788.
Diffstat (limited to 'engines/sci/graphics/celobj32.cpp')
-rw-r--r--engines/sci/graphics/celobj32.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/sci/graphics/celobj32.cpp b/engines/sci/graphics/celobj32.cpp
index df55ec9567..49b3b0053b 100644
--- a/engines/sci/graphics/celobj32.cpp
+++ b/engines/sci/graphics/celobj32.cpp
@@ -982,7 +982,19 @@ CelObjView::CelObjView(const GuiResourceId viewId, const int16 loopNo, const int
error("Cel is less than 0 on loop 0");
}
- _hunkPaletteOffset = data.getUint32SEAt(8);
+ // HACK: Phantasmagoria view 64001 contains a bad palette that overwrites
+ // parts of the palette used by the background picture in room 6400, causing
+ // the black shadows to become tan, and many of the other background colors
+ // to end up a little bit off. View 64001 renders fine using the existing
+ // palette created by the background image, so here we just ignore the
+ // embedded palette entirely.
+ if (g_sci->getGameId() == GID_PHANTASMAGORIA &&
+ _info.type == kCelTypeView && _info.resourceId == 64001) {
+
+ _hunkPaletteOffset = 0;
+ } else {
+ _hunkPaletteOffset = data.getUint32SEAt(8);
+ }
_celHeaderOffset = loopHeader.getUint32SEAt(12) + (data[13] * _info.celNo);
const SciSpan<const byte> celHeader = data.subspan(_celHeaderOffset);