diff options
author | Martin Kiewitz | 2010-01-21 22:33:35 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-21 22:33:35 +0000 |
commit | c8e2b0f9674f4949b61f5dbeff931f7cc6328d2f (patch) | |
tree | f73a423e8387394712840e7618743379b0436364 /engines/sci | |
parent | c46c42ceb0f6b847d156d90d182bf0a808ab38dd (diff) | |
download | scummvm-rg350-c8e2b0f9674f4949b61f5dbeff931f7cc6328d2f.tar.gz scummvm-rg350-c8e2b0f9674f4949b61f5dbeff931f7cc6328d2f.tar.bz2 scummvm-rg350-c8e2b0f9674f4949b61f5dbeff931f7cc6328d2f.zip |
SCI: fixing iceman intro again (dont set datainc immediately but after delta)
svn-id: r47424
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/sound/midiparser_sci.cpp | 15 | ||||
-rw-r--r-- | engines/sci/sound/midiparser_sci.h | 2 |
2 files changed, 13 insertions, 4 deletions
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index 93586fbab6..69e9c61a62 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -55,6 +55,8 @@ MidiParser_SCI::MidiParser_SCI(SciVersion soundVersion) : _signalSet = false; _signalToSet = 0; + _dataincAdd = false; + _dataincToAdd = 0; _channelsUsed = 0; } @@ -118,6 +120,12 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { _channelsUsed |= (1 << info.channel()); // Set signal AFTER waiting for delta, otherwise we would set signal too soon resulting in all sorts of bugs + if (_dataincAdd) { + _dataincAdd = false; + _pSnd->dataInc += _dataincToAdd; + _pSnd->signal = 0x7f + _pSnd->dataInc; + debugC(2, kDebugLevelSound, "datainc %04x", _dataincToAdd); + } if (_signalSet) { _signalSet = false; _pSnd->signal = _signalToSet; @@ -178,16 +186,15 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { jumpToTick(_loopTick, false, false); break; case kUpdateCue: + _dataincAdd = true; switch (_soundVersion) { case SCI_VERSION_0_EARLY: case SCI_VERSION_0_LATE: - _pSnd->dataInc += info.basic.param2; - _signalSet = true; - _signalToSet = 0x7f + _pSnd->dataInc; + _dataincToAdd = info.basic.param2; break; case SCI_VERSION_1_EARLY: case SCI_VERSION_1_LATE: - _pSnd->dataInc++; + _dataincToAdd = 1; break; default: break; diff --git a/engines/sci/sound/midiparser_sci.h b/engines/sci/sound/midiparser_sci.h index cc97466e37..19d3a3c888 100644 --- a/engines/sci/sound/midiparser_sci.h +++ b/engines/sci/sound/midiparser_sci.h @@ -84,6 +84,8 @@ protected: bool _signalSet; int16 _signalToSet; + bool _dataincAdd; + int16 _dataincToAdd; // A 16-bit mask, containing the channels used // by the currently parsed song |