mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -77,7 +77,6 @@ struct MusicEntry {
|
||||
|
||||
uint16 dataInc;
|
||||
uint16 ticker;
|
||||
uint16 signal;
|
||||
byte prio;
|
||||
byte loop;
|
||||
byte volume;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user