diff options
author | uruk | 2014-07-24 18:55:09 +0200 |
---|---|---|
committer | uruk | 2014-07-24 18:55:09 +0200 |
commit | ff97d52d728a0a47f421dfdfabb40b30f0b1c920 (patch) | |
tree | a90b9c8db40ecb3d408055d7cd0709b9545d33e7 /engines/cge2/snail.cpp | |
parent | 24cc8a8762ded511e8f69ee2790f38b913ddcae9 (diff) | |
download | scummvm-rg350-ff97d52d728a0a47f421dfdfabb40b30f0b1c920.tar.gz scummvm-rg350-ff97d52d728a0a47f421dfdfabb40b30f0b1c920.tar.bz2 scummvm-rg350-ff97d52d728a0a47f421dfdfabb40b30f0b1c920.zip |
CGE2: Distinguish SFX from speech when playing sounds.
Now the sound options of ScummVM are taken into account when playing these two types of sounds. Until now, everything was considered SFX sound.
Diffstat (limited to 'engines/cge2/snail.cpp')
-rw-r--r-- | engines/cge2/snail.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/cge2/snail.cpp b/engines/cge2/snail.cpp index f6c6e2d71f..aebe1f0778 100644 --- a/engines/cge2/snail.cpp +++ b/engines/cge2/snail.cpp @@ -75,7 +75,7 @@ void CommandHandler::runCommand() { if (_vm->_fx->exist(_vm->_soundStat._ref[1], _vm->_soundStat._ref[0])) { int16 oldRepeat = _vm->_sound->getRepeat(); _vm->_sound->setRepeat(1); - _vm->_sound->play(_vm->_fx->load(_vm->_soundStat._ref[1], _vm->_soundStat._ref[0]), _vm->_sound->_smpinf._span); + _vm->_sound->play(Audio::Mixer::kSFXSoundType, _vm->_fx->load(_vm->_soundStat._ref[1], _vm->_soundStat._ref[0]), _vm->_sound->_smpinf._span); _vm->_sound->setRepeat(oldRepeat); return; } @@ -676,7 +676,7 @@ void CGE2Engine::snReach(Sprite *spr, int val) { ((Hero *)spr)->reach(val); } -void CGE2Engine::snSound(Sprite *spr, int wav) { +void CGE2Engine::snSound(Sprite *spr, int wav, Audio::Mixer::SoundType soundType) { if (wav == -1) _sound->stop(); else { @@ -687,7 +687,7 @@ void CGE2Engine::snSound(Sprite *spr, int wav) { _soundStat._ref[1] = wav; _soundStat._ref[0] = !_fx->exist(_soundStat._ref[1]); - _sound->play(_fx->load(_soundStat._ref[1], _soundStat._ref[0]), + _sound->play(soundType, _fx->load(_soundStat._ref[1], _soundStat._ref[0]), (spr) ? (spr->_pos2D.x / (kScrWidth / 16)) : 8); } } @@ -746,7 +746,7 @@ void CGE2Engine::snSay(Sprite *spr, int val) { i -= 100; int16 oldRepeat = _sound->getRepeat(); _sound->setRepeat(1); - snSound(spr, i); + snSound(spr, i, Audio::Mixer::kSpeechSoundType); _sound->setRepeat(oldRepeat); _soundStat._wait = &_sound->_smpinf._counter; } |