From e9269257f3da947eca3fb167b279fbe91650157a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 24 Dec 2003 00:25:18 +0000 Subject: turned PlayingSoundHandle into an 'opaque' (well not really :-) data type, mainly because people kept (accidentally and sometimes on purpose :-) misusing them svn-id: r11881 --- sky/intro.cpp | 2 +- sky/sound.cpp | 5 ----- sky/sound.h | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) (limited to 'sky') diff --git a/sky/intro.cpp b/sky/intro.cpp index 764890bc7d..da938a122e 100644 --- a/sky/intro.cpp +++ b/sky/intro.cpp @@ -728,7 +728,7 @@ bool SkyIntro::nextPart(uint16 *&data) { SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_UNSIGNED, SOUND_VOICE); return true; case WAITVOICE: - while (_voice) + while (_voice.isActive()) if (!escDelay(50)) return false; return true; diff --git a/sky/sound.cpp b/sky/sound.cpp index 1e2c3a352c..8b8b1725bd 100644 --- a/sky/sound.cpp +++ b/sky/sound.cpp @@ -1019,11 +1019,6 @@ SkySound::SkySound(SoundMixer *mixer, SkyDisk *pDisk, uint8 pVolume) { _skyDisk = pDisk; _soundData = NULL; _mixer = mixer; - _voiceHandle = 0; - _effectHandle = 0; - _bgSoundHandle = 0; - _ingameSpeech = 0; - _ingameSound0 = _ingameSound1 = 0; _saveSounds[0] = _saveSounds[1] = 0xFFFF; _mainSfxVolume = pVolume; } diff --git a/sky/sound.h b/sky/sound.h index 57636afc01..4191a343d7 100644 --- a/sky/sound.h +++ b/sky/sound.h @@ -67,7 +67,7 @@ public: void playSound(uint16 sound, uint16 volume, uint8 channel); void fnStartFx(uint32 sound, uint8 channel); bool startSpeech(uint16 textNum); - bool speechFinished(void) { return _ingameSpeech == 0; }; + bool speechFinished(void) { return !_ingameSpeech.isActive(); }; void fnPauseFx(void); void fnUnPauseFx(void); void fnStopFx(void); -- cgit v1.2.3