aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins
diff options
context:
space:
mode:
authorStrangerke2013-01-28 07:45:46 +0100
committerStrangerke2013-01-28 07:45:46 +0100
commitc0ad052c727650464419318a760e08bb7d152072 (patch)
tree5e9a1c361d1c8c75601c283fda4b86260078f754 /engines/hopkins
parent623360cf15173d9b0dfc79acb62732af15c3b095 (diff)
downloadscummvm-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.cpp23
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) {