From 8dcdc63af186eba7e5c4d6f9f4e389455c6ff4aa Mon Sep 17 00:00:00 2001 From: sluicebox Date: Mon, 21 Oct 2019 10:59:56 -0700 Subject: SCI: Add LSL6 Mac Floppy kGetCWD workaround The game now starts --- 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') diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 396df9181b..0149f0ef8a 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -707,7 +707,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(Format), SIG_EVERYWHERE, "r[ri](.*)", NULL, NULL }, { MAP_CALL(GameIsRestarting), SIG_EVERYWHERE, "(i)", NULL, NULL }, { MAP_CALL(GetAngle), SIG_EVERYWHERE, "iiii", NULL, kGetAngle_workarounds }, - { MAP_CALL(GetCWD), SIG_EVERYWHERE, "r", NULL, NULL }, + { MAP_CALL(GetCWD), SIG_EVERYWHERE, "r", NULL, kGetCWD_workarounds }, { MAP_CALL(GetDistance), SIG_EVERYWHERE, "ii(i)(i)(i)(i)", NULL, NULL }, { MAP_CALL(GetEvent), SIG_SCIALL, SIGFOR_MAC, "io(i*)", NULL, NULL }, { MAP_CALL(GetEvent), SIG_EVERYWHERE, "io", NULL, NULL }, diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 15519fb3a2..c0713839ed 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -744,6 +744,12 @@ const SciWorkaroundEntry kGetAngle_workarounds[] = { SCI_WORKAROUNDENTRY_TERMINATOR }; +// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround +const SciWorkaroundEntry kGetCWD_workarounds[] = { + { GID_LSL6, -1, 0, 0, "LSL6", "play", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // Mac version passes uninitialized global (zero) on startup, then immediately overwrites it with kGetSaveDir + SCI_WORKAROUNDENTRY_TERMINATOR +}; + // gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround const SciWorkaroundEntry kFileIOOpen_workarounds[] = { { GID_HOYLE5, -1, 64990, 0, "Restore", "doit", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Missing second argument when checking for bridgesg.cat or poker.cat when showing restore dialog diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h index b244f8ba1b..528fa93ac3 100644 --- a/engines/sci/engine/workarounds.h +++ b/engines/sci/engine/workarounds.h @@ -79,6 +79,7 @@ extern const SciWorkaroundEntry kFindKey_workarounds[]; extern const SciWorkaroundEntry kFrameOut_workarounds[]; extern const SciWorkaroundEntry kDeleteKey_workarounds[]; extern const SciWorkaroundEntry kGetAngle_workarounds[]; +extern const SciWorkaroundEntry kGetCWD_workarounds[]; extern const SciWorkaroundEntry kGraphDrawLine_workarounds[]; extern const SciWorkaroundEntry kGraphSaveBox_workarounds[]; extern const SciWorkaroundEntry kGraphRestoreBox_workarounds[]; -- cgit v1.2.3