diff options
author | Colin Snover | 2017-01-26 13:18:41 -0600 |
---|---|---|
committer | Colin Snover | 2017-04-21 19:00:27 -0500 |
commit | 3303a881397beff1753fba237a5da735de03edb5 (patch) | |
tree | 8c3a682ee12840bfeaa9cb8e80967440d2aad26e /engines/sci/sci.h | |
parent | c2e9fee93264468d89de66eccdc0cc712cdb76fe (diff) | |
download | scummvm-rg350-3303a881397beff1753fba237a5da735de03edb5.tar.gz scummvm-rg350-3303a881397beff1753fba237a5da735de03edb5.tar.bz2 scummvm-rg350-3303a881397beff1753fba237a5da735de03edb5.zip |
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.
Diffstat (limited to 'engines/sci/sci.h')
-rw-r--r-- | engines/sci/sci.h | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/engines/sci/sci.h b/engines/sci/sci.h index f5ccc19d7c..744a1b4aed 100644 --- a/engines/sci/sci.h +++ b/engines/sci/sci.h @@ -62,6 +62,7 @@ class Vocabulary; class ResourceManager; class Kernel; class GameFeatures; +class GuestAdditions; class Console; class AudioPlayer; class SoundCommandParser; @@ -263,28 +264,6 @@ public: uint32 getTickCount(); void setTickCount(const uint32 ticks); - /** - * Syncs the audio options of the ScummVM launcher (speech, subtitles or - * both) with the in-game audio options of certain CD game versions. For - * some games, this allows simultaneous playing of speech and subtitles, - * even if the original games didn't support this feature. - * - * SCI1.1 games which support simultaneous speech and subtitles: - * - EcoQuest 1 CD - * - Leisure Suit Larry 6 CD - * SCI1.1 games which don't support simultaneous speech and subtitles, - * and we add this functionality in ScummVM: - * - Space Quest 4 CD - * - Freddy Pharkas CD - * - Laura Bow 2 CD - * SCI1.1 games which don't support simultaneous speech and subtitles, - * and we haven't added any extra functionality in ScummVM because extra - * script patches are needed: - * - King's Quest 6 CD - */ - void syncIngameAudioOptions(); - void updateScummVMAudioOptions(); - const SciGameId &getGameId() const { return _gameId; } const char *getGameIdStr() const; int getResourceVersion() const; @@ -398,6 +377,7 @@ public: Sync *_sync; SoundCommandParser *_soundCmd; GameFeatures *_features; + GuestAdditions *_guestAdditions; opcode_format (*_opcode_formats)[4]; |