SCI32: Add workaround for kScrollWindowAdd call in Phantasmagoria

This commit is contained in:
Willem Jan Palenstijn 2016-04-02 01:00:48 +02:00 committed by Colin Snover
parent ab864ba366
commit ceee33ba2c
3 changed files with 8 additions and 1 deletions

View file

@ -468,7 +468,7 @@ static const SciKernelMapSubEntry kString_subops[] = {
// version, subId, function-mapping, signature, workarounds // version, subId, function-mapping, signature, workarounds
static const SciKernelMapSubEntry kScrollWindow_subops[] = { static const SciKernelMapSubEntry kScrollWindow_subops[] = {
{ SIG_SCI32, 0, MAP_CALL(ScrollWindowCreate), "oi", NULL }, { 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, 2, MAP_DUMMY(ScrollWindowClear), "i", NULL },
{ SIG_SCI32, 3, MAP_CALL(ScrollWindowPageUp), "i", NULL }, { SIG_SCI32, 3, MAP_CALL(ScrollWindowPageUp), "i", NULL },
{ SIG_SCI32, 4, MAP_CALL(ScrollWindowPageDown), "i", NULL }, { SIG_SCI32, 4, MAP_CALL(ScrollWindowPageDown), "i", NULL },

View file

@ -751,6 +751,12 @@ const SciWorkaroundEntry kUnLoad_workarounds[] = {
SCI_WORKAROUNDENTRY_TERMINATOR 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) { SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroundEntry *workaroundList, SciTrackOriginReply *trackOrigin) {
// HACK for SCI3: Temporarily ignore this // HACK for SCI3: Temporarily ignore this
if (getSciVersion() == SCI_VERSION_3) { if (getSciVersion() == SCI_VERSION_3) {

View file

@ -99,6 +99,7 @@ extern const SciWorkaroundEntry kStrAt_workarounds[];
extern const SciWorkaroundEntry kStrCpy_workarounds[]; extern const SciWorkaroundEntry kStrCpy_workarounds[];
extern const SciWorkaroundEntry kStrLen_workarounds[]; extern const SciWorkaroundEntry kStrLen_workarounds[];
extern const SciWorkaroundEntry kUnLoad_workarounds[]; extern const SciWorkaroundEntry kUnLoad_workarounds[];
extern const SciWorkaroundEntry kScrollWindowAdd_workarounds[];
extern SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroundEntry *workaroundList, SciTrackOriginReply *trackOrigin); extern SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroundEntry *workaroundList, SciTrackOriginReply *trackOrigin);