aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2014-02-19 03:02:44 +0200
committerFilippos Karapetis2014-02-19 03:03:11 +0200
commit311471c857221bf9045291e467c95fbc6dfe8189 (patch)
tree332a2d6717a77c52d1919be8299ba226bc4e577f /engines/sci
parente8076473bd9c6c75cc10b7903e142bcb13d27915 (diff)
downloadscummvm-rg350-311471c857221bf9045291e467c95fbc6dfe8189.tar.gz
scummvm-rg350-311471c857221bf9045291e467c95fbc6dfe8189.tar.bz2
scummvm-rg350-311471c857221bf9045291e467c95fbc6dfe8189.zip
SCI: Fix script bug #6485 - "SCI: MUMG EGA - kStrCpy error"
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kernel_tables.h2
-rw-r--r--engines/sci/engine/workarounds.cpp5
-rw-r--r--engines/sci/engine/workarounds.h1
3 files changed, 7 insertions, 1 deletions
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[];