From 53242d84e88ff601cbe8c5265d4e7465f8f2e053 Mon Sep 17 00:00:00 2001 From: Kaloyan Chehlarski Date: Thu, 11 May 2023 21:51:43 +0300 Subject: [PATCH] NANCY: Fix reading of Overlay in nancy3 --- engines/nancy/action/overlay.cpp | 3 +-- engines/nancy/commontypes.cpp | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/engines/nancy/action/overlay.cpp b/engines/nancy/action/overlay.cpp index f9f2bf5ff13..8ad03b00306 100644 --- a/engines/nancy/action/overlay.cpp +++ b/engines/nancy/action/overlay.cpp @@ -48,10 +48,9 @@ void Overlay::readData(Common::SeekableReadStream &stream) { uint16 numSrcRects; readFilename(ser, _imageName); - ser.skip(2); + ser.skip(2, kGameTypeVampire, kGameTypeNancy2); ser.syncAsUint16LE(_transparency); ser.syncAsUint16LE(_hasSceneChange); - ser.syncAsUint16LE(_enableHotspot, kGameTypeNancy2); ser.syncAsUint16LE(_z, kGameTypeNancy2); ser.syncAsUint16LE(_overlayType, kGameTypeNancy2); diff --git a/engines/nancy/commontypes.cpp b/engines/nancy/commontypes.cpp index 5bf711a5cf2..0df1b79a5cb 100644 --- a/engines/nancy/commontypes.cpp +++ b/engines/nancy/commontypes.cpp @@ -65,6 +65,11 @@ void BitmapDescription::readData(Common::SeekableReadStream &stream, bool frameI } else { frameID = stream.readUint32LE(); } + + if (g_nancy->getGameType() >= kGameTypeNancy3) { + // Most likely transparency + stream.skip(2); + } readRect(stream, src); readRect(stream, dest);