diff options
-rw-r--r-- | simon/simon.cpp | 6 | ||||
-rw-r--r-- | simon/simonsound.cpp | 5 | ||||
-rw-r--r-- | simon/simonsound.h | 1 |
3 files changed, 9 insertions, 3 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp index 9883536fb0..3bd8cc7faa 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -4485,10 +4485,10 @@ void SimonState::go() _mainscript_toggle = false; _vgascript_toggle = false; - if (!_voice) { - _vk_t_toggle = true; - } else { + if (_sound->hasVoice()) { _vk_t_toggle = false; + } else { + _vk_t_toggle = true; } while (1) { diff --git a/simon/simonsound.cpp b/simon/simonsound.cpp index e687c880ed..d6867fa0ab 100644 --- a/simon/simonsound.cpp +++ b/simon/simonsound.cpp @@ -148,6 +148,11 @@ void SimonSound::playAmbient(uint sound) _ambient_index = _effects->playSound(sound, &_ambient_handle, SoundMixer::FLAG_LOOP); } +bool SimonSound::hasVoice() +{ + return _voice != NULL; +} + void SimonSound::stopAll() { _mixer->stopAll(); diff --git a/simon/simonsound.h b/simon/simonsound.h index 22935ac9eb..7fc7c9fb6d 100644 --- a/simon/simonsound.h +++ b/simon/simonsound.h @@ -67,6 +67,7 @@ public: void playEffects(uint sound); void playAmbient(uint sound); + bool hasVoice(); void stopAll(); void effectsPause(bool b); void ambientPause(bool b); |