diff options
author | Filippos Karapetis | 2009-12-23 13:29:06 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-12-23 13:29:06 +0000 |
commit | dfd09bc025a031ff64a118c9ef04619ba4f3fc95 (patch) | |
tree | a9df175fc81931486f4b47b83dffb5b50dacae9c /engines/sci/sfx | |
parent | 162b6972207ae80e741d5671902b03cef8a142b9 (diff) | |
download | scummvm-rg350-dfd09bc025a031ff64a118c9ef04619ba4f3fc95.tar.gz scummvm-rg350-dfd09bc025a031ff64a118c9ef04619ba4f3fc95.tar.bz2 scummvm-rg350-dfd09bc025a031ff64a118c9ef04619ba4f3fc95.zip |
SCI/new music code: Do not cache the signal selector, as it needs to be always updated, so that animations can be synced properly by the game scripts. Fixes KQ6
svn-id: r46496
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r-- | engines/sci/sfx/music.cpp | 7 | ||||
-rw-r--r-- | engines/sci/sfx/music.h | 1 | ||||
-rw-r--r-- | engines/sci/sfx/soundcmd.cpp | 3 |
3 files changed, 4 insertions, 7 deletions
diff --git a/engines/sci/sfx/music.cpp b/engines/sci/sfx/music.cpp index e8f603c56f..c011a66a3d 100644 --- a/engines/sci/sfx/music.cpp +++ b/engines/sci/sfx/music.cpp @@ -353,7 +353,6 @@ void SciMusic::onTimer() { } else if (_playList[i]->pStreamAud) { if (!_pMixer->isSoundHandleActive(_playList[i]->hCurrentAud)) { _playList[i]->ticker = 0xFFFF; - _playList[i]->signal = 0xFFFF; _playList[i]->status = kStopped; // Signal the engine scripts that the sound is done playing @@ -530,6 +529,8 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { if (info.event < 0x80) return; + SegManager *segMan = ((SciEngine *)g_engine)->getEngineState()->_segMan; // HACK + _position._running_status = info.event; switch (info.command()) { case 0xC: @@ -537,7 +538,7 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { info.basic.param2 = 0; if (info.channel() == 0xF) {// SCI special case if (info.basic.param1 != 0x7F) - _pSnd->signal = info.basic.param1; + PUT_SEL32V(segMan, _pSnd->soundObj, signal, info.basic.param1); else _loopTick = _position._play_tick; } @@ -611,7 +612,7 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { _pSnd->loop--; } else { _pSnd->status = kStopped; - _pSnd->signal = 0xFFFF; + PUT_SEL32V(segMan, _pSnd->soundObj, signal, 0xFFFF); } } break; diff --git a/engines/sci/sfx/music.h b/engines/sci/sfx/music.h index f8e24de89b..5fc6ea8325 100644 --- a/engines/sci/sfx/music.h +++ b/engines/sci/sfx/music.h @@ -77,7 +77,6 @@ struct MusicEntry { uint16 dataInc; uint16 ticker; - uint16 signal; byte prio; byte loop; byte volume; diff --git a/engines/sci/sfx/soundcmd.cpp b/engines/sci/sfx/soundcmd.cpp index 7c654622af..98d4b53f74 100644 --- a/engines/sci/sfx/soundcmd.cpp +++ b/engines/sci/sfx/soundcmd.cpp @@ -293,7 +293,6 @@ void SoundCommandParser::cmdInitHandle(reg_t obj, int16 value) { newSound->loop = GET_SEL32V(_segMan, obj, loop) == 0xFFFF ? 1 : 0; newSound->prio = GET_SEL32V(_segMan, obj, pri) & 0xFF; newSound->volume = GET_SEL32V(_segMan, obj, vol) & 0xFF; - newSound->signal = 0; newSound->dataInc = 0; newSound->pStreamAud = 0; newSound->pMidiParser = 0; @@ -486,7 +485,6 @@ void SoundCommandParser::cmdStopHandle(reg_t obj, int16 value) { if (!GET_SEL32(_segMan, obj, nodePtr).isNull()) { _music->_playList[slot]->dataInc = 0; - _music->_playList[slot]->signal = SIGNAL_OFFSET; _music->soundStop(_music->_playList[slot]); } #endif @@ -752,7 +750,6 @@ void SoundCommandParser::cmdUpdateCues(reg_t obj, int16 value) { cmdStopHandle(obj, value); break; default: - PUT_SEL32V(_segMan, obj, signal, _music->_playList[slot]->signal); break; } |