Commit graph

4058 commits

Author SHA1 Message Date
Colin Snover
ea33f26d05 SCI32: Clean-up pass on LSL6hires script patches
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR
* Make identifier suffixes and patch descriptions consistent
2017-09-16 16:33:07 -05:00
Colin Snover
59fe526b16 SCI32: Clean-up pass on Lighthouse script patches
* Make patch descriptions consistent
2017-09-16 16:33:07 -05:00
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
  e8c429832f
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
029eeeb803 SCI32: Fix Phant2 "auto-save"
The game has a feature where it will automatically create a save
game when you quit the game through the in-game control panel (or
when you die, for some reason).

Unfortunately, due to bad programming, this automatic save would
just overwrite whatever was in save slot 1 (slot 0 in the original
interpreter). Find this attempt to auto-save the game and redirect
it to the auto-save slot. This might not be totally correct, but
it is at least better than destroying a save game.

Fixes Trac#10201.
2017-09-14 20:45:02 -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
200c8c442b SCI: Remove dead code 2017-09-10 22:17:17 -05:00
Colin Snover
393c0d1f62 SCI32: Fix whitespace errors 2017-09-09 23:29:57 -05:00
Colin Snover
f200cc110f SCI32: Send correct color depth to Phant2
This is not known to fix any particular issue, but the game does
set some flags internally if it's running in 256-color Windows,
which is possibly undesirable since we do run 16-bit videos
regardless.
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
14b3ed6414 SCI32: Fix volume config when changing volume from in-game Phant2 controls 2017-09-08 22:49:28 -05:00
Colin Snover
04d4c11100 SCI32: Order nulls consistently in kernel signatures 2017-09-08 21:16:47 -05:00
Colin Snover
94b39c83b6 SCI32: Remove redundant kStringGetData implementation
This code is identical to the kArrayGetData implementation.
2017-09-08 21:10:51 -05:00
Colin Snover
7eedfdbeaf SCI32: Fix kString signatures to allow null references where appropriate
The original interpreter allowed most string references to be
null references, in which case it would substitute an empty
string.
2017-09-08 21:10:51 -05:00
Colin Snover
5228aa29fa SCI32: Fix crash when changing security level of dead people in Phant2
In the original interpreter, is it valid to pass a null reference
to both kArray(GetData) (it just acts as an identity function when
the passed argument is not an object) and to kString functions (it
always dereferences to an empty string).

Fixes Trac#10039.
2017-09-08 21:10:51 -05:00
Colin Snover
a447664373 SCI32: Add missing include for ConfMan 2017-09-08 19:10:21 -05:00
Colin Snover
f11b0a4ff5 SCI32: Toggle Phant2 content censoring from game options
To enable the optional content censoring mode, Phant2 looks
for a RESDUK.PAT file, which is normally placed by the game's
installer if the user chose to enable censorship. If the file
exists, the game reads an unlock password out of the file and
asks the user to enter the password when starting a new game to
create an uncensored game, or to click a "less intense" button
to start the game with censoring. The censorship state of the
game is then persisted in the save game file, and installations
with the RESDUK.PAT file need to enter the password again in
order to restore any of the uncensored saves.

Since we do not have an installer that can enable this feature,
add a game option toggle to enable/disable censoring (for the
releases that have the optional censorship mode) instead so the
censored content feature is available for anyone that wants to use
it. This flag is restored from ScummVM whenever a save game is
loaded, so it can be toggled on or off at any point without
needing a separate save game, unlike in the original interpreter.
2017-09-08 16:03:24 -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
96f702e9a8 SCI: Fix builds with SCI32 disabled 2017-09-03 21:39:22 -05:00
Colin Snover
6e35676a9e SCI32: Fix load from launcher for Lighthouse
Launcher loads of games without a saved Robot were fine, but games
that were saved with a Robot (e.g. room 480 when facing the water)
would crash.
2017-09-03 20:58:09 -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
Colin Snover
43a07abb46 SCI32: Implement kCelLink
kCelLink exists in SSCI since 2.1mid, but it is only known to be
used in Lighthouse, during the weapon creation puzzle near the end
of the game.
2017-09-03 20:58:07 -05:00
Colin Snover
74738489ec SCI32: Fix SFX volume being misapplied to music & speech in some games
This was happening in games with game scripts that control the
master volume themselves by applying the master volume to each
channel sent to the kernel, instead of relying on the kernel to
manage the master volume for them.
2017-08-26 18:09:46 -05:00
Torbjörn Andersson
7d52dbe7eb JANITORIAL: Remove unnecessary semicolon 2017-08-25 17:56:09 +02: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
Torbjörn Andersson
70a2ca8b7d JANITORIAL: Silence more GCC 7 warnings
All these fall through were marked as deliberate, so again I've only
changed the comment to silence GCC.
2017-08-06 13:30:51 +02:00
Torbjörn Andersson
14525bb412 JANITORIAL: Silence some GCC 7 warnings
We have lots and lots of -Wimplicit-fallthrough warnings, and I
don't know if it's worth fixing them or not. But if we want to,
this is how it can be done.
2017-08-06 11:48:14 +02:00
Colin Snover
c254df2d2d SCI32: Increase maximum save games for Phant2 2017-07-30 21:04:51 -05:00
Colin Snover
5c3a2cf16a SCI32: Add load from launcher support for Phant2
Adding a hook into kPlayDuck to skip the intro video feels kind of
crappy, but it seemed simpler, consistent with the other hooks for
launch loading, and therefore preferable versus hot-patching the
script or messing with PC in the VM or something.
2017-07-30 19:21:55 -05:00
Colin Snover
49e8f05714 SCI32: Implement Phant2 save/load integration 2017-07-30 19:10:50 -05:00
Colin Snover
325fd1a3ef SCI32: Deduplicate guest additions save/load code 2017-07-30 19:10:50 -05:00
Colin Snover
e4b3478d99 SCI: Show inherited methods when viewing an object in the debugger 2017-07-30 19:10:50 -05:00
Colin Snover
06686c09f0 SCI32: Fix breakpoints on reading/writing selectors in SCI3 2017-07-30 19:10:50 -05:00
Colin Snover
d02e62a769 SCI32: Indicate that LSL7 and Torin use the same save/load code 2017-07-30 19:10:50 -05:00
Colin Snover
ba4c28418f SCI32: Minor code deduplication 2017-07-30 19:10:50 -05:00
Colin Snover
b13777da8c SCI32: Implement guest additions volume sync for Phant2 2017-07-30 19:10:50 -05:00
Colin Snover
ad05bfedd8 SCI: Expose API for retrieving multiple objects with the same name
This is needed by Phant2 guest additions to find the correct
slider for the music volume, since the sliders have no unique name.
2017-07-30 19:10:50 -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