diff options
author | Vladimir Menshakov | 2011-06-25 18:46:10 +0400 |
---|---|---|
committer | Vladimir Menshakov | 2011-06-25 18:46:10 +0400 |
commit | 08c8d3ca1014a8242b6162b9d3f637ad601bf9ec (patch) | |
tree | 9c73ed8c5007789b1b02643e24ee95c76e704f03 /engines/dreamweb | |
parent | dfb041ee2b15708e5f3309da67e4171f4f79565e (diff) | |
download | scummvm-rg350-08c8d3ca1014a8242b6162b9d3f637ad601bf9ec.tar.gz scummvm-rg350-08c8d3ca1014a8242b6162b9d3f637ad601bf9ec.tar.bz2 scummvm-rg350-08c8d3ca1014a8242b6162b9d3f637ad601bf9ec.zip |
DREAMWEB: Minor cleanup in playSound, added kSpeechSoundType for speech
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/dreamweb.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 5d54f734e6..eebadfddae 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -420,17 +420,21 @@ void DreamWebEngine::cls() { void DreamWebEngine::playSound(uint8 channel, uint8 id, uint8 loops) { debug(1, "playSound(%u, %u, %u)", channel, id, loops); - const SoundData &data = _soundData[id >= 12? 1: 0]; - Audio::Mixer::SoundType type; - bool speech = id == 62; //actually 50 + int bank = 0; + bool speech = false; + Audio::Mixer::SoundType type = channel == 0? + Audio::Mixer::kMusicSoundType: Audio::Mixer::kSFXSoundType; + if (id >= 12) { id -= 12; - type = Audio::Mixer::kSFXSoundType; - } else if (speech) - type = Audio::Mixer::kSpeechSoundType; - else - type = Audio::Mixer::kMusicSoundType; + bank = 1; + if (id == 50) { + speech = true; + type = Audio::Mixer::kSpeechSoundType; + } + } + const SoundData &data = _soundData[bank]; Audio::SeekableAudioStream *raw; if (!speech) { |