From e7bebcf7aa718631159f0bb21ccd99d53f076c37 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 30 Aug 2003 20:14:30 +0000 Subject: Fixed Simon 2 intro regression (and possibly others as well) caused by recent mixer change. svn-id: r9926 --- simon/sound.cpp | 10 +++++----- simon/vga.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'simon') diff --git a/simon/sound.cpp b/simon/sound.cpp index 2aca4b955c..c9381d66bd 100644 --- a/simon/sound.cpp +++ b/simon/sound.cpp @@ -270,9 +270,9 @@ SimonSound::SimonSound(const byte game, const GameSpecificSettings *gss, const c _filenums = 0; _offsets = 0; - _voice_handle = 0; - _effects_handle = 0; - _ambient_handle = 0; + _voice_handle = -1; + _effects_handle = -1; + _ambient_handle = -1; _voice_file = false; _ambient_playing = 0; @@ -440,7 +440,7 @@ void SimonSound::playVoice(uint sound) { if (!_voice) return; - if (_voice_handle) + if (_voice_handle != -1) _mixer->stop(_voice_index); _voice_index = _voice->playSound(sound, &_voice_handle, (_game == GAME_SIMON1CD32) ? 0 : SoundMixer::FLAG_UNSIGNED); @@ -468,7 +468,7 @@ void SimonSound::playAmbient(uint sound) { if (_ambient_paused) return; - if (_ambient_handle) + if (_ambient_handle != -1) _mixer->stop(_ambient_index); _ambient_index = _effects->playSound(sound, &_ambient_handle, SoundMixer::FLAG_LOOP|SoundMixer::FLAG_UNSIGNED); diff --git a/simon/vga.cpp b/simon/vga.cpp index 9d7fc54b4b..e48db0c6c7 100644 --- a/simon/vga.cpp +++ b/simon/vga.cpp @@ -1597,7 +1597,7 @@ void SimonEngine::vc_59() { vc_kill_sprite(file, start); } while (++start != end); } else { - if (_sound->_voice_handle == 0) + if (_sound->_voice_handle == -1) vc_skip_next_instruction(); } } @@ -1775,7 +1775,7 @@ void SimonEngine::vc_63_palette_thing_2() { void SimonEngine::vc_64_skip_if_no_speech() { // Simon2 - if (_sound->_voice_handle == 0) + if (_sound->_voice_handle == -1) vc_skip_next_instruction(); } -- cgit v1.2.3