aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorVladimir Menshakov2011-06-25 18:46:10 +0400
committerVladimir Menshakov2011-06-25 18:46:10 +0400
commit08c8d3ca1014a8242b6162b9d3f637ad601bf9ec (patch)
tree9c73ed8c5007789b1b02643e24ee95c76e704f03 /engines/dreamweb
parentdfb041ee2b15708e5f3309da67e4171f4f79565e (diff)
downloadscummvm-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.cpp20
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) {