Skip to content

Commit

Permalink
SCI: Fix script bug #6485 - "SCI: MUMG EGA - kStrCpy error"
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegr committed Feb 19, 2014
1 parent e807647 commit 311471c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion engines/sci/engine/kernel_tables.h
Expand Up @@ -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 },
Expand Down
5 changes: 5 additions & 0 deletions engines/sci/engine/workarounds.cpp
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions engines/sci/engine/workarounds.h
Expand Up @@ -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[];

Expand Down

0 comments on commit 311471c

Please sign in to comment.