diff options
author | Filippos Karapetis | 2010-01-02 19:01:34 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-01-02 19:01:34 +0000 |
commit | 48f023b472f2f32791ef5291a66701173b17e7b6 (patch) | |
tree | 73214e466ff172ba1cf3efd5e460fc48d37301c3 /engines/sci | |
parent | 4cd46253654fda8c8595378b3d6cf7508ab74f79 (diff) | |
download | scummvm-rg350-48f023b472f2f32791ef5291a66701173b17e7b6.tar.gz scummvm-rg350-48f023b472f2f32791ef5291a66701173b17e7b6.tar.bz2 scummvm-rg350-48f023b472f2f32791ef5291a66701173b17e7b6.zip |
Properly fixed cmdUpdateCues() for SCI0, removing a hack
svn-id: r46895
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/sfx/soundcmd.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/engines/sci/sfx/soundcmd.cpp b/engines/sci/sfx/soundcmd.cpp index 0c7cccbfb4..dd23b12f9c 100644 --- a/engines/sci/sfx/soundcmd.cpp +++ b/engines/sci/sfx/soundcmd.cpp @@ -767,13 +767,6 @@ void SoundCommandParser::cmdUpdateCues(reg_t obj, int16 value) { return; } - // In SCI0, make absolutely sure that the sound object hasn't - // been deleted (can happen e.g. at the ending of QFG1) - if (_soundVersion <= SCI_VERSION_0_LATE) { - if (!_segMan->getObject(musicSlot->soundObj)) - return; - } - // Update digital sound effect slots here Audio::Mixer *mixer = g_system->getMixer(); @@ -987,6 +980,11 @@ void SoundCommandParser::updateSci0Cues() { const MusicList::iterator end = _music->getPlayListEnd(); for (MusicList::iterator i = _music->getPlayListStart(); i != end; ++i) { + // Is the sound stopped, and the sound object updated too? If yes, skip + // this sound, as SCI0 only allows one active song + if ((*i)->signal == 0 && (*i)->status != kSoundPlaying) + continue; + cmdUpdateCues((*i)->soundObj, 0); } } |