Commit graph

384 commits

Author SHA1 Message Date
Colin Snover
f4bc714677 SCI32: Add uninitialized read workaround for LSL6hires
Fixes Trac#10361.
2017-12-19 23:49:07 -06:00
Martin Kiewitz
870cd80202 SCI: Crazy Nick's Larry workaround bug #10184
Added this already through last commit by accident
Was supposed to get added by this.
Workaround for reading uninitialized temp game bug.
2017-10-08 20:54:59 +02:00
Martin Kiewitz
656de5e360 SCI: Restrict some workarounds to certain temps
Also add a bit more documentation / Fix some documentation
2017-10-08 20:52:48 +02:00
Martin Kiewitz
60c2c2867c SCI: Change index inside workaround tables to an index range
So that one can specify an entire range of temp variables
by using just one single entry.
2017-10-07 22:11:25 +02:00
Colin Snover
7d037495be SCI: Use explicit indexes in castlebrain/islandbrain word search workarounds 2017-10-07 14:50:21 -05:00
Colin Snover
1b669d2489 SCI: Add workaround for uninitialized reads in Island of Dr Brain
Leaning on the enter key during a word search puzzle will trigger
this bug, just like in Castle of Dr Brain.
2017-10-07 14:46:01 -05:00
Martin Kiewitz
54cac32003 Revert "SCI: Add workaround for uninitialized reads in Island of Dr Brain"
This reverts commit ae8e4fa8e9.

This change is wrong in any case. It should be specific to temp
14+15 at the very least. I also did not get an answer on what
is actually happening internally. That's not how we should
add workarounds. My review was also still pending.
2017-10-07 11:25:12 +02:00
Colin Snover
ae8e4fa8e9 SCI: Add workaround for uninitialized reads in Island of Dr Brain
Leaning on the enter key during a word search puzzle will trigger
this bug, just like in Castle of Dr Brain.
2017-10-07 00:56:00 -05:00
David Fioramonti
ec1cfcbf47 SCI: Add workaround for uninit read during wordsearch in castlebrain
During the wordsearch puzzle (room 320 click left door) the
game will crash because of an uninitalized read of temp
variables in word::dispatchEvent (which gets called a lot),
if the player clicks the same letter or different letters
aggressively or holds down the enter key.

Fixes Trac#9783.
2017-10-07 00:56:00 -05:00
David Fioramonti
c88d5519c2 SCI: Add uninitialized read workaround for shoplifting in SQ4CD
When in Galaxy Galleria, going into the software store and trying
to shoplift the SQ4 Hintbook will crash the game after you leave
and are electrocuted.

Fixes Trac#10229. Closes gh-1031.
2017-09-27 20:27:33 -05:00
Colin Snover
663d845d63 SCI32: Add workarounds for uninitialized reads in RAMA 2017-09-24 22:56:58 -05:00
Colin Snover
a79bd8b645 SCI32: Add uninitialized read workaround for Phant2 2017-07-30 19:10:50 -05:00
Martin Kiewitz
4668b1655c SCI32: Add workaround entry for PQ4 floppy city hall room 390
To fix an uninitialized read when clicking somewhere to walk around
in city hall.
2017-07-30 22:10:05 +02:00
Colin Snover
ba4fccdb26 SCI32: Add workaround for Torin/LSL7 running with subtitles only
Since these later SCI32 games weren't really designed to work with
subtitles-only message mode, if this doesn't work consistently or
breaks the games a lot in other places, the subtitles-only message
type could possibly be implemented in some other way, like by
messing with the game's speech volume global instead.
2017-07-17 23:56:21 -05:00
Colin Snover
3e45309b83 SCI32: Add workaround for Phant1 2017-07-13 17:19:50 -05:00
Colin Snover
9e90624052 SCI32: Add workarounds for PQ4 2017-07-07 23:41:53 -05:00
Colin Snover
1466fb247e SCI32: Add workaround for SQ6 2017-07-06 19:12:36 -05:00
Colin Snover
dcc4a1bc67 SCI32: Add workaround for invalid kFrameOut call in PQ4
Fixes Trac#9848.
2017-06-19 19:56:48 -05:00
Colin Snover
71e2f9d6fb SCI32: Add workaround for uninitialised read in PQ4
Fixes Trac#9847.
2017-06-19 19:56:48 -05:00
Colin Snover
5d04679124 SCI32: Add workaround for invalid kPalVarySetStart call in PQ4
Fixes Trac#9845.
2017-06-19 19:56:48 -05:00
Colin Snover
62fd5df8b4 SCI32: Fix uninitialized temp read in Torin
Fixes Trac#9810.
2017-06-10 00:21:44 -05:00
Colin Snover
48baf5a4a5 SCI32: Fix uninitialized temp read in LSL6hires
Fixes Trac#9811.
2017-06-10 00:13:58 -05:00
Martin Kiewitz
a8475db05a SCI: SQ4CD: Limit workaround for Russian SQ4 to room 150+900
As proposed by bluegr
2017-05-30 22:11:33 +02:00
Martin Kiewitz
266f68c21b SCI: SQ4CD: Remove room restriction of existing workarounds for end
Fixes bug #9812
2017-05-29 23:44:28 +02:00
Colin Snover
4917330038 SCI: Find and store the original static names of objects
See code comment in Object::init for more details.

