aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sci.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/sci.cpp')
-rw-r--r--engines/sci/sci.cpp44
1 files changed, 37 insertions, 7 deletions
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 542e818f89..eeea998b51 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -892,20 +892,50 @@ bool SciEngine::speechAndSubtitlesEnabled() {
}
void SciEngine::syncIngameAudioOptions() {
- bool subtitlesOn = false;
- bool speechOn = false;
+ bool useGlobal90 = false;
// Sync the in-game speech/subtitles settings for SCI1.1 CD games
if (isCD()) {
switch (getSciVersion()) {
case SCI_VERSION_1_1:
+ // All SCI1.1 CD games use global 90
+ useGlobal90 = true;
+ break;
#ifdef ENABLE_SCI32
case SCI_VERSION_2:
case SCI_VERSION_2_1:
+ // Only use global 90 for some specific games, not all SCI32 games used this method
+ switch (_gameId) {
+ case GID_KQ7: // SCI2.1
+ case GID_GK1: // SCI2
+ case GID_GK2: // SCI2.1
+ case GID_SQ6: // SCI2.1
+ case GID_TORIN: // SCI2.1
+ case GID_QFG4: // SCI2.1
+ useGlobal90 = true;
+ break;
+ case GID_LSL6: // SCI2.1
+ // TODO: Uses gameFlags array
+ break;
+ // TODO: Unknown at the moment:
+ // Shivers - seems not to use global 90
+ // Police Quest: SWAT - unable to check
+ // Police Quest 4 - unable to check
+ // Mixed Up Mother Goose - unable to check
+ // Phantasmagoria - seems to use global 90, unable to check for subtitles atm
+ default:
+ return;
+ }
+ break;
#endif // ENABLE_SCI32
- subtitlesOn = ConfMan.getBool("subtitles");
- speechOn = !ConfMan.getBool("speech_mute");
+ default:
+ return;
+ }
+
+ bool subtitlesOn = ConfMan.getBool("subtitles");
+ bool speechOn = !ConfMan.getBool("speech_mute");
+ if (useGlobal90) {
if (subtitlesOn && !speechOn) {
_gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 1); // subtitles
} else if (!subtitlesOn && speechOn) {
@@ -920,8 +950,11 @@ void SciEngine::syncIngameAudioOptions() {
case GID_LAURABOW2:
case GID_KQ6:
#ifdef ENABLE_SCI32
+ // Unsure about Gabriel Knight 2
case GID_KQ7: // SCI2.1
case GID_GK1: // SCI2
+ case GID_SQ6: // SCI2.1, SQ6 seems to always use subtitles anyway
+ case GID_TORIN: // SCI2.1
case GID_QFG4: // SCI2.1
#endif // ENABLE_SCI32
_gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 3); // speech + subtitles
@@ -931,9 +964,6 @@ void SciEngine::syncIngameAudioOptions() {
_gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 2); // speech
}
}
- break;
- default:
- break;
}
}
}