Commit Graph
61 Commits
Author SHA1 Message Date
Filippos Karapetis 5e2db7a178 SCI32: Add workarounds for OOB reads for parameters
These are mostly used to silence known cases, for now. Some workarounds of this type have already been addded
2018-08-23 01:59:26 +03: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 5d04679124 SCI32: Add workaround for invalid kPalVarySetStart call in PQ4
Fixes Trac#9845.
2017-06-19 19:56:48 -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
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 f66c033d52 SCI32: Add workaround for Hoyle5 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 02598b4473 SCI32: Add workarounds for Hoyle5 Crazy Eights 2016-12-11 20:09:48 -06:00
Colin Snover 6de396d787 SCI32: Add workaround for Hoyle5 startup call to kPlatform
Fixes Trac#9665.
2016-12-11 12:31:45 -06:00
Colin Snover e8c429832f SCI32: Automate kNumCels workaround 2016-11-02 15:43:07 -05:00
Colin Snover 65d0c659ef SCI32: Fix crash clicking quit button during LSL6hires credits 2016-10-15 20:57:48 -05:00
Colin Snover 2035e21667 SCI32: Add workaround for kNumCels
This workaround may be able to be vastly simplified in the future
since, so far, simply returning the number of cels in loop 0 is
enough to make all the scripts with this bug work as expected.
2016-09-29 19:39:16 -05:00
Colin Snover 2be2629a3b SCI32: Fix kFileIOOpen signature
The mode argument is required in SCI32 too; Torin just had a script
bug.
2016-09-29 19:39:16 -05:00
Colin Snover 3f91726765 SCI32: Rewrite kArray & kString
This change invalidates earlier SCI32 save games, which separated
arrays and strings in an incompatible manner. Old save games
contain invalid references to a string segment which no longer
exists, and contain incompatible array structures that lack
critical type information.
2016-09-29 19:39:16 -05:00
Colin Snover 3201440d11 SCI: Generalize code for getting information on the current call 2016-09-29 19:39:16 -05:00
Filippos Karapetis ed461fba65 SCI32: Add a workaround when starting a new game in Phantasmagoria
This workaround is needed when starting a new game from a chapter after
the first one
2016-08-25 21:56:23 +03:00
Filippos Karapetis 380902eb07 SCI32: Add workarounds for a bug in Torin, in an animation of Lycentia 2016-08-24 11:57:08 +03:00
Willem Jan Palenstijn ceee33ba2c SCI32: Add workaround for kScrollWindowAdd call in Phantasmagoria 2016-06-21 08:14:12 -05:00
Colin Snover f939868f3a SCI32: Add kDoSound(play) workaround for LSL6hires 2016-06-20 21:52:41 -05:00
Filippos Karapetis 5125652be2 SCI32: Add a workaround for kPalVarySetPercent in GK1 (chapter change) 2016-03-02 21:43:27 +02:00
Martin Kiewitz d8c732c2a1 SCI: workaround sig cleanup
old and now obsolete localCallOffset removed
2015-04-19 20:46:07 +02:00
Martin Kiewitz 38444d6024 SCI: add signatures for workaround local-calls
instead of using hardcoded offsets, we can now
use regular script patcher signatures.

only 1 qfg3 workaround has been migrated,
 the others will follow.
