aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/sfx/soundcmd.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/sci/sfx/soundcmd.cpp b/engines/sci/sfx/soundcmd.cpp
index 553e6e4915..27a624537b 100644
--- a/engines/sci/sfx/soundcmd.cpp
+++ b/engines/sci/sfx/soundcmd.cpp
@@ -736,11 +736,13 @@ void SoundCommandParser::cmdUpdateCues(reg_t obj, int16 value) {
}
uint16 signal = GET_SEL32V(_segMan, obj, signal);
+ uint16 dataInc = _music->_playList[slot]->dataInc;
+
switch (signal) {
case 0:
- if (_music->_playList[slot]->dataInc != GET_SEL32V(_segMan, obj, dataInc)) {
- PUT_SEL32V(_segMan, obj, dataInc, _music->_playList[slot]->dataInc);
- PUT_SEL32V(_segMan, obj, signal, _music->_playList[slot]->dataInc + 127);
+ if (dataInc != GET_SEL32V(_segMan, obj, dataInc)) {
+ PUT_SEL32V(_segMan, obj, dataInc, dataInc);
+ PUT_SEL32V(_segMan, obj, signal, dataInc + 127);
}
break;
case 0xFFFF: