547 Commits

Author SHA1 Message Date
Colin Snover
08291cca3c SCI32: Clean-up pass on KQ7 script patches
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR
* Convert word-size numeric literals to SIG_UINT16/PATCH_UINT16
* Wrap comments at 80 columns
* Rewrite comments for clarity and brevity
* Make alignment of operation comments consistent
* Make identifier suffixes and patch descriptions consistent
2017-09-16 16:33:07 -05:00
Colin Snover
bbcee7e6a1 SCI32: Clean-up pass on GK2 script patches
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR
* Make alignment of operation comments consistent
* Make patch descriptions consistent
2017-09-16 16:33:06 -05:00
Colin Snover
96d4bb603d SCI32: Clean-up pass on GK1 script patches
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR
* Convert word-size numeric literals to SIG_UINT16/PATCH_UINT16
* Wrap comments at 80 columns
* Rewrite comments for clarity and brevity
* Make alignment of operation comments consistent
* Make identifier suffixes, patch descriptions, and patch table
  ordering consistent
* Remove no-longer-needed script patch for day 10 room 808, which
  has been fixed using a different, generic mechanism since commit
  e8c429832f7b6393f853fd6d9ce8ba2e62f6a93c
2017-09-16 16:33:06 -05:00
Martin Kiewitz
bbbbfb64dc SCI32: Add script patch for PQ4CD for dual mode (text+speech)
This makes the game menu able to handle a 3rd state, so that the
game shows text but also play speech at the same time.

We need to inject our own view for the new button to really show
up. I'm not that experienced with the SCI32 graphics code, which
is why I prefer snover to do this part.
Right now it will show the button with text selected 2 times in
a row. The first "text" button is the dual mode / "both" state.

Anyway, thanks to snover for notifying me of this game needing
dual mode patched in and also for some help.
2017-09-16 19:58:40 +02:00
David Fioramonti
817c9e77aa SCI32: Fix bad play call in Shivers room 23090
This fixes a bad play call by replacing it with a fade call.

The newRoom function In script rm23v090 (room 23090) was
calling a play function with 5 arguments, but the play
function only takes 4 arguments. Since it looks like a fade
call it has been replaced with that.

Fixes Trac#10200.

snover helped.
2017-09-15 23:44:13 -05:00
Colin Snover
b8af2ca66f SCI32: Fix clipping of inventory items in Phant2
This fixes overlapping of the left arrow in all cases, but the
scroll delta and initial offset of inventory items will only be
fixed in new games because the affected objects are global objects
whose bad properties get persisted into save games.

Fixes Trac#10037.
2017-09-15 12:08:31 -05:00
Colin Snover
df85727186 SCI32: Fix wrong open folder/doc icons in Phant2 computer on first render
This fixes flickering icons during the word hallucinations.
2017-09-12 00:45:19 -05:00
Colin Snover
a7ede0ca39 SCI32: Fix bad positioning of text in Phant2 computer on first render
This fixes the glitchy positioning during the word hallucinations.

Fixes Trac#10036.
2017-09-12 00:45:18 -05:00
Colin Snover
f9c43144a7 SCI32: Fix janky document scrolling in Phant2 computer interface 2017-09-12 00:45:18 -05:00
Colin Snover
eb284c45ed SCI32: Replace spin loop with kWait in Phant2 alien password screen 2017-09-12 00:45:18 -05:00
Colin Snover
393c0d1f62 SCI32: Fix whitespace errors 2017-09-09 23:29:57 -05:00
Colin Snover
e137d01967 SCI32: Fix Phant2 movie-vs-game playback volumes
This update should give the game the default mix it receives in
Windows. If necessary, the half-volume audio bug in the DOS
interpreter can be added as an additional hack for this game, since
there are still some sub-par audio mixes that might need additional
correction (like Curtis talking to Blob when taking her out of the
cage in his apartment at the start of the game) which were also
bad in the Windows version of the game.

Fixes Trac#10165.
2017-09-09 23:29:57 -05:00
Colin Snover
9d42bea857 SCI32: Fix creating over 20 saves in Phant2 native save game 2017-09-04 15:20:00 -05:00
Colin Snover
bdbcc90148 SCI32: Disable save game mangling in Phant2
Fixes Trac#10035.
2017-09-04 15:19:59 -05:00
Colin Snover
768d698434 SCI32: Add standard SRDialog patches to Lighthouse 2017-09-03 20:58:08 -05:00
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 a46f3c162581740a3cad27e1168164ca91beb9c9
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