From d0d1d6e921ac656243d2b46b4f6512a19f18125d Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Mon, 21 Dec 2015 23:25:58 +0100 Subject: SCI32: add code for kq7 audio+subtitles mode also enables it for gk1 and qfg4 (CD versions) --- engines/sci/sci.cpp | 60 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 21 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 668ad053cc..542e818f89 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -892,30 +892,48 @@ bool SciEngine::speechAndSubtitlesEnabled() { } void SciEngine::syncIngameAudioOptions() { + bool subtitlesOn = false; + bool speechOn = false; + // Sync the in-game speech/subtitles settings for SCI1.1 CD games - if (isCD() && getSciVersion() == SCI_VERSION_1_1) { - bool subtitlesOn = ConfMan.getBool("subtitles"); - bool speechOn = !ConfMan.getBool("speech_mute"); - - if (subtitlesOn && !speechOn) { - _gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 1); // subtitles - } else if (!subtitlesOn && speechOn) { - _gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 2); // speech - } else if (subtitlesOn && speechOn) { - // Is it a game that supports simultaneous speech and subtitles? - switch (_gameId) { - case GID_SQ4: - case GID_FREDDYPHARKAS: - case GID_ECOQUEST: - case GID_LSL6: - case GID_LAURABOW2: - case GID_KQ6: - _gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 3); // speech + subtitles - break; - default: - // Game does not support speech and subtitles, set it to speech + if (isCD()) { + switch (getSciVersion()) { + case SCI_VERSION_1_1: +#ifdef ENABLE_SCI32 + case SCI_VERSION_2: + case SCI_VERSION_2_1: +#endif // ENABLE_SCI32 + subtitlesOn = ConfMan.getBool("subtitles"); + speechOn = !ConfMan.getBool("speech_mute"); + + if (subtitlesOn && !speechOn) { + _gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 1); // subtitles + } else if (!subtitlesOn && speechOn) { _gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 2); // speech + } else if (subtitlesOn && speechOn) { + // Is it a game that supports simultaneous speech and subtitles? + switch (_gameId) { + case GID_SQ4: + case GID_FREDDYPHARKAS: + case GID_ECOQUEST: + case GID_LSL6: + case GID_LAURABOW2: + case GID_KQ6: +#ifdef ENABLE_SCI32 + case GID_KQ7: // SCI2.1 + case GID_GK1: // SCI2 + case GID_QFG4: // SCI2.1 +#endif // ENABLE_SCI32 + _gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 3); // speech + subtitles + break; + default: + // Game does not support speech and subtitles, set it to speech + _gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 2); // speech + } } + break; + default: + break; } } } -- cgit v1.2.3 From b0587f6af8a754b15c8ecb7eb01592fb1406b76b Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 22 Dec 2015 01:53:19 +0100 Subject: SCI32: add code for torin+sq6 audio+subtitles mode also add comments about other SCI32 games set global 90 only for lsl6 sci1.1 --- engines/sci/sci.cpp | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) (limited to 'engines/sci/sci.cpp') 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; } } } -- cgit v1.2.3 From d2d700e086036f634ef9453298b0f70dce90b206 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 28 Dec 2015 00:09:44 +0100 Subject: SCI: Remove superflous default value registration for extra GUI options. --- engines/sci/sci.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index eeea998b51..75f485d6c3 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -194,12 +194,6 @@ SciEngine::~SciEngine() { extern void showScummVMDialog(const Common::String &message); Common::Error SciEngine::run() { - // Assign default values to the config manager, in case settings are missing - ConfMan.registerDefault("originalsaveload", "false"); - ConfMan.registerDefault("native_fb01", "false"); - ConfMan.registerDefault("windows_cursors", "false"); // Windows cursors for KQ6 Windows - ConfMan.registerDefault("silver_cursors", "false"); // Silver cursors for SQ4 CD - _resMan = new ResourceManager(); assert(_resMan); _resMan->addAppropriateSources(); -- cgit v1.2.3 From 0dd760724e37b70bfaade2c34c12e34fab4d4b71 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 29 Dec 2015 01:44:11 +0100 Subject: SCI32: split up SCI2.1 into EARLY/MIDDLE/LATE - Detection works via signatures (couldn't find a better way) - new kString subcalls were introduced SCI2.1 LATE - kString now has signatures and is split via subcall table - kString fix, so that KQ7 doesn't crash, when starting a chapter - Sci2StringFunctionType removed, because no longer needed --- engines/sci/sci.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 75f485d6c3..f1ab65ef98 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -897,7 +897,9 @@ void SciEngine::syncIngameAudioOptions() { break; #ifdef ENABLE_SCI32 case SCI_VERSION_2: - case SCI_VERSION_2_1: + case SCI_VERSION_2_1_EARLY: + case SCI_VERSION_2_1_MIDDLE: + case SCI_VERSION_2_1_LATE: // Only use global 90 for some specific games, not all SCI32 games used this method switch (_gameId) { case GID_KQ7: // SCI2.1 -- cgit v1.2.3