2015-04-18 22:18:57 +02:00
Martin Kiewitz d7f26886c3 SCI: more hoyle 4 workarounds (bug #6604) 2014-06-01 23:33:45 +02:00
Filippos Karapetis 311471c857 SCI: Fix script bug #6485 - "SCI: MUMG EGA - kStrCpy error" 2014-02-19 03:03:11 +02:00
Johannes Schickel 8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Filippos Karapetis d58c5b89b5 SCI: Fix script bug #3615120 - "SCI: Crazy Nick Laura Bow - kReadNumber signature mismatch" 2013-10-30 08:47:46 +02:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
md5 fa10ee66e4 SCI: Added proper fix for bug #3048054 - "LONGBOW: crash when opening hand code"
This was caused by a buggy script, most probably the result of an
incorrect copy/paste while processing the original script. Fixed with a
script patch.
2011-03-12 23:48:56 +02:00
md5 4e88d75eb6 SCI: Refactored the reg_t related operations and comparisons
This refactoring reduces a lot of code duplication, allows for better control,
makes the code more readable and allows us to remove a lot of now unneeded
workarounds
2011-02-19 20:22:43 +02:00
Filippos Karapetis c215d85c33 SCI: Added a workaround for script bug #3156472 - "King's Quest 5 cdrom version crash on escape"
svn-id: r55217
2011-01-12 23:33:30 +00:00
Filippos Karapetis e3dfadc6c1 SCI: Fix for bug #3100292 - "QFG2: signature mismatch at the WIT"
svn-id: r53993
2010-10-31 23:34:36 +00:00
Filippos Karapetis 780dacf48d SCI: Fixed one of the bugs in hoyle3, from bug report #3038837 - "HOYLE3: EGA/VGA Crashes" (that report includes more issues)
svn-id: r52213
2010-08-19 15:58:39 +00:00
Filippos Karapetis 3268238364 SCI: Fixed script bug #3048054 - "LONGBOW: crash when opening hand code" (German version)
svn-id: r52196
2010-08-18 20:28:48 +00:00
Filippos Karapetis d0d677ab75 SCI: Fixed bug #3042964 - "KQ4: Signature Mismatch"
svn-id: r52180
2010-08-18 05:27:13 +00:00
Martin Kiewitz 512bf22af6 SCI: adding workaround for camelot during ending
fixes bug #3044734
also fixing heap corruption during the ending

svn-id: r52077
2010-08-14 06:05:54 +00:00
Filippos Karapetis ab79d58153 SCI: Fixed script bug #3040142 - "PEPPER: Crash on Pugh's office"
svn-id: r51821
2010-08-07 01:09:32 +00:00
Filippos Karapetis eb112d6711 SCI: Rewrote the Mother Goose workaround to be like the others, some cleanup
svn-id: r51786
2010-08-06 15:05:05 +00:00
Martin Kiewitz 9013c15480 SCI: properly implementing qfg2 astrologer workaround
svn-id: r51783
2010-08-06 11:45:32 +00:00
Matthew Hoops ed741dc96c SCI: Fix bug #3038913 - SCI Fanmade - The Legend of the Lost Jewel: Crash by bugs
Added workaround for calling mul with an object and kSetAngle with two objects as parameters.

svn-id: r51743
2010-08-04 18:11:11 +00:00
Martin Kiewitz ee28c2eb54 SCI: adding workaround for pq3
fixes bug #3037565

svn-id: r51701
2010-08-03 15:51:31 +00:00
Filippos Karapetis 065d32ec00 SCI: Fixed script bug #3037835 - "ISLANDBRAIN: Crash when breeding second-generation hybrid"
svn-id: r51611
2010-08-02 11:46:03 +00:00
Filippos Karapetis f434f901bd SCI: Fixed script bug #3038077 - "PQ3 : Engine Abort While Plotting Crimes", together with 2 subsequent similar bugs
svn-id: r51609
2010-08-02 09:04:14 +00:00
Matthew Hoops 75b5ac38fb SCI: Fix saving/restoring games in fan games
The SCI Studio function library incorrectly calls kDeviceInfo with one parameter to get the current device.

svn-id: r51514
2010-07-30 18:45:28 +00:00
Martin Kiewitz c785645123 SCI: adding workaround for kSetCursor kq5cd
adding comments as well

svn-id: r51510
2010-07-30 15:26:30 +00:00
Matthew Hoops 50e493f3ef SCI: Fix bug #3035720 - SQ1SCI demo: Menu crash
kCelWide and kCelHigh are called with the second two parameters as objects instead of integers. We fake return the real width/height of the view in question to allow the quit menu to work. Values found by examining the view  passed as the first parameter.

svn-id: r51401
2010-07-28 03:54:14 +00:00
Filippos Karapetis bc6baef0c0 SCI: Fixed bug #3035186 - "ECOQUEST2: Crash When Receiving Ecorder". Also removed the now obsolete kStringCpy workaround table.
svn-id: r51372
2010-07-27 14:51:08 +00:00
Filippos Karapetis 14c059100c SCI: Fixed script bug #3034610 - "KQ6CD: Crash in endgame (short path)", and removed a relevant TODO
svn-id: r51356
2010-07-27 10:00:17 +00:00
Filippos Karapetis 742a226312 SCI: Fixed bug #3035057 - "ECOQUEST demo: Crashing menu". EcoQuest 1 demo is using an in between SCI1-SCI1.1 interpreter. It's SCI1.1, but it calls kNewWindow with the SCI1 semantics.
svn-id: r51354
2010-07-27 09:40:29 +00:00
Martin Kiewitz 4940819df6 SCI: reverting r51304, broke kq6 hires
svn-id: r51329
2010-07-26 18:40:49 +00:00