aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/workarounds.h
diff options
context:
space:
mode:
authorColin Snover2017-05-12 22:05:11 -0500
committerColin Snover2017-05-13 22:46:13 -0500
commit262ef4de61727ebe6ede497f871ef858253c9956 (patch)
treec158627e8a80d24a4dada143a990c74f0e09ff5b /engines/sci/engine/workarounds.h
parentea6eebca09f9303cd08aa6d767123ba383c548e8 (diff)
downloadscummvm-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/workarounds.h')
-rw-r--r--engines/sci/engine/workarounds.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h
index 08a9fa606f..5b716fd357 100644
--- a/engines/sci/engine/workarounds.h
+++ b/engines/sci/engine/workarounds.h
@@ -92,6 +92,7 @@ extern const SciWorkaroundEntry kPalVarySetVary_workarounds[];
extern const SciWorkaroundEntry kPalVarySetPercent_workarounds[];
extern const SciWorkaroundEntry kPalVaryMergeStart_workarounds[];
extern const SciWorkaroundEntry kPlatform32_workarounds[];
+extern const SciWorkaroundEntry kRandom_workarounds[];
extern const SciWorkaroundEntry kReadNumber_workarounds[];
extern const SciWorkaroundEntry kResCheck_workarounds[];
extern const SciWorkaroundEntry kPaletteUnsetFlag_workarounds[];