aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2016-04-02 01:00:48 +0200
committerColin Snover2016-06-21 08:14:12 -0500
commitceee33ba2c8e880be27a23915228fa11af41515c (patch)
treea6d78c47801094e89987dea710eb2c9fdf111c76
parentab864ba3666b39586c54467137a2b26d246ba430 (diff)
downloadscummvm-rg350-ceee33ba2c8e880be27a23915228fa11af41515c.tar.gz
scummvm-rg350-ceee33ba2c8e880be27a23915228fa11af41515c.tar.bz2
scummvm-rg350-ceee33ba2c8e880be27a23915228fa11af41515c.zip
SCI32: Add workaround for kScrollWindowAdd call in Phantasmagoria
-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 82184c27d4..03e56ea559 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -468,7 +468,7 @@ static const SciKernelMapSubEntry kString_subops[] = {
// version, subId, function-mapping, signature, workarounds
static const SciKernelMapSubEntry kScrollWindow_subops[] = {
{ SIG_SCI32, 0, MAP_CALL(ScrollWindowCreate), "oi", NULL },
- { SIG_SCI32, 1, MAP_CALL(ScrollWindowAdd), "iriii(i)", NULL },
+ { SIG_SCI32, 1, MAP_CALL(ScrollWindowAdd), "iriii(i)", kScrollWindowAdd_workarounds },
{ SIG_SCI32, 2, MAP_DUMMY(ScrollWindowClear), "i", NULL },
{ SIG_SCI32, 3, MAP_CALL(ScrollWindowPageUp), "i", NULL },
{ SIG_SCI32, 4, MAP_CALL(ScrollWindowPageDown), "i", NULL },
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index d86ad60c8a..3a6cf0cff8 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -751,6 +751,12 @@ const SciWorkaroundEntry kUnLoad_workarounds[] = {
SCI_WORKAROUNDENTRY_TERMINATOR
};
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
+const SciWorkaroundEntry kScrollWindowAdd_workarounds[] = {
+ { GID_PHANTASMAGORIA, 45, 64907, 0, "ScrollableWindow", "addString", NULL, 0, { WORKAROUND_STILLCALL, 0 } }, // ScrollWindow interface passes the last two parameters twice
+};
+
+
SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroundEntry *workaroundList, SciTrackOriginReply *trackOrigin) {
// HACK for SCI3: Temporarily ignore this
if (getSciVersion() == SCI_VERSION_3) {
diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h
index 680aa471ad..248d37fc6c 100644
--- a/engines/sci/engine/workarounds.h
+++ b/engines/sci/engine/workarounds.h
@@ -99,6 +99,7 @@ extern const SciWorkaroundEntry kStrAt_workarounds[];
extern const SciWorkaroundEntry kStrCpy_workarounds[];
extern const SciWorkaroundEntry kStrLen_workarounds[];
extern const SciWorkaroundEntry kUnLoad_workarounds[];
+extern const SciWorkaroundEntry kScrollWindowAdd_workarounds[];
extern SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroundEntry *workaroundList, SciTrackOriginReply *trackOrigin);