[Scummvm-git-logs] scummvm master -> 46e2f0bec9bab184aa81ff2296b65c1b7899e410
sluicebox
22204938+sluicebox at users.noreply.github.com
Sat Sep 7 00:15:33 CEST 2019
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
46a4cdc993 SCI: Fix KQ6 Drink Me script patch on Mac
46e2f0bec9 SCI: Fix KQ6 Drink Me missing Mac pic
Commit: 46a4cdc9939d3062ba11f248a435c4800ef79ef4
https://github.com/scummvm/scummvm/commit/46a4cdc9939d3062ba11f248a435c4800ef79ef4
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-09-06T15:09:04-07:00
Commit Message:
SCI: Fix KQ6 Drink Me script patch on Mac
Changed paths:
engines/sci/engine/script_patches.cpp
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 03b7f3a..0a34536 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -3562,9 +3562,9 @@ static const uint16 kq6SignatureDrinkMeFix[] = {
};
static const uint16 kq6PatchDrinkMeFix[] = {
- PATCH_ADDTOOFFSET(+5), // skip to bnt offset
- PATCH_GETORIGINALBYTEADJUST(+5, +13), // [check for 11h code] (adjust bnt offset)
- PATCH_ADDTOOFFSET(+162),
+ PATCH_ADDTOOFFSET(+4),
+ 0x30, PATCH_UINT16(0x00b1), // bnt 00b1 [ check for 11h code ]
+ PATCH_ADDTOOFFSET(+161),
0x39, PATCH_SELECTOR8(doit), // pushi doit
0x76, // push0
0x81, 0x0a, // lag global[0a]
Commit: 46e2f0bec9bab184aa81ff2296b65c1b7899e410
https://github.com/scummvm/scummvm/commit/46e2f0bec9bab184aa81ff2296b65c1b7899e410
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-09-06T15:13:43-07:00
Commit Message:
SCI: Fix KQ6 Drink Me missing Mac pic
Changed paths:
engines/sci/engine/script_patches.cpp
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 0a34536..8b31e44 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -3580,6 +3580,31 @@ static const uint16 kq6PatchDrinkMeFix[] = {
PATCH_END
};
+// KQ6 Mac is missing pic 981 and crashes when drinking the "Drink Me" bottle.
+// This also crashed the original. Pic 981 is a black background and it's only
+// used in this scene. Pic 98 is also a black background and used when the game
+// starts and everywhere else. We restore this scene in by switching to pic 98.
+//
+// This patch is only enabled on Mac as the script is the same in all versions.
+// The pics have different palettes and applying it to PC would disable the
+// palette cycling between red and black during this scene. KQ6 Mac didn't do
+// these palette cycling effects as it didn't include any palette resources.
+//
+// Applies to: English Mac
+// Responsible method: drinkMeScript:changeState(0)
+static const uint16 kq6SignatureMacDrinkMePic[] = {
+ SIG_MAGICDWORD,
+ 0x38, SIG_UINT16(0x03d5), // pushi 981d
+ 0x39, 0x09, // pushi 09
+ 0x43, 0x08, 0x04, // callk DrawPic 04
+ SIG_END
+};
+
+static const uint16 kq6PatchMacDrinkMePic[] = {
+ 0x38, PATCH_UINT16(0x0062), // pushi 98d
+ PATCH_END
+};
+
// During the common Game Over cutscene, one of the guys says "Tickets, only",
// but the subtitle says "Tickets, please". Normally people wouldn't have
// noticed, but ScummVM supports audio + subtitles in this game at the same
@@ -4144,6 +4169,7 @@ static const uint16 kq6CDPatchAudioTextMenuSupport[] = {
// script, description, signature patch
static const SciScriptPatcherEntry kq6Signatures[] = {
{ true, 87, "fix Drink Me bottle", 1, kq6SignatureDrinkMeFix, kq6PatchDrinkMeFix },
+ { false, 87, "Mac: Drink Me pic", 1, kq6SignatureMacDrinkMePic, kq6PatchMacDrinkMePic },
{ true, 480, "CD: fix wallflower dance", 1, kq6CDSignatureWallFlowerDanceFix, kq6CDPatchWallFlowerDanceFix },
{ true, 481, "fix duplicate baby cry", 1, kq6SignatureDuplicateBabyCry, kq6PatchDuplicateBabyCry },
{ true, 640, "fix 'Tickets, only' message", 1, kq6SignatureTicketsOnly, kq6PatchTicketsOnly },
@@ -16552,6 +16578,10 @@ void ScriptPatcher::processScript(uint16 scriptNr, SciSpan<byte> scriptData) {
// Enables Dual mode patches (audio + subtitles at the same time) for King's Quest 6
enablePatch(signatureTable, "CD: audio + text support");
}
+ if (_isMacSci11) {
+ // Enables Mac-only patch to workaround missing pic
+ enablePatch(signatureTable, "Mac: Drink Me pic");
+ }
break;
case GID_LAURABOW2:
if (g_sci->isCD()) {
More information about the Scummvm-git-logs
mailing list