SCI32: Fix crash clicking quit button during LSL6hires credits

This commit is contained in:
Colin Snover 2016-10-15 20:57:20 -05:00
parent 06d58c91b9
commit 65d0c659ef
3 changed files with 20 additions and 1 deletions

View File

@ -753,7 +753,7 @@ static SciKernelMapEntry s_kernelMap[] = {
#ifdef ENABLE_SCI32
{ "RemapColors", kRemapColors32, SIG_SCI32, SIGFOR_ALL, "i(i)(i)(i)(i)(i)", kRemapColors_subops, NULL },
#endif
{ MAP_CALL(ResCheck), SIG_EVERYWHERE, "ii(iiii)", NULL, NULL },
{ MAP_CALL(ResCheck), SIG_EVERYWHERE, "ii(iiii)", NULL, kResCheck_workarounds },
{ MAP_CALL(RespondsTo), SIG_EVERYWHERE, ".i", NULL, NULL },
{ MAP_CALL(RestartGame), SIG_EVERYWHERE, "", NULL, NULL },
#ifdef ENABLE_SCI32

View File

@ -718,6 +718,24 @@ const SciWorkaroundEntry kReadNumber_workarounds[] = {
SCI_WORKAROUNDENTRY_TERMINATOR
};
// Game: Leisure Suit Larry 6 hires
// Calling method: myCreditText::changeState
// Subroutine offset: 0x8c (script 740)
// Applies to at least: English PC CD
static const uint16 sig_kResCheck_lsl6hires_1[] = {
0x3f, 0x01, // link 01
0x81, 0x13, // lag global[$13]
0xa5, 0x00, // sat 00
0x7a, // push2
SIG_END
};
// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
const SciWorkaroundEntry kResCheck_workarounds[] = {
{ GID_LSL6HIRES, 740, 740, -1, "myCreditText", "handleEvent", sig_kResCheck_lsl6hires_1, -1, { WORKAROUND_IGNORE, 0 } }, // when clicking during the final credits
SCI_WORKAROUNDENTRY_TERMINATOR
};
// gameID, room,script,lvl, object-name, method-name, local-call-signature, index, workaround
const SciWorkaroundEntry kPaletteUnsetFlag_workarounds[] = {
{ GID_QFG4DEMO, 100, 100, 0, "doMovie", "changeState", NULL, 0, { WORKAROUND_IGNORE, 0 } }, // after the Sierra logo, no flags are passed, thus the call is meaningless - bug #4947

View File

@ -89,6 +89,7 @@ extern const SciWorkaroundEntry kNumCels_workarounds[];
extern const SciWorkaroundEntry kPalVarySetPercent_workarounds[];
extern const SciWorkaroundEntry kRandom_workarounds[];
extern const SciWorkaroundEntry kReadNumber_workarounds[];
extern const SciWorkaroundEntry kResCheck_workarounds[];
extern const SciWorkaroundEntry kPaletteUnsetFlag_workarounds[];
extern const SciWorkaroundEntry kSetCursor_workarounds[];
extern const SciWorkaroundEntry kArraySetElements_workarounds[];