diff options
author | Paul Gilbert | 2017-06-25 08:00:55 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-06-25 08:00:55 -0400 |
commit | f16505b128c5aac2a0b4d8c18e360b14058149e1 (patch) | |
tree | a0a09f03fcbd260eb6eac3ef33973890e3137ad9 /engines/titanic/game/bomb.cpp | |
parent | e127ddada136602ef6a6356a282c4cbfbd84a580 (diff) | |
download | scummvm-rg350-f16505b128c5aac2a0b4d8c18e360b14058149e1.tar.gz scummvm-rg350-f16505b128c5aac2a0b4d8c18e360b14058149e1.tar.bz2 scummvm-rg350-f16505b128c5aac2a0b4d8c18e360b14058149e1.zip |
TITANIC: Change Bomb to use speech sound type
Diffstat (limited to 'engines/titanic/game/bomb.cpp')
-rw-r--r-- | engines/titanic/game/bomb.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/engines/titanic/game/bomb.cpp b/engines/titanic/game/bomb.cpp index 17c10c5082..93887ab7b1 100644 --- a/engines/titanic/game/bomb.cpp +++ b/engines/titanic/game/bomb.cpp @@ -158,7 +158,7 @@ bool CBomb::StatusChangeMsg(CStatusChangeMsg *msg) { break; } - _soundHandle = queueSound(name, _soundHandle, _volume); + _soundHandle = queueSound(name, _soundHandle, _volume, Audio::Mixer::kSpeechSoundType); } return true; @@ -174,7 +174,6 @@ bool CBomb::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (_active) { stopSound(_soundHandle); - //stopSound(_unusedHandle); if (_numCorrectWheels < CORRECT_WHEELS) { _tappedCtr = MIN(_tappedCtr + 1, 23); @@ -201,7 +200,7 @@ bool CBomb::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { break; } - _soundHandle = queueSound(name, _soundHandle, _volume); + _soundHandle = queueSound(name, _soundHandle, _volume, Audio::Mixer::kSpeechSoundType); _countdown = 999; } } else { @@ -258,7 +257,7 @@ bool CBomb::ActMsg(CActMsg *msg) { break; } - _soundHandle = queueSound(name, _soundHandle, _volume); + _soundHandle = queueSound(name, _soundHandle, _volume, Audio::Mixer::kSpeechSoundType); _countdown = 999; } @@ -267,7 +266,8 @@ bool CBomb::ActMsg(CActMsg *msg) { bool CBomb::TurnOn(CTurnOn *msg) { if (!_active) { - _soundHandle = playSound("z#389.wav", _volume); + CProximity prox(Audio::Mixer::kSpeechSoundType, _volume); + _soundHandle = playSound("z#389.wav", prox); _active = true; // WORKAROUND: Only reset the code wheels back to 'O' value @@ -295,8 +295,9 @@ bool CBomb::TurnOn(CTurnOn *msg) { bool CBomb::TimerMsg(CTimerMsg *msg) { if (msg->_action == "Disarmed") { + CProximity prox(Audio::Mixer::kSpeechSoundType, _volume); stopSound(_soundHandle); - playSound("z#364.wav", _volume); + playSound("z#364.wav", prox); CActMsg actMsg1("Disarm Bomb"); actMsg1.execute("EndExplodeShip"); @@ -330,8 +331,9 @@ bool CBomb::TimerMsg(CTimerMsg *msg) { if (_countdown >= 100) { // Play "x hundred and" or just "x hundred" + CProximity prox(Audio::Mixer::kSpeechSoundType, _volume); CString hName = remainder ? HUNDREDS_AND_WAVS[hundreds] : HUNDREDS_WAVS[hundreds]; - _soundHandle = playSound(hName, _volume); + _soundHandle = playSound(hName, prox); } CString ctrName = COUNTDOWN_WAVS[remainder]; @@ -342,9 +344,10 @@ bool CBomb::TimerMsg(CTimerMsg *msg) { // Play the sub-hundred portion of the countdown amount if (_soundHandle > 0) { - _soundHandle = queueSound(ctrName, _soundHandle, _volume); + _soundHandle = queueSound(ctrName, _soundHandle, _volume, 0, false, Audio::Mixer::kSpeechSoundType); } else { - _soundHandle = playSound(ctrName, _volume); + CProximity prox(Audio::Mixer::kSpeechSoundType, _volume); + _soundHandle = playSound(ctrName, prox); } // Reduce countdown and schedule another timer @@ -352,7 +355,7 @@ bool CBomb::TimerMsg(CTimerMsg *msg) { addTimer(0, 1000, 0); } } else { - // Bomb speech currently active, so schedule the method' + // Bomb speech currently active, so schedule the method // to re-trigger after 100ms to check if speech is finished addTimer(0, 100, 0); } |