added missing stoppingSequence to music transitions. still i'm not sure if it trigger properly in our imuse implementation

svn-id: r30463
This commit is contained in:
Paweł Kołodziejski 2008-01-13 00:10:30 +00:00
parent ae9e25b30f
commit 6b34fcc2b4
4 changed files with 14 additions and 1 deletions

View File

@ -100,6 +100,7 @@ void IMuseDigital::resetState() {
_curMusicCue = 0;
memset(_attributes, 0, sizeof(_attributes));
_nextSeqToPlay = 0;
_stopingSequence = false;
}
void IMuseDigital::saveOrLoad(Serializer *ser) {

View File

@ -134,6 +134,7 @@ private:
int32 _curMusicState; // current or previous id of music
int32 _curMusicSeq; // current or previous id of sequence music
int32 _curMusicCue; // current cue for current music. used in FT
bool _stopingSequence;
int32 makeMixerFlags(int32 flags);
static void timer_handler(void *refConf);

View File

@ -172,7 +172,6 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table
switch (table->transitionType) {
case 0:
case 5:
case 6:
break;
case 3:
case 4:
@ -186,6 +185,9 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table
startMusic(table->filename, table->soundId, hookId, 127);
}
break;
case 6:
_stopingSequence = true;
break;
}
}
@ -288,7 +290,10 @@ void IMuseDigital::playComiMusic(const char *songName, const imuseComiTable *tab
fadeOutMusic(120);
break;
case 8:
setHookId(table->soundId, table->hookId);
break;
case 9:
_stopingSequence = true;
setHookId(table->soundId, table->hookId);
break;
case 1:

View File

@ -200,6 +200,12 @@ void IMuseDigital::flushTracks() {
void IMuseDigital::refreshScripts() {
Common::StackLock lock(_mutex, "IMuseDigital::refreshScripts()");
debug(5, "refreshScripts()");
if (_stopingSequence) {
parseScriptCmds(0x1001, 0, 0, 0, 0, 0, 0, 0);
_stopingSequence = false;
}
bool found = false;
for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) {
Track *track = _track[l];