diff options
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 3 | ||||
-rw-r--r-- | engines/sci/engine/workarounds.cpp | 6 | ||||
-rw-r--r-- | engines/sci/engine/workarounds.h | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index e8e691a0ff..904bfa6ab3 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -351,8 +351,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(FlushResources), SIG_EVERYWHERE, "i", NULL, NULL }, { MAP_CALL(Format), SIG_EVERYWHERE, "r(.*)", NULL, NULL }, { MAP_CALL(GameIsRestarting), SIG_EVERYWHERE, "(i)", NULL, NULL }, - { MAP_CALL(GetAngle), SIG_EVERYWHERE, "iiii", NULL, NULL }, - // ^^ FIXME - occasionally KQ6 passes a 5th argument by mistake + { MAP_CALL(GetAngle), SIG_EVERYWHERE, "iiii", NULL, kGetAngle_workarounds }, { MAP_CALL(GetCWD), SIG_EVERYWHERE, "r", NULL, NULL }, { MAP_CALL(GetDistance), SIG_EVERYWHERE, "ii(i)(i)(i)(i)", NULL, NULL }, { MAP_CALL(GetEvent), SIG_SCIALL, SIGFOR_MAC, "io(i*)", NULL, NULL }, diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index d58c4754fd..b79fd9b114 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -142,6 +142,12 @@ const SciWorkaroundEntry kDoSoundFade_workarounds[] = { }; // gameID, room,script,lvl, object-name, method-name, call,index, workaround +const SciWorkaroundEntry kGetAngle_workarounds[] = { + { GID_KQ6, -1, 752, 0, "throwDazzle", "changeState", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // after the Genie is exposed in the Palace (short and long ending), it starts shooting lightning bolts around. An extra 5th parameter is passed. + SCI_WORKAROUNDENTRY_TERMINATOR +}; + +// gameID, room,script,lvl, object-name, method-name, call,index, workaround const SciWorkaroundEntry kGraphDrawLine_workarounds[] = { { GID_ISLANDBRAIN, 300, 300, 0, "dudeViewer", "show", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // when looking at the gene explanation chart, gets called with 1 extra parameter { GID_SQ1, 43, 43, 0, "someoneDied", "changeState", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // when ordering beer, gets called with 1 extra parameter diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h index 22358bf4bb..3009bf4156 100644 --- a/engines/sci/engine/workarounds.h +++ b/engines/sci/engine/workarounds.h @@ -76,6 +76,7 @@ extern const SciWorkaroundEntry kAbs_workarounds[]; extern const SciWorkaroundEntry kDisplay_workarounds[]; extern const SciWorkaroundEntry kDisposeScript_workarounds[]; extern const SciWorkaroundEntry kDoSoundFade_workarounds[]; +extern const SciWorkaroundEntry kGetAngle_workarounds[]; extern const SciWorkaroundEntry kGraphDrawLine_workarounds[]; extern const SciWorkaroundEntry kGraphSaveBox_workarounds[]; extern const SciWorkaroundEntry kGraphRestoreBox_workarounds[]; |