Fixes Trac#9780.
2017-05-20 21:14:18 -05:00
Colin Snover
262ef4de61 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.
2017-05-13 22:46:13 -05:00
Colin Snover
ae628c18d4 SCI32: Add workaround for KQ7
Fixes Trac#9763.
2017-05-08 19:45:07 -05:00
Colin Snover
a403523faf SCI32: Add workaround for KQ7
Fixes Trac#9759.
2017-05-06 21:45:41 -05:00
Colin Snover
14e4ea6c85 SCI32: Add workarounds for LSL7 2017-04-23 13:07:25 -05:00
Colin Snover
7b3c9f4a07 SCI32: Add Lighthouse workaround 2017-04-23 13:07:25 -05:00
Colin Snover
f711edc876 SCI32: Add workarounds for RAMA 2017-04-23 13:07:25 -05:00
Colin Snover
2212b82794 SCI32: Add workarounds for Lighthouse 2017-04-23 13:07:25 -05:00
Colin Snover
6c44106083 SCI32: Add workarounds & patches for QFG4 2017-04-22 19:28:35 -05:00
Colin Snover
2df939d33b SCI32: Add workaround for SQ6 invalid read after a failed save game restore 2017-04-22 13:01:36 -05:00
Colin Snover
a1153661c4 SCI: Stop getCurrentCallOrigin from mutating stack frames
This fixes incorrect backtraces after a workaround failure or
other call to getCurrentCallOrigin when one or more stack frames
are calls to local procedures.
2017-03-30 20:49:36 -05:00
Colin Snover
5e81db8fd0 SCI32: Add workaround for uninitialised read in Torin 2017-03-30 19:46:27 -05:00
Colin Snover
159438848b SCI32: Add workaround for uninitialised read in GK1 2017-03-30 19:46:27 -05:00
Colin Snover
31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Martin Kiewitz
26b6d450df SCI: Clean up kRandom + allow 0 parameters via signatures
Also added in depth comments about the currently known variations
Returning the RNG seed is now implemented (although it seems no
games actually use this functionality, it seems to be just script
bugs).
Also remove Torin kRandom workarounds.
2017-02-26 00:24:57 +01:00
Colin Snover
e695100708 SCI32: Add workarounds for MGDX 2017-01-16 12:16:14 -06:00
Colin Snover
f66c033d52 SCI32: Add workaround for Hoyle5 2017-01-16 12:16:13 -06:00
Colin Snover
c476341508 SCI32: Add workarounds for KQ7 2.00b 2017-01-16 12:16:13 -06:00
Colin Snover
54e94c572a SCI32: Add workarounds, transitions, fixes for PQ4CD 2017-01-12 13:14:03 -06:00
Colin Snover
d951026578 SCI32: Add workarounds for PQ:SWAT 2017-01-11 11:13:45 -06:00
Filippos Karapetis
09d06855c5 SCI32: Add a workaround for the demo version of LSL7 2017-01-11 00:37:43 +02:00
Colin Snover
c48c24d1d3 SCI32: Fix Torin demo crash 2017-01-09 19:34:54 -06:00
Colin Snover
e729a31edc SCI32: Fix SQ6 demo crash 2017-01-09 19:34:54 -06:00
Colin Snover
b818e54027 SCI32: Fix crashes and bad cel positioning in GK2 demo 2017-01-09 19:34:54 -06:00
Colin Snover
2ce1807359 SCI32: Generalise uninitialised read workarounds for RAMA 2017-01-09 19:34:54 -06:00
Colin Snover
3e2f4a66f6 SCI32: Remove SCI3 workarounds hack 2017-01-09 19:34:54 -06:00