aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Kołodziejski2008-01-21 22:06:14 +0000
committerPaweł Kołodziejski2008-01-21 22:06:14 +0000
commitfec313a1ac41d50f01a8532bc099052af337073c (patch)
tree2f411c296a684ef01d5cb44e43f93ed9a4f4d75f
parent2890816046a560c0c10000d46ffbc1bcfaabd204 (diff)
downloadscummvm-rg350-fec313a1ac41d50f01a8532bc099052af337073c.tar.gz
scummvm-rg350-fec313a1ac41d50f01a8532bc099052af337073c.tar.bz2
scummvm-rg350-fec313a1ac41d50f01a8532bc099052af337073c.zip
final fix for bug #1757010
svn-id: r30604
-rw-r--r--engines/scumm/imuse_digi/dimuse.cpp2
-rw-r--r--engines/scumm/imuse_digi/dimuse.h2
-rw-r--r--engines/scumm/imuse_digi/dimuse_music.cpp8
-rw-r--r--engines/scumm/imuse_digi/dimuse_script.cpp8
4 files changed, 11 insertions, 9 deletions
diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp
index db5ec9dafe..fa50eca604 100644
--- a/engines/scumm/imuse_digi/dimuse.cpp
+++ b/engines/scumm/imuse_digi/dimuse.cpp
@@ -97,7 +97,7 @@ void IMuseDigital::resetState() {
_curMusicCue = 0;
memset(_attributes, 0, sizeof(_attributes));
_nextSeqToPlay = 0;
- _stopingSequence = false;
+ _stopingSequence = 0;
_triggerUsed = false;
}
diff --git a/engines/scumm/imuse_digi/dimuse.h b/engines/scumm/imuse_digi/dimuse.h
index 9c0fa51e75..8cb6562bd3 100644
--- a/engines/scumm/imuse_digi/dimuse.h
+++ b/engines/scumm/imuse_digi/dimuse.h
@@ -84,7 +84,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;
+ int _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 f0e34ab115..238ba2c591 100644
--- a/engines/scumm/imuse_digi/dimuse_music.cpp
+++ b/engines/scumm/imuse_digi/dimuse_music.cpp
@@ -184,7 +184,7 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table
return;
}
if (table->transitionType == 4)
- _stopingSequence = true;
+ _stopingSequence = 1;
if ((!sequence) && (table->attribPos != 0) &&
(table->attribPos == _digStateMusicTable[_curMusicState].attribPos)) {
fadeOutMusicAndStartNew(108, table->filename, table->soundId);
@@ -194,7 +194,7 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table
}
break;
case 6:
- _stopingSequence = true;
+ _stopingSequence = 1;
break;
}
}
@@ -305,7 +305,7 @@ void IMuseDigital::playComiMusic(const char *songName, const imuseComiTable *tab
setHookIdForMusic(table->hookId);
break;
case 9:
- _stopingSequence = true;
+ _stopingSequence = 1;
setHookIdForMusic(table->hookId);
break;
case 2:
@@ -319,7 +319,7 @@ void IMuseDigital::playComiMusic(const char *songName, const imuseComiTable *tab
if (getCurMusicSoundId() == table->soundId)
return;
if (table->transitionType == 4)
- _stopingSequence = true;
+ _stopingSequence = 1;
if (table->transitionType == 2) {
fadeOutMusic(table->fadeOutDelay);
startMusic(table->filename, table->soundId, table->hookId, 127);
diff --git a/engines/scumm/imuse_digi/dimuse_script.cpp b/engines/scumm/imuse_digi/dimuse_script.cpp
index 2f70580c20..3f4bd5504a 100644
--- a/engines/scumm/imuse_digi/dimuse_script.cpp
+++ b/engines/scumm/imuse_digi/dimuse_script.cpp
@@ -210,9 +210,11 @@ void IMuseDigital::refreshScripts() {
if (_stopingSequence) {
debug(5, "refreshScripts() Force restore music state");
- // disabled that, it seems help for fix bug #1757010
- //parseScriptCmds(0x1001, 0, 0, 0, 0, 0, 0, 0);
- _stopingSequence = false;
+ // small delay, it seems help for fix bug #1757010
+ if (_stopingSequence++ > 120) {
+ parseScriptCmds(0x1001, 0, 0, 0, 0, 0, 0, 0);
+ _stopingSequence = 0;
+ }
}
bool found = false;