aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorathrxx2019-12-22 18:52:57 +0100
committerathrxx2019-12-22 19:09:34 +0100
commita48591ae0d83c1603e518a076449b99877904177 (patch)
tree8074a7ddcf9d320f439596365b4f6e4a42d80acf /engines
parent8e6304bd13886a46bd9e64974bb02fc89bba03e2 (diff)
downloadscummvm-rg350-a48591ae0d83c1603e518a076449b99877904177.tar.gz
scummvm-rg350-a48591ae0d83c1603e518a076449b99877904177.tar.bz2
scummvm-rg350-a48591ae0d83c1603e518a076449b99877904177.zip
KYRA: (HOF) - fix bug #10877 (Sound issues in the Legend of Kyrandia 2)
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/script/script_hof.cpp4
-rw-r--r--engines/kyra/sound/sound.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/engines/kyra/script/script_hof.cpp b/engines/kyra/script/script_hof.cpp
index 94d3a82cc4..ebc10c277a 100644
--- a/engines/kyra/script/script_hof.cpp
+++ b/engines/kyra/script/script_hof.cpp
@@ -817,8 +817,8 @@ int KyraEngine_HoF::o2_showLetter(EMCState *script) {
int KyraEngine_HoF::o2_playFireflyScore(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_playFireflyScore(%p) ()", (const void *)script);
- if (_sound->getSfxType() == Sound::kAdLib || _sound->getSfxType() == Sound::kPCSpkr ||
- _sound->getSfxType() == Sound::kMidiMT32 || _sound->getSfxType() == Sound::kMidiGM) {
+ if ((_sound->getSfxType() == Sound::kAdLib || _sound->getSfxType() == Sound::kPCSpkr || _sound->getSfxType() == Sound::kMidiMT32 ||
+ _sound->getSfxType() == Sound::kMidiGM) && !_sound->useDigitalSfx()) {
snd_playWanderScoreViaMap(86, 1);
return 1;
} else {
diff --git a/engines/kyra/sound/sound.h b/engines/kyra/sound/sound.h
index 6c45d8b59b..531496b39e 100644
--- a/engines/kyra/sound/sound.h
+++ b/engines/kyra/sound/sound.h
@@ -107,6 +107,11 @@ public:
virtual kType getMusicType() const = 0;
virtual kType getSfxType() const;
+ // This is obviously not a real implementation. The original allows disabling digital sfx (or simply not having a suitable sound card),
+ // thus falling back to the music driver's sfx. We never supported this, since we don't even have a setting for it in the launcher.
+ // Currently, the only purpose of this function is fixing KyraEngine_HoF::o2_playFireflyScore() (bug #10877: "Sound issues in the Legend of Kyrandia 2").
+ virtual bool useDigitalSfx() const { return true; }
+
/**
* Initializes the output device.
*