From c785645123493b8087a869e9f96e645898d51bfc Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Fri, 30 Jul 2010 15:26:30 +0000 Subject: SCI: adding workaround for kSetCursor kq5cd adding comments as well svn-id: r51510 --- engines/sci/engine/kernel_tables.h | 2 +- engines/sci/engine/kgraphics.cpp | 1 + engines/sci/engine/workarounds.cpp | 6 ++++++ engines/sci/engine/workarounds.h | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index f78bbf39a3..9652d4c25c 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -419,7 +419,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(SetCursor), SIG_SCI21, SIGFOR_ALL, "i(i)([io])(i*)", NULL, NULL }, // TODO: SCI2.1 may supply an object optionally (mother goose sci21 right on startup) - find out why { MAP_CALL(SetCursor), SIG_SCI11, SIGFOR_ALL, "i(i)(i)(i)(iiiiii)", NULL, NULL }, - { MAP_CALL(SetCursor), SIG_EVERYWHERE, "i(i)(i)(i)(i)", NULL, NULL }, + { MAP_CALL(SetCursor), SIG_EVERYWHERE, "i(i)(i)(i)(i)", NULL, kSetCursor_workarounds }, { MAP_CALL(SetDebug), SIG_EVERYWHERE, "(i*)", NULL, NULL }, { MAP_CALL(SetJump), SIG_EVERYWHERE, "oiii", NULL, NULL }, { MAP_CALL(SetMenu), SIG_EVERYWHERE, "i(.*)", NULL, NULL }, diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 6df26b04cc..b2ff83aa1e 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -172,6 +172,7 @@ static reg_t kSetCursorSci11(EngineState *s, int argc, reg_t *argv) { } break; } + case 9: // case for kq5cd, we are getting calling with 4 additional 900d parameters case 5: hotspot = new Common::Point(argv[3].toSint16(), argv[4].toSint16()); // Fallthrough diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 822144b280..fa1f3d7eca 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -253,6 +253,12 @@ const SciWorkaroundEntry kPaletteUnsetFlag_workarounds[] = { SCI_WORKAROUNDENTRY_TERMINATOR }; +// gameID, room,script,lvl, object-name, method-name, call,index, workaround +const SciWorkaroundEntry kSetCursor_workarounds[] = { + { GID_KQ5, -1, 768, 0, "KQCursor", "init", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // CD: gets called with 4 additional "900d" parameters + SCI_WORKAROUNDENTRY_TERMINATOR +}; + // gameID, room,script,lvl, object-name, method-name, call,index, workaround const SciWorkaroundEntry kSetPort_workarounds[] = { { GID_LSL6, 740, 740, 0, "rm740", "drawPic", -1, 0, { WORKAROUND_IGNORE, 0 } }, // ending scene, is called with additional 3 (!) parameters diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h index d509d300d7..6fa08b8a69 100644 --- a/engines/sci/engine/workarounds.h +++ b/engines/sci/engine/workarounds.h @@ -90,6 +90,7 @@ extern const SciWorkaroundEntry kIsObject_workarounds[]; extern const SciWorkaroundEntry kMemory_workarounds[]; extern const SciWorkaroundEntry kNewWindow_workarounds[]; extern const SciWorkaroundEntry kPaletteUnsetFlag_workarounds[]; +extern const SciWorkaroundEntry kSetCursor_workarounds[]; extern const SciWorkaroundEntry kSetPort_workarounds[]; extern const SciWorkaroundEntry kUnLoad_workarounds[]; -- cgit v1.2.3