[Scummvm-cvs-logs] scummvm master -> d9b0658165e3c4596a20a6d3984cf51569a0d2e4
m-kiewitz
m_kiewitz at users.sourceforge.net
Sun Sep 15 22:55:40 CEST 2013
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0367d40647 SCI: disable signals when resuming music, so that debugger will work properly for longbow intro
d9b0658165 Merge branch 'master' of github.com:scummvm/scummvm into ScummVM_master
Commit: 0367d40647128836c7ccecc1cd9e3682b871dbf8
https://github.com/scummvm/scummvm/commit/0367d40647128836c7ccecc1cd9e3682b871dbf8
Author: m-kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2013-09-15T13:14:35-07:00
Commit Message:
SCI: disable signals when resuming music, so that debugger will work properly for longbow intro
Changed paths:
engines/sci/sound/midiparser_sci.cpp
engines/sci/sound/music.cpp
engines/sci/sound/music.h
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp
index 9653d9cc..2570322 100644
--- a/engines/sci/sound/midiparser_sci.cpp
+++ b/engines/sci/sound/midiparser_sci.cpp
@@ -440,21 +440,21 @@ void MidiParser_SCI::sendToDriver(uint32 midi) {
}
void MidiParser_SCI::parseNextEvent(EventInfo &info) {
- // Set signal AFTER waiting for delta, otherwise we would set signal too soon resulting in all sorts of bugs
+ // 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;
+ _dataincAdd = false;
+ _pSnd->dataInc += _dataincToAdd;
+ _pSnd->signal = 0x7f + _pSnd->dataInc;
debugC(4, kDebugLevelSound, "datainc %04x", _dataincToAdd);
}
if (_signalSet) {
- _signalSet = false;
+ _signalSet = false;
_pSnd->setSignal(_signalToSet);
- debugC(4, kDebugLevelSound, "signal %04x", _signalToSet);
+ debugC(4, kDebugLevelSound, "signal %04x", _signalToSet);
}
if (_jumpToHoldTick) {
- _jumpToHoldTick = false;
+ _jumpToHoldTick = false;
jumpToTick(_loopTick, false, false);
}
@@ -497,8 +497,10 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
// immediately there.
if (_soundVersion <= SCI_VERSION_0_LATE ||
_position._playTick || info.delta) {
- _signalSet = true;
- _signalToSet = info.basic.param1;
+ if (!_pSnd->inFastForward) {
+ _signalSet = true;
+ _signalToSet = info.basic.param1;
+ }
}
} else {
_loopTick = _position._playTick + info.delta;
@@ -552,20 +554,22 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
}
break;
case kUpdateCue:
- _dataincAdd = true;
- switch (_soundVersion) {
- case SCI_VERSION_0_EARLY:
- case SCI_VERSION_0_LATE:
- _dataincToAdd = info.basic.param2;
- break;
- case SCI_VERSION_1_EARLY:
- case SCI_VERSION_1_LATE:
- case SCI_VERSION_2_1:
- _dataincToAdd = 1;
- break;
- default:
- error("unsupported _soundVersion");
- }
+ if (!_pSnd->inFastForward) {
+ _dataincAdd = true;
+ switch (_soundVersion) {
+ case SCI_VERSION_0_EARLY:
+ case SCI_VERSION_0_LATE:
+ _dataincToAdd = info.basic.param2;
+ break;
+ case SCI_VERSION_1_EARLY:
+ case SCI_VERSION_1_LATE:
+ case SCI_VERSION_2_1:
+ _dataincToAdd = 1;
+ break;
+ default:
+ error("unsupported _soundVersion");
+ }
+ }
break;
case kResetOnPause:
_resetOnPause = info.basic.param2;
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 913ba32..7fdcac2 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -519,9 +519,14 @@ void SciMusic::soundPlay(MusicEntry *pSnd) {
if (pSnd->status == kSoundStopped)
pSnd->pMidiParser->jumpToTick(0);
- else
+ else {
// Fast forward to the last position and perform associated events when loading
+ pSnd->inFastForward = true;
+ // we set this flag, so that the midiparser doesn't set any signals for scripts
+ // if we don't do this, at least accessing the debugger will reset previously set signals
pSnd->pMidiParser->jumpToTick(pSnd->ticker, true, true, true);
+ pSnd->inFastForward = false;
+ }
// Restore looping and hold
pSnd->loop = prevLoop;
@@ -760,6 +765,7 @@ MusicEntry::MusicEntry() {
resourceId = 0;
isQueued = false;
+ inFastForward = false;
dataInc = 0;
ticker = 0;
diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h
index 1f798c9..79de71d 100644
--- a/engines/sci/sound/music.h
+++ b/engines/sci/sound/music.h
@@ -65,6 +65,7 @@ public:
uint16 resourceId;
bool isQueued; // for SCI0 only!
+ bool inFastForward; // if we are currently fast-forwarding (disables any signals to scripts)
uint16 dataInc;
uint16 ticker;
Commit: d9b0658165e3c4596a20a6d3984cf51569a0d2e4
https://github.com/scummvm/scummvm/commit/d9b0658165e3c4596a20a6d3984cf51569a0d2e4
Author: m-kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2013-09-15T13:54:01-07:00
Commit Message:
Merge branch 'master' of github.com:scummvm/scummvm into ScummVM_master
Changed paths:
engines/fullpipe/constants.h
engines/fullpipe/fullpipe.cpp
engines/fullpipe/fullpipe.h
engines/fullpipe/input.cpp
engines/fullpipe/inventory.cpp
engines/fullpipe/inventory.h
engines/tsage/globals.cpp
engines/tsage/globals.h
engines/tsage/ringworld2/ringworld2_logic.cpp
engines/tsage/ringworld2/ringworld2_scenes2.cpp
engines/tsage/ringworld2/ringworld2_scenes2.h
More information about the Scummvm-git-logs
mailing list