[Scummvm-cvs-logs] SF.net SVN: scummvm:[46496] scummvm/trunk/engines/sci/sfx
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed Dec 23 14:29:06 CET 2009
Revision: 46496
http://scummvm.svn.sourceforge.net/scummvm/?rev=46496&view=rev
Author: thebluegr
Date: 2009-12-23 13:29:06 +0000 (Wed, 23 Dec 2009)
Log Message:
-----------
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
Modified Paths:
--------------
scummvm/trunk/engines/sci/sfx/music.cpp
scummvm/trunk/engines/sci/sfx/music.h
scummvm/trunk/engines/sci/sfx/soundcmd.cpp
Modified: scummvm/trunk/engines/sci/sfx/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/music.cpp 2009-12-23 12:49:38 UTC (rev 46495)
+++ scummvm/trunk/engines/sci/sfx/music.cpp 2009-12-23 13:29:06 UTC (rev 46496)
@@ -353,7 +353,6 @@
} 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 @@
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 @@
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 @@
_pSnd->loop--;
} else {
_pSnd->status = kStopped;
- _pSnd->signal = 0xFFFF;
+ PUT_SEL32V(segMan, _pSnd->soundObj, signal, 0xFFFF);
}
}
break;
Modified: scummvm/trunk/engines/sci/sfx/music.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/music.h 2009-12-23 12:49:38 UTC (rev 46495)
+++ scummvm/trunk/engines/sci/sfx/music.h 2009-12-23 13:29:06 UTC (rev 46496)
@@ -77,7 +77,6 @@
uint16 dataInc;
uint16 ticker;
- uint16 signal;
byte prio;
byte loop;
byte volume;
Modified: scummvm/trunk/engines/sci/sfx/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/soundcmd.cpp 2009-12-23 12:49:38 UTC (rev 46495)
+++ scummvm/trunk/engines/sci/sfx/soundcmd.cpp 2009-12-23 13:29:06 UTC (rev 46496)
@@ -293,7 +293,6 @@
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 @@
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 @@
cmdStopHandle(obj, value);
break;
default:
- PUT_SEL32V(_segMan, obj, signal, _music->_playList[slot]->signal);
break;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list