diff options
author | Colin Snover | 2017-05-12 22:05:11 -0500 |
---|---|---|
committer | Colin Snover | 2017-05-13 22:46:13 -0500 |
commit | 262ef4de61727ebe6ede497f871ef858253c9956 (patch) | |
tree | c158627e8a80d24a4dada143a990c74f0e09ff5b /engines/sci/engine/kernel_tables.h | |
parent | ea6eebca09f9303cd08aa6d767123ba383c548e8 (diff) | |
download | scummvm-rg350-262ef4de61727ebe6ede497f871ef858253c9956.tar.gz scummvm-rg350-262ef4de61727ebe6ede497f871ef858253c9956.tar.bz2 scummvm-rg350-262ef4de61727ebe6ede497f871ef858253c9956.zip |
SCI32: Fix crash at end of Torin
This "fix" is more of a hack, in the interest of making the game
completable. The root cause is a combination of two problems in
the game scripts:
1. Blink::init expects to receive either 0 or 2 arguments, but
it assumes that if it received *any* arguments, it must have
received 2 arguments. This assumption is wrong, though,
because--
2. soTorinWhoAreYou::changeState(0) calls
poPecandEyes::setCycle(Blink) without including a second
argument (the blink speed).
This ends up with the second parameter being some garbage, and
that garbage gets sent to kRandom which then complains about
receiving garbage.
The correct fix for this would be to fix soTorinWhoAreYou (in
script 51400) to pass a second argument to setCycle, but there are
not enough obvious spare bytes for a quick and easy patch, so this
workaround will have to do for now.
Fixes Trac#9779.
Diffstat (limited to 'engines/sci/engine/kernel_tables.h')
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index de9f66205b..a0e7ccfef6 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -768,7 +768,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(Portrait), SIG_EVERYWHERE, "i(.*)", NULL, NULL }, // subop { MAP_CALL(PrevNode), SIG_EVERYWHERE, "n", NULL, NULL }, { MAP_CALL(PriCoord), SIG_EVERYWHERE, "i", NULL, NULL }, - { MAP_CALL(Random), SIG_EVERYWHERE, "(i)(i)", NULL, NULL }, + { MAP_CALL(Random), SIG_EVERYWHERE, "(i)(i)", NULL, kRandom_workarounds }, { MAP_CALL(ReadNumber), SIG_EVERYWHERE, "r", NULL, kReadNumber_workarounds }, { MAP_CALL(RemapColors), SIG_SCI11, SIGFOR_ALL, "i(i)(i)(i)(i)", NULL, NULL }, #ifdef ENABLE_SCI32 |