From 066a14bd4c688e82670f4d0b944fcaa969939895 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Mon, 2 Apr 2018 13:36:15 +0200 Subject: MOHAWK: MYST: Fix the myst flyby playing over the closed book In older releases of Myst the flyby video had the play on card change flag set to true, causing the bug. As a workaround patch the resource to mach newer releases. Fixes #10472. --- engines/mohawk/myst_areas.cpp | 11 ++++++++++- engines/mohawk/myst_areas.h | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/mohawk/myst_areas.cpp b/engines/mohawk/myst_areas.cpp index c9172ce366..eff51bf1c9 100644 --- a/engines/mohawk/myst_areas.cpp +++ b/engines/mohawk/myst_areas.cpp @@ -196,12 +196,21 @@ MystAreaVideo::MystAreaVideo(MohawkEngine_Myst *vm, ResourceType type, Common::S // Position values require modulus 10000 to keep in sane range. _left = rlstStream->readSint16LE() % 10000; _top = rlstStream->readSint16LE() % 10000; - _playOnCardChange = rlstStream->readUint16LE(); + _playOnCardChange = rlstStream->readUint16LE() != 0; _direction = rlstStream->readSint16LE(); _playBlocking = rlstStream->readUint16LE(); _loop = rlstStream->readUint16LE(); _playRate = rlstStream->readUint16LE(); + // WORKAROUND: Myst v1.0 has playOnCardChange set to true + // for the Myst flyby video shown during the intro. + // This causes the flyby to play over the closed Myst book picture. + // Later releases of the game have that flag set to false. + // Here we apply a resource patch to match the newer releases. + if (_videoFile == "qtw/intro/intro2.mov") { + _playOnCardChange = false; + } + debugC(kDebugResource, "\tvideoFile: \"%s\"", _videoFile.c_str()); debugC(kDebugResource, "\tleft: %d", _left); debugC(kDebugResource, "\ttop: %d", _top); diff --git a/engines/mohawk/myst_areas.h b/engines/mohawk/myst_areas.h index bfd370d504..b389f32ea1 100644 --- a/engines/mohawk/myst_areas.h +++ b/engines/mohawk/myst_areas.h @@ -126,7 +126,7 @@ protected: uint16 _loop; int16 _direction; // 1 => forward, -1 => backwards uint16 _playBlocking; - uint16 _playOnCardChange; + bool _playOnCardChange; uint16 _playRate; // percents }; -- cgit v1.2.3