From ffe3d8a195c93a5a1a4a68082a13df50b3ec6764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20Andersson?= Date: Tue, 19 Apr 2022 14:11:55 +0200 Subject: [PATCH] SCUMM: Fix MI2 Mac script patch comment It's clearer if the addresses are included. Also, the comment had the wrong jump address at one point. --- engines/scumm/resource.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp index 04d50d7d71e..1f903655a69 100644 --- a/engines/scumm/resource.cpp +++ b/engines/scumm/resource.cpp @@ -1693,22 +1693,22 @@ void ScummEngine::applyWorkaroundIfNeeded(ResType type, int idx) { byte *unpatchedScript = getResourceAddress(type, idx); const byte patch[] = { -0x48, 0x00, 0x40, 0x00, 0x00, 0x13, 0x00, // if (Local[0] == 0) { -0x33, 0x03, 0x00, 0x00, 0xc8, 0x00, // SetScreen(0,200); -0x0a, 0x82, 0xff, // startScript(130,[]); -0x80, // breakHere(); -0x68, 0x00, 0x00, 0x82, // VAR_RESULT = isScriptRunning(130); -0x28, 0x00, 0x00, 0xf6, 0xff, // unless (!VAR_RESULT) goto 0955; - // } -0x48, 0x00, 0x40, 0x3f, 0xe1, 0x1d, 0x00, // if (Local[0] == -7873) [ -0x1a, 0x32, 0x00, 0x3f, 0x01, // VAR_MAINMENU_KEY = 319; -0x33, 0x03, 0x00, 0x00, 0xc8, 0x00, // SetScreen(0,200); -0x0a, 0x82, 0xff, // startScript(130,[]); -0x80, // breakHere(); -0x68, 0x00, 0x00, 0x82, // VAR_RESULT = isScriptRunning(130); -0x28, 0x00, 0x00, 0xf6, 0xff, // unless (!VAR_RESULT) goto 0955; -0x1a, 0x00, 0x40, 0x00, 0x00 // Local[0] = 0; - // } +0x48, 0x00, 0x40, 0x00, 0x00, 0x13, 0x00, // [0926] if (Local[0] == 0) { +0x33, 0x03, 0x00, 0x00, 0xc8, 0x00, // [092D] SetScreen(0,200); +0x0a, 0x82, 0xff, // [0933] startScript(130,[]); +0x80, // [0936] breakHere(); +0x68, 0x00, 0x00, 0x82, // [0937] VAR_RESULT = isScriptRunning(130); +0x28, 0x00, 0x00, 0xf6, 0xff, // [093B] unless (!VAR_RESULT) goto 0936; + // [0940] } +0x48, 0x00, 0x40, 0x3f, 0xe1, 0x1d, 0x00, // [0940] if (Local[0] == -7873) [ +0x1a, 0x32, 0x00, 0x3f, 0x01, // [0947] VAR_MAINMENU_KEY = 319; +0x33, 0x03, 0x00, 0x00, 0xc8, 0x00, // [094C] SetScreen(0,200); +0x0a, 0x82, 0xff, // [0952] startScript(130,[]); +0x80, // [0955] breakHere(); +0x68, 0x00, 0x00, 0x82, // [0956] VAR_RESULT = isScriptRunning(130); +0x28, 0x00, 0x00, 0xf6, 0xff, // [095A] unless (!VAR_RESULT) goto 0955; +0x1a, 0x00, 0x40, 0x00, 0x00 // [095F] Local[0] = 0; + // [0964] } }; byte *patchedScript = new byte[6780];