aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2012-03-25 16:40:49 +0300
committerFilippos Karapetis2012-03-25 16:40:49 +0300
commit536a7e407f97d7f5ed6db563424f1a7b576688b1 (patch)
treeb3e0beca315eab8a81fc6a8100a39c657563690f /engines/sci
parent4dc2f2d43305f29cd1deee924abca7a95c723b53 (diff)
downloadscummvm-rg350-536a7e407f97d7f5ed6db563424f1a7b576688b1.tar.gz
scummvm-rg350-536a7e407f97d7f5ed6db563424f1a7b576688b1.tar.bz2
scummvm-rg350-536a7e407f97d7f5ed6db563424f1a7b576688b1.zip
SCI: Hook up the digital SFX and CD audio options
The relevant code wasn't added in the newer commits - this was an oversight from my part
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/features.cpp3
-rw-r--r--engines/sci/sound/soundcmd.cpp13
2 files changed, 7 insertions, 9 deletions
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp
index b3cfee873c..a284c319c0 100644
--- a/engines/sci/engine/features.cpp
+++ b/engines/sci/engine/features.cpp
@@ -26,6 +26,7 @@
#include "sci/engine/selector.h"
#include "sci/engine/vm.h"
+#include "common/config-manager.h"
#include "common/file.h"
namespace Sci {
@@ -42,6 +43,8 @@ GameFeatures::GameFeatures(SegManager *segMan, Kernel *kernel) : _segMan(segMan)
_sci2StringFunctionType = kSci2StringFunctionUninitialized;
#endif
_usesCdTrack = Common::File::exists("cdaudio.map");
+ if (ConfMan.hasKey("use_cdaudio") && !ConfMan.getBool("use_cdaudio"))
+ _usesCdTrack = false;
}
reg_t GameFeatures::getDetectionAddr(const Common::String &objName, Selector slc, int methodNum) {
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index b8be898abc..8481f10171 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -32,14 +32,11 @@
namespace Sci {
-//#define ENABLE_SFX_TYPE_SELECTION
-
SoundCommandParser::SoundCommandParser(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, AudioPlayer *audio, SciVersion soundVersion) :
_resMan(resMan), _segMan(segMan), _kernel(kernel), _audio(audio), _soundVersion(soundVersion) {
-#ifdef ENABLE_SFX_TYPE_SELECTION
// Check if the user wants synthesized or digital sound effects in SCI1.1
- // games based on the multi_midi config setting
+ // games based on the prefer_digitalsfx config setting
// In SCI2 and later games, this check should always be true - there was
// always only one version of each sound effect or digital music track
@@ -48,11 +45,9 @@ SoundCommandParser::SoundCommandParser(ResourceManager *resMan, SegManager *segM
// The GK1 demo (very late SCI1.1) does the same thing
// TODO: Check the QFG4 demo
- _useDigitalSFX = (getSciVersion() >= SCI_VERSION_2 || g_sci->getGameId() == GID_GK1 || ConfMan.getBool("multi_midi"));
-#else
- // Always prefer digital sound effects
- _useDigitalSFX = true;
-#endif
+ // If the prefer_digitalsfx key is missing, default to enable digital SFX
+ bool preferDigitalSfx = !ConfMan.hasKey("prefer_digitalsfx") || ConfMan.getBool("prefer_digitalsfx");
+ _useDigitalSFX = (getSciVersion() >= SCI_VERSION_2 || g_sci->getGameId() == GID_GK1 || preferDigitalSfx);
_music = new SciMusic(_soundVersion, _useDigitalSFX);
_music->init();