From 5d046791248ff643c834eb403837a31fc2a40143 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Mon, 19 Jun 2017 19:30:47 -0500 Subject: SCI32: Add workaround for invalid kPalVarySetStart call in PQ4 Fixes Trac#9845. --- engines/sci/engine/kernel_tables.h | 2 +- engines/sci/engine/workarounds.cpp | 6 ++++++ engines/sci/engine/workarounds.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'engines/sci') diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index e077668df8..cb1f2ed37d 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -281,7 +281,7 @@ static const SciKernelMapSubEntry kPalVary_subops[] = { { SIG_SCI32, 5, MAP_CALL(PalVarySetTime), "i", NULL }, { SIG_SCI32, 6, MAP_CALL(PalVaryPauseResume), "i", NULL }, { SIG_SCI32, 7, MAP_CALL(PalVarySetTarget), "i", NULL }, - { SIG_SCI32, 8, MAP_CALL(PalVarySetStart), "i", NULL }, + { SIG_SCI32, 8, MAP_CALL(PalVarySetStart), "i", kPalVarySetStart_workarounds }, { SIG_SCI32, 9, MAP_CALL(PalVaryMergeStart), "i", kPalVaryMergeStart_workarounds }, #endif SCI_SUBOPENTRY_TERMINATOR diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 1b3cd35f58..a3c0005ccb 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -771,6 +771,12 @@ const SciWorkaroundEntry kPalVarySetPercent_workarounds[] = { SCI_WORKAROUNDENTRY_TERMINATOR }; +// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround +const SciWorkaroundEntry kPalVarySetStart_workarounds[] = { + { GID_PQ4, 170, 170, 0, "getHit", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Three extra parameters passed during the gunfight at the end of day 1 + SCI_WORKAROUNDENTRY_TERMINATOR +}; + // gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround const SciWorkaroundEntry kPalVaryMergeStart_workarounds[] = { { GID_PQ4, 170, 170, 0, "getHit", "changeState", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // Three extra parameters passed during the gunfight at the end of day 1 diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h index 5b716fd357..a965a14a42 100644 --- a/engines/sci/engine/workarounds.h +++ b/engines/sci/engine/workarounds.h @@ -90,6 +90,7 @@ extern const SciWorkaroundEntry kMoveCursor_workarounds[]; extern const SciWorkaroundEntry kNewWindow_workarounds[]; extern const SciWorkaroundEntry kPalVarySetVary_workarounds[]; extern const SciWorkaroundEntry kPalVarySetPercent_workarounds[]; +extern const SciWorkaroundEntry kPalVarySetStart_workarounds[]; extern const SciWorkaroundEntry kPalVaryMergeStart_workarounds[]; extern const SciWorkaroundEntry kPlatform32_workarounds[]; extern const SciWorkaroundEntry kRandom_workarounds[]; -- cgit v1.2.3