Commit Graph
35 Commits
Author SHA1 Message Date
Colin Snover b2966f3fc8 SCI32: Fix support for RAMA demo
Fixes Trac#10251.
2017-09-30 01:08:12 -05:00
Colin Snover cd6130cdd6 SCI32: Add audio volume sync support for RAMA 2017-09-28 14:58:17 -05:00
Colin Snover fcf707e20a SCI32: Flush stub RAMA save game to disk
If this is not done and the file is buffered, it will not show up
in the list of save games, and the new save will fail.
2017-09-23 21:39:58 -05:00
Colin Snover 602de8363b SCI32: Fix infinite reload in RAMA when loading from launcher 2017-09-23 20:57:02 -05:00
Colin Snover 9c28c25b67 SCI32: Add guest additions save/restore support for RAMA 2017-09-23 20:57:01 -05:00
Colin Snover 475bb5f91a SCI32: Remove unnecessary use of strncmp
One of the strings is a static string of the same size as the size
passed to strncmp so there is no point in not just using strcmp.
2017-09-23 20:57:01 -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 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 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 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 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 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 97f7308da3 SCI32: Add music volume UI sync for MGDX 2017-07-24 19:36:38 -05:00
Colin Snover afe344cc1f SCI32: Add guest additions support for LSL7 2017-07-17 22:42:18 -05:00
Colin Snover 2b7b9ec518 SCI32: Remove duplicate call 2017-07-16 21:25:27 -05:00
Colin Snover 2c1a8790b3 SCI32: Fix wrong GK1 sound volume sync
Fixes Trac#9793.
2017-07-16 21:25:27 -05:00
Colin Snover 5fa0e4b780 SCI32: Improve GK1 narrator speech sync 2017-07-16 21:25:27 -05:00
Colin Snover 57d257b36a SCI32: Fix audio sync recursion
Calling to SciEngine::syncSoundSettings from GuestAdditions
recurses back into GuestAdditions, which is obviously not
desirable. Even when it didn't manage to cause infinite recursion
(as in SQ6 demo), it would make the UI behave in broken ways (e.g.
the +/- buttons on the music slider in SQ6 would not work because
the UI would just get updated immediately back to the closest
rounded value).
2017-06-09 23:30:10 -05:00
Colin Snover bc9835ba5e SCI: Always use SegManager::getObjectName to get object names
This ensures that all object name reading code works the same and
is in one place in the codebase.
2017-05-20 21:14:18 -05:00
Colin Snover b73e275b42 SCI32: Micro-optimize speedRoom comparison 2017-05-06 10:38:58 -05:00
Tarek Soliman f30f34cbde SCI32: Set a savegame description if none was entered
This fixes the the SCI32 incarnation of Trac#5343
(defect#3061964): Savegames with no name can't be restored
2017-05-05 12:38:04 -05:00
Colin Snover a799cb3462 SCI: Fix SCI3 exports
Export functions may be relocated above 64k in SCI3, but exports
that do not have an entry in the relocation table must be handled
the same as SCI1.1-2.1.
2017-04-23 13:07:25 -05:00
Colin Snover 399551af09 SCI: Fix compilation when SCI32 is disabled 2017-04-22 13:01:37 -05:00
Colin Snover f8703ae48d SCI32: Fix infinite recursion when loading invalid save from launcher 2017-04-22 13:01:36 -05:00
Colin Snover 2862e51068 SCI32: Fix launcher load for Shivers 2017-04-22 13:01:36 -05:00
Colin Snover 1ed185bbbb SCI: Implement delayed restore for SCI32 and move implementations to GuestAdditions 2017-04-22 13:01:35 -05:00
Colin Snover 6f75bed90c SCI32: Remove original save/load option from games without ScummVM save integration 2017-04-22 13:01:35 -05:00
Colin Snover 4c0f2a3738 SCI: Move ScummVM kernel calls to 0xe0 2017-04-22 13:01:35 -05:00
Colin Snover ec12c5a342 SCI: Move ScummVM save/restore to GuestAdditions and reimplement for SCI32 2017-04-22 13:01:16 -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