diff options
author | Filippos Karapetis | 2016-08-25 21:52:29 +0300 |
---|---|---|
committer | Filippos Karapetis | 2016-08-25 21:56:23 +0300 |
commit | ed461fba6512a289855f6f39f74163fe13bbcd87 (patch) | |
tree | 54885047e5b67bc6f7f001169424d676c4bfad4d /engines/sci/engine | |
parent | 429759b48183f384bdc02c653b2f837e6fb058f0 (diff) | |
download | scummvm-rg350-ed461fba6512a289855f6f39f74163fe13bbcd87.tar.gz scummvm-rg350-ed461fba6512a289855f6f39f74163fe13bbcd87.tar.bz2 scummvm-rg350-ed461fba6512a289855f6f39f74163fe13bbcd87.zip |
SCI32: Add a workaround when starting a new game in Phantasmagoria
This workaround is needed when starting a new game from a chapter after
the first one
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 2 | ||||
-rw-r--r-- | engines/sci/engine/workarounds.cpp | 5 | ||||
-rw-r--r-- | engines/sci/engine/workarounds.h | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 9f8c38b11e..9c0fb2267b 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -505,7 +505,7 @@ static const SciKernelMapSubEntry kString_subops[] = { { SIG_SCI32, 0, MAP_CALL(StringNew), "i(i)", NULL }, { SIG_SCI32, 1, MAP_CALL(StringSize), "[or]", NULL }, { SIG_SCI32, 2, MAP_CALL(StringAt), "[or]i", NULL }, - { SIG_SCI32, 3, MAP_CALL(StringPutAt), "[or]i(i*)", NULL }, + { SIG_SCI32, 3, MAP_CALL(StringPutAt), "[or]i(i*)", kStringPutAt_workarounds }, // StringFree accepts invalid references { SIG_SCI32, 4, MAP_CALL(StringFree), "[or0!]", NULL }, { SIG_SCI32, 5, MAP_CALL(StringFill), "[or]ii", NULL }, diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 8e0a90079c..7aaea0902a 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -767,6 +767,11 @@ const SciWorkaroundEntry kUnLoad_workarounds[] = { }; // gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround +const SciWorkaroundEntry kStringPutAt_workarounds[] = { + { GID_PHANTASMAGORIA,902, 64918, 0, "Str", "callKernel", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // When starting a new game from after chapter 1, the game tries to save ego's object in a string +}; + +// 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 }; diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h index f2b2e55ef6..2cccd05475 100644 --- a/engines/sci/engine/workarounds.h +++ b/engines/sci/engine/workarounds.h @@ -100,6 +100,7 @@ extern const SciWorkaroundEntry kStrAt_workarounds[]; extern const SciWorkaroundEntry kStrCpy_workarounds[]; extern const SciWorkaroundEntry kStrLen_workarounds[]; extern const SciWorkaroundEntry kUnLoad_workarounds[]; +extern const SciWorkaroundEntry kStringPutAt_workarounds[]; extern const SciWorkaroundEntry kScrollWindowAdd_workarounds[]; extern SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroundEntry *workaroundList, SciTrackOriginReply *trackOrigin); |