From 311471c857221bf9045291e467c95fbc6dfe8189 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 19 Feb 2014 03:02:44 +0200 Subject: SCI: Fix script bug #6485 - "SCI: MUMG EGA - kStrCpy error" --- engines/sci/engine/kernel_tables.h | 2 +- engines/sci/engine/workarounds.cpp | 5 +++++ engines/sci/engine/workarounds.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'engines/sci') diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 9e653f3a7d..8a9c1426b6 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -454,7 +454,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(StrAt), SIG_EVERYWHERE, "ri(i)", NULL, kStrAt_workarounds }, { MAP_CALL(StrCat), SIG_EVERYWHERE, "rr", NULL, NULL }, { MAP_CALL(StrCmp), SIG_EVERYWHERE, "rr(i)", NULL, NULL }, - { MAP_CALL(StrCpy), SIG_EVERYWHERE, "r[r0](i)", NULL, NULL }, + { MAP_CALL(StrCpy), SIG_EVERYWHERE, "r[r0](i)", NULL, kStrCpy_workarounds }, { MAP_CALL(StrEnd), SIG_EVERYWHERE, "r", NULL, NULL }, { MAP_CALL(StrLen), SIG_EVERYWHERE, "[r0]", NULL, kStrLen_workarounds }, { MAP_CALL(StrSplit), SIG_EVERYWHERE, "rr[r0]", NULL, NULL }, diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index d6887e1236..6ef98e3b2a 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -411,6 +411,11 @@ const SciWorkaroundEntry kStrAt_workarounds[] = { SCI_WORKAROUNDENTRY_TERMINATOR }; +const SciWorkaroundEntry kStrCpy_workarounds[] = { + { GID_MOTHERGOOSE, 23, 23, 0, "talkScript", "changeState", -1, 0, { WORKAROUND_FAKE, 0 } }, // when talking to the girl in scene 23, there's no destination parameter (script bug - wrong instruction order). The original source is used directly afterwards in kDisplay, to show the girl's text - bug #6485 + SCI_WORKAROUNDENTRY_TERMINATOR +}; + // gameID, room,script,lvl, object-name, method-name, call,index, workaround const SciWorkaroundEntry kStrLen_workarounds[] = { { GID_QFG2, 210, 2, 0, "", "export 21", 0xdeb, 0, { WORKAROUND_FAKE, 0 } }, // When saying something incorrect at the WIT, an integer is passed instead of a reference - bug #5489 diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h index 4f1071ca0a..2e73dddbe3 100644 --- a/engines/sci/engine/workarounds.h +++ b/engines/sci/engine/workarounds.h @@ -93,6 +93,7 @@ extern const SciWorkaroundEntry kPaletteUnsetFlag_workarounds[]; extern const SciWorkaroundEntry kSetCursor_workarounds[]; extern const SciWorkaroundEntry kSetPort_workarounds[]; extern const SciWorkaroundEntry kStrAt_workarounds[]; +extern const SciWorkaroundEntry kStrCpy_workarounds[]; extern const SciWorkaroundEntry kStrLen_workarounds[]; extern const SciWorkaroundEntry kUnLoad_workarounds[]; -- cgit v1.2.3