Commit graph

282 commits

Author SHA1 Message Date
Colin Snover
ebd5139653 SCI32: Fix crash after credits in Lighthouse 2017-09-03 20:58:07 -05:00
Martin Kiewitz
4ab18d2d00 SCI32: Add script patch for last action sequence in PQ4
To also turn ::ticks into ::seconds
For further information see 5a4840e
2017-08-07 22:52:11 +02:00
Martin Kiewitz
4d7d7698eb SCI32: Add script patch for Bitty Kitty / Barbie game glitch
Fixes bug #9849
Which is a pseudo-game-breaking glitch of the game itself.
Applies to at least English+German floppy and English CD version.
2017-08-07 00:06:14 +02:00
Martin Kiewitz
5a4840ee55 SCI32: Add script patches for action sequences in city hall 2017-08-06 21:09:07 +02:00
Colin Snover
c254df2d2d SCI32: Increase maximum save games for Phant2 2017-07-30 21:04:51 -05:00
Martin Kiewitz
99f5a3dc04 SCI32: Add script patch for PQ4 floppy computer issue
This fixes buggy PQ4 system script code and makes entering user
and password on the police computer not trigger a signature mismatch
anymore.

Script code was fixed by Sierra in PQ4 CD.
2017-07-30 14:07:32 +02:00
Colin Snover
dc597dc7a8 SCI32: Patch spin loop in Phant2 puzzle 2017-07-26 22:02:37 -05:00
Colin Snover
85194cdf75 SCI32: Patch bad version retrieval in Phant2 2017-07-26 22:02:37 -05:00
Colin Snover
bfa6ad5155 SCI32: Use dynamic selector in QFG4 trap script patch 2017-07-24 19:36:35 -05:00
Colin Snover
40e9963baa SCI32: Deduplicate volume reset script patches & add to MGDX 2017-07-24 19:36:34 -05:00
Colin Snover
afe344cc1f SCI32: Add guest additions support for LSL7 2017-07-17 22:42:18 -05:00
Colin Snover
8e0ccc5eb1 SCI32: Add patch for mismatched PointSoft Torin heap 20700
Refs Trac#9776, Trac#9864. Fixes Trac#9797.
2017-07-15 22:53:39 -05:00
Colin Snover
b1b18c54f3 SCI32: Patch out bad rat view init code in Phantasmagoria
Fixes Trac#9957.
2017-07-13 22:33:12 -05:00
Martin Kiewitz
4fd313a496 SCI: Fix typo in pq3 script patch 2017-07-01 11:41:15 +02:00
Martin Kiewitz
a978e2a1fd SCI: Add script patch for pq3, points for giving locket (bug #9862)
This script patch will fix not getting 10 points for giving
the locket to Marie.
2017-07-01 11:38:04 +02:00
Colin Snover
1ca905e860 SCI32: Replace Torin dragon's cave patch with a better patch
The previous script patch for this bug was much simpler and
targeted the bad code that hangs, instead of the bad code that
caused the unexpected flag setting, but this caused glitches in
the dragon's cave that couldn't really be fixed since different
animations relied on some common code for positioning Boogle. So,
now, this more complicated patch fixes the fast-forward code in
the seraglio to set Boogle's in-the-bag flag, which is what the
dragon's cave needs in order to not hang when worming Boogle.

Also, because this patch now targets the code that caused the bad
flag state, instead of the code that hangs on the bad state, any
save game in the dragon's cave with the bag flag setting will need
to be fixed by exiting and re-entering the dragon's cave.

Refs Trac#9836.
2017-06-24 16:54:31 -05:00
Colin Snover
fb4b144469 SCI32: Fix Boogle warp glitch caused by previous game patch
Refs Trac#9836.
2017-06-24 11:54:24 -05:00
Colin Snover
c4ca324533 SCI32: Add patch for game script bug in Torin dragon's cave
Fixes Trac#9836.
2017-06-23 22:43:22 -05:00
Colin Snover
a3824d0f39 SCI32: Create Torin-specific save game count limitation remover
Fixes Trac#9840.
2017-06-19 20:45:43 -05:00
Martin Kiewitz
04b5c3a71b SCI32: GK1: Add second beignet timer issue script patch
Should solve bug #9805
2017-05-29 21:21:56 +02:00
Colin Snover
73fab1e135 SCI32: Remove invalid interaction cursor spinloop in KQ7 2017-05-27 21:57:06 -05:00
Martin Kiewitz
ad1cc613ef SCI32: Fix typo in script patch name 2017-05-24 18:49:55 +02:00
Martin Kiewitz
26fe96d637 SCI32: Add script patch for lsl7 cheese maker priority bug
This issue also happens when using the original interpreter.
2017-05-24 18:45:16 +02:00
Martin Kiewitz
97d4a9eff1 SCI32: Add script patch for cheese maker issue
Room 540, was game breaking, but effectively a script
bug, that just happened to work in SSCI.
2017-05-24 15:37:18 +02:00
Martin Kiewitz
cadd89e675 SCI: Add script patch for "Tickets, only" during game over scene
Audio played was "Tickets, only", subtitle shows "Tickets, please".

Also remove forcing myDialog for KQ6Print::say (which was added,
while fixing this script patch).
see a46f3c1625
Forcing myDialog causes issues during game over screen (bug #9771).
Bug is solved by this, but script patch isn't perfect right now.
2017-05-15 22:56:04 +02:00
Colin Snover
8d94a04605 SCI32: Disable game script video benchmarking
The approach to video benchmarking used by SCI engine does not
translate very well to modern video devices -- it will either be
so slow that the games think the system is not capable of showing
normal visual effects, or so fast that the benchmarks overflow
their counters. So, game scripts that perform video benchmarking
are now patched to unconditionally return the highest speed value.

A pleasant but subtle side-effect of this change is that the extra
time sitting at a blank screen before the start of a game (while
benchmarks ran) is now gone.

Fixes Trac#9741.
2017-05-04 23:00:53 -05:00
Colin Snover
f58019b680 SCI32: Remove spinloops from Phant2 2017-04-23 13:07:25 -05:00
Colin Snover
2573fe8c96 SCI32: Fix slow fade of Phant2 interface bars 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
4c0f2a3738 SCI: Move ScummVM kernel calls to 0xe0 2017-04-22 13:01:35 -05:00
Colin Snover
3303a88139 SCI: Improve audio volume & settings sync code
This patch includes enhancements to the ScummVM integration with
SCI engine, with particular focus on SCI32 support.

1. Fixes audio volumes syncing erroneously to ScummVM in games
   that modify the audio volume without user action (e.g. SCI1.1
   talkies that reduce music volume during speech playback). Now,
   volumes will only be synchronised when the user interacts with
   the game's audio settings. This mechanism works by looking for
   a known volume control object in the stack, and only syncing
   when the control object is present. (Ports and planes were
   researched and found unreliable.)

2. Fixes audio syncing in SCI32 games that do not set game
   volumes through kDoSoundMasterVolume/kDoAudioVolume, like GK1,
   GK2, Phant1, and Torin.

3. Fixes speech/subtitles syncing in SCI32 games that do not use
   global 90, like LSL6hires.

4. Fixes in-game volume controls in SCI32 games reflecting
   outdated audio volumes when a change is made during the game
   from the ScummVM launcher.

5. Fixes SCI32 games that would restore volumes from save games
   or reset volumes on startup, which caused game volumes to be
   out-of-sync with ScummVM when started.

6. ScummVM integration code for audio sync has been abstracted
   into a new GuestAdditions class. This keeps the ScummVM-
   specific code all in one place, with only small hooks into the
   engine code. ScummVM integrated save/load code should probably
   also go here in the future.

Fixes Trac#9700.
2017-04-21 19:00:27 -05:00
Colin Snover
fa9523933f SCI32: Fix broken sliders in Shivers settings
This problem is caused by the same invalid super call that broke
the CCTV joystick.
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
c315065503 SCI: Add Colonel's Bequest patch and extend patcher functionality
Add Colonel's Bequest patch to fix an issue in room 35.
When you tell Lilly about Gertie in act 2, Lilly will then
walk out of the room. In case Laura (ego) is in her way, the game
will effectively block and will appear frozen.
This also happened, when using the original interpreter.

This also adds a new functionality to the script patcher.
PATCH_GETORIGINALUINT16 is able to get a full UINT16 from
original script data and insert it somewhere else.
PATCH_GETORIGINALBYTE and PATCH_GETORIGINALBYTEADJUST commands
were merged internally and use the same internal command now.
Some script patches were adjusted accordingly.

Thanks again to wjp for helping on the script issue.
2017-03-19 17:14:33 +01:00
Martin Kiewitz
2e91d8cd9b SCI: Add script patch for Laura Bow 2 to fix museum party room (350)
When clicking anywhere while entering the middle museum party room
(which has a large golden Egyptian head inside of it), the game
will keep the script for entering active, which will then make it
impossible to leave this room.

This script bug also happened, when using the original interpreter.

The patch applies to at least English + German floppy as well as
English CD.

Very many thanks to wjp for helping figuring the actual cause out.
2017-03-18 21:09:38 +01:00
Colin Snover
88981b8db6 SCI32: Script patch priority drawing bug in MGDX
This fixes the horse at the fountain drawing on top of the
fountain instead of behind it.
2017-01-16 12:54:39 -06:00
Colin Snover
0744dc4109 SCI32: Fix spinloop in Hoyle5
Hoyle5 will spin on kGetTime between 15 and 300 ticks in multiple
game scripts in order to delay execution (for example, after
choosing opponents and clicking "okay"). This causes ScummVM to
be unresponsive and wastes CPU time.

This commit patches the spin subroutines to instead call a kernel
function (kWait) that waits without a spin loop. This kernel
function was removed in SCI2, and has been added back in ScummVM
specifically for Hoyle5, so this patch will not work with the
original interpreter.
2017-01-16 12:16:12 -06:00
Colin Snover
d34e5266ed SCI32: Fix bad scroll delta in GK2 inventory
Fixes Trac#9648.
2017-01-12 15:04:45 -06:00
Colin Snover
e18e6399ac SCI32: Fix bad rendering of Sierra logo in MGDX 2017-01-09 19:34:54 -06:00
Martin Kiewitz
a46f3c1625 SCI: Fix kq6 CD audio+subtitle script patch
Original patch caused a text window to be shown at the cliffs
(copy protection), even when audio-only mode was active.
2016-12-21 02:04:11 +01:00
Colin Snover
4b4b8a281b SCI32: Adjust transition timings
Transition timings were originally chosen largely by feel in SQ6,
as there was little other evidence to determine the correct speed.
As additional games started being playable in ScummVM, it became
apparent that these speeds were not quite right.

Additional adjustments may be needed in the future, but these new
timings seem to be somewhat closer to expectations than before.
2016-12-12 15:22:11 -06:00
Colin Snover
774713564d SCI32: Add script patch for Shivers room 35170 2016-11-19 19:06:04 -06:00
Colin Snover
8ba899b46b SCI32: Fix typos
Thanks @OmerMor.
2016-10-27 14:37:13 -05:00
Colin Snover
c30380d0a3 SCI32: Fix LSL6hires script bug
Fixes Trac#9612.
2016-10-27 10:55:30 -05:00
Colin Snover
a05ae2e24a SCI32: Fix slow transitions in SQ6 2016-10-14 19:43:47 -05:00
Colin Snover
8c555200d9 SCI32: Change storage type of int16 arrays to hold reg_ts instead
Memory references and integers in SSCI are both 16-bit numbers,
so game scripts frequently (incorrectly) use an IntArray instead
of an IDArray for holding references. Since references in ScummVM
are 32-bit reg_ts, IntArray entries must be large enough to hold
reg_ts in order to be compatible with game scripts that store
references in integer arrays.

The alternative solution is to find and patch all incorrect use of
IntArray across all games. This is possible, but a bit risky from
a save game stability perspective, since incorrect IntArray usage
is sometimes not apparent until well after the array is
instantiated (like GK1's global interview array).

This change invalidates existing SCI32 save games.
2016-10-09 11:21:13 -05:00
Eugene Sandulenko
dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
Colin Snover
084dfe9e03 SCI32: Use selector lookup in Torin script patch instead of magic numbers 2016-10-01 14:07:26 -05:00
Colin Snover
7d77a712d3 SCI32: Fix interrogation screen crash in GK1 2016-10-01 14:07:26 -05:00
Willem Jan Palenstijn
d580b64c6e SCI32: Fix build 2016-09-30 09:19:59 +02:00