diff options
author | Strangerke | 2013-01-28 07:45:46 +0100 |
---|---|---|
committer | Strangerke | 2013-01-28 07:45:46 +0100 |
commit | c0ad052c727650464419318a760e08bb7d152072 (patch) | |
tree | 5e9a1c361d1c8c75601c283fda4b86260078f754 /engines/hopkins | |
parent | 623360cf15173d9b0dfc79acb62732af15c3b095 (diff) | |
download | scummvm-rg350-c0ad052c727650464419318a760e08bb7d152072.tar.gz scummvm-rg350-c0ad052c727650464419318a760e08bb7d152072.tar.bz2 scummvm-rg350-c0ad052c727650464419318a760e08bb7d152072.zip |
HOPKINS: Add a fallback for the sound played in the option menu, for the BeOS and OS/2 versions
Diffstat (limited to 'engines/hopkins')
-rw-r--r-- | engines/hopkins/sound.cpp | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index 46bdb1e841..96c7df2329 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -625,12 +625,23 @@ void SoundManager::DEL_SAMPLE(int soundIndex) { } void SoundManager::playSound(const Common::String &file) { - if (!_soundOffFl) { - if (_soundFl) - delWav(_currentSoundIndex); - loadWav(file, 1); - playWav(1); - } + if (_soundOffFl) + return; + + // Fallback for the menu option. + // The BeOS and OS/2 versions don't play sound at this point. + // sound20 sounds very close to bruit2 from the linux and Win95 versions. + Common::File f; + Common::String filename; + if (file == "bruit2.wav" && !f.exists(file)) + filename = "sound20.wav"; + else + filename = file; + + if (_soundFl) + delWav(_currentSoundIndex); + loadWav(filename, 1); + playWav(1); } void SoundManager::PLAY_SOUND2(const Common::String &file) { |