From f939868f3a10c0d8a48e602e4ce330982b7fa198 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Sat, 18 Jun 2016 21:10:15 -0500 Subject: SCI32: Add kDoSound(play) workaround for LSL6hires --- 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 d3a1d43332..15a2049d05 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -160,7 +160,7 @@ static const SciKernelMapSubEntry kDoSound_subops[] = { { SIG_SOUNDSCI21, 5, MAP_CALL(DoSoundSuspend), "i", NULL }, { SIG_SOUNDSCI21, 6, MAP_CALL(DoSoundInit), "o", NULL }, { SIG_SOUNDSCI21, 7, MAP_CALL(DoSoundDispose), "o", NULL }, - { SIG_SOUNDSCI21, 8, MAP_CALL(DoSoundPlay), "o", NULL }, + { SIG_SOUNDSCI21, 8, MAP_CALL(DoSoundPlay), "o", kDoSoundPlay_workarounds }, // ^^ TODO: if this is really the only change between SCI1LATE AND SCI21, we could rename the // SIG_SOUNDSCI1LATE #define to SIG_SINCE_SOUNDSCI1LATE and make it being SCI1LATE+. Although // I guess there are many more changes somewhere diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 0cb8ff48d7..d86ad60c8a 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -513,6 +513,12 @@ const SciWorkaroundEntry kDisposeScript_workarounds[] = { SCI_WORKAROUNDENTRY_TERMINATOR }; +// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround +const SciWorkaroundEntry kDoSoundPlay_workarounds[] = { + { GID_LSL6HIRES, -1, 64989, 0, NULL, "play", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // always passes an extra null argument + SCI_WORKAROUNDENTRY_TERMINATOR +}; + // gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround const SciWorkaroundEntry kDoSoundFade_workarounds[] = { { GID_KQ5, 213, 989, 0, "globalSound3", "fade", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // english floppy: when bandits leave the secret temple, parameter 4 is an object - bug #5078 diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h index 8f519a8c9c..680aa471ad 100644 --- a/engines/sci/engine/workarounds.h +++ b/engines/sci/engine/workarounds.h @@ -74,6 +74,7 @@ extern const SciWorkaroundEntry kDeviceInfo_workarounds[]; extern const SciWorkaroundEntry kDisplay_workarounds[]; extern const SciWorkaroundEntry kDirLoop_workarounds[]; extern const SciWorkaroundEntry kDisposeScript_workarounds[]; +extern const SciWorkaroundEntry kDoSoundPlay_workarounds[]; extern const SciWorkaroundEntry kDoSoundFade_workarounds[]; extern const SciWorkaroundEntry kFindKey_workarounds[]; extern const SciWorkaroundEntry kDeleteKey_workarounds[]; -- cgit v1.2.3