aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-10-31 23:34:36 +0000
committerFilippos Karapetis2010-10-31 23:34:36 +0000
commite3dfadc6c1444a2b84ffcb3d40b9afe00df863bf (patch)
tree7b39138b8df55caaab0730776a3fe5587078e18a
parented8bfb00b97ee561632a6d814d1ba587ed47ae22 (diff)
downloadscummvm-rg350-e3dfadc6c1444a2b84ffcb3d40b9afe00df863bf.tar.gz
scummvm-rg350-e3dfadc6c1444a2b84ffcb3d40b9afe00df863bf.tar.bz2
scummvm-rg350-e3dfadc6c1444a2b84ffcb3d40b9afe00df863bf.zip
SCI: Fix for bug #3100292 - "QFG2: signature mismatch at the WIT"
svn-id: r53993
-rw-r--r--engines/sci/engine/kernel_tables.h2
-rw-r--r--engines/sci/engine/workarounds.cpp6
-rw-r--r--engines/sci/engine/workarounds.h1
3 files changed, 8 insertions, 1 deletions
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 724ceee878..7aed908c5e 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -437,7 +437,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(StrCmp), SIG_EVERYWHERE, "rr(i)", NULL, NULL },
{ MAP_CALL(StrCpy), SIG_EVERYWHERE, "r[r0](i)", NULL, NULL },
{ MAP_CALL(StrEnd), SIG_EVERYWHERE, "r", NULL, NULL },
- { MAP_CALL(StrLen), SIG_EVERYWHERE, "[r0]", NULL, NULL },
+ { MAP_CALL(StrLen), SIG_EVERYWHERE, "[r0]", NULL, kStrLen_workarounds },
{ MAP_CALL(StrSplit), SIG_EVERYWHERE, "rr[r0]", NULL, NULL },
{ MAP_CALL(TextColors), SIG_EVERYWHERE, "(i*)", NULL, NULL },
{ MAP_CALL(TextFonts), SIG_EVERYWHERE, "(i*)", NULL, NULL },
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index d4bab2c671..559d9f07ba 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -406,6 +406,12 @@ const SciWorkaroundEntry kStrCat_workarounds[] = {
};
// 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 #3100292
+ SCI_WORKAROUNDENTRY_TERMINATOR
+};
+
+// gameID, room,script,lvl, object-name, method-name, call,index, workaround
const SciWorkaroundEntry kUnLoad_workarounds[] = {
{ GID_CAMELOT, 921, 921, 1, "Script", "changeState", 0x36, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: While showing Camelot (and other places), the reference is invalid - bug #3035000
{ GID_CAMELOT, 921, 921, 1, "Script", "init", 0x36, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: When being attacked by the boar (and other places), the reference is invalid - bug #3035000
diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h
index bf1ac3a445..7d68d9c4a5 100644
--- a/engines/sci/engine/workarounds.h
+++ b/engines/sci/engine/workarounds.h
@@ -104,6 +104,7 @@ extern const SciWorkaroundEntry kSetCursor_workarounds[];
extern const SciWorkaroundEntry kSetPort_workarounds[];
extern const SciWorkaroundEntry kStrAt_workarounds[];
extern const SciWorkaroundEntry kStrCat_workarounds[];
+extern const SciWorkaroundEntry kStrLen_workarounds[];
extern const SciWorkaroundEntry kUnLoad_workarounds[];
extern SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroundEntry *workaroundList, SciTrackOriginReply *trackOrigin);