aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Kołodziejski2008-01-13 00:10:30 +0000
committerPaweł Kołodziejski2008-01-13 00:10:30 +0000
commit6b34fcc2b4f8933110d32c80eebb871bb398c91f (patch)
tree4cbeb8584b50312cf19fe8fa54247c684e1163f5
parentae9e25b30f07f414ef8d555c195e148e53c40d4f (diff)
downloadscummvm-rg350-6b34fcc2b4f8933110d32c80eebb871bb398c91f.tar.gz
scummvm-rg350-6b34fcc2b4f8933110d32c80eebb871bb398c91f.tar.bz2
scummvm-rg350-6b34fcc2b4f8933110d32c80eebb871bb398c91f.zip
added missing stoppingSequence to music transitions. still i'm not sure if it trigger properly in our imuse implementation
svn-id: r30463
-rw-r--r--engines/scumm/imuse_digi/dimuse.cpp1
-rw-r--r--engines/scumm/imuse_digi/dimuse.h1
-rw-r--r--engines/scumm/imuse_digi/dimuse_music.cpp7
-rw-r--r--engines/scumm/imuse_digi/dimuse_script.cpp6
4 files changed, 14 insertions, 1 deletions
diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp
index 3375d7fdfe..54908ee445 100644
--- a/engines/scumm/imuse_digi/dimuse.cpp
+++ b/engines/scumm/imuse_digi/dimuse.cpp
@@ -100,6 +100,7 @@ void IMuseDigital::resetState() {
_curMusicCue = 0;
memset(_attributes, 0, sizeof(_attributes));
_nextSeqToPlay = 0;
+ _stopingSequence = false;
}
void IMuseDigital::saveOrLoad(Serializer *ser) {
diff --git a/engines/scumm/imuse_digi/dimuse.h b/engines/scumm/imuse_digi/dimuse.h
index cc9a1ea981..372bfb7ab4 100644
--- a/engines/scumm/imuse_digi/dimuse.h
+++ b/engines/scumm/imuse_digi/dimuse.h
@@ -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);
diff --git a/engines/scumm/imuse_digi/dimuse_music.cpp b/engines/scumm/imuse_digi/dimuse_music.cpp
index e45f55e742..8003ea646e 100644
--- a/engines/scumm/imuse_digi/dimuse_music.cpp
+++ b/engines/scumm/imuse_digi/dimuse_music.cpp
@@ -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:
diff --git a/engines/scumm/imuse_digi/dimuse_script.cpp b/engines/scumm/imuse_digi/dimuse_script.cpp
index 91cc48c2bb..ba024eafcb 100644
--- a/engines/scumm/imuse_digi/dimuse_script.cpp
+++ b/engines/scumm/imuse_digi/dimuse_script.cpp
@@ -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];