From bbad7ada1b88c18f89590119bccc0ae1bd70b04b Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Thu, 13 Jul 2017 21:06:24 -0500 Subject: 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. --- engines/sci/graphics/celobj32.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'engines/sci/graphics/celobj32.cpp') 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 celHeader = data.subspan(_celHeaderOffset); -- cgit v1.2.3