aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/imuse_digi/dimuse.h1
-rw-r--r--engines/scumm/imuse_digi/dimuse_music.cpp4
-rw-r--r--engines/scumm/imuse_digi/dimuse_track.cpp12
3 files changed, 15 insertions, 2 deletions
diff --git a/engines/scumm/imuse_digi/dimuse.h b/engines/scumm/imuse_digi/dimuse.h
index 372bfb7ab4..6abdb80cf7 100644
--- a/engines/scumm/imuse_digi/dimuse.h
+++ b/engines/scumm/imuse_digi/dimuse.h
@@ -149,6 +149,7 @@ private:
int getSoundIdByName(const char *soundName);
void fadeOutMusic(int fadeDelay);
+ void setHookIdForMusic(int hookId);
Track *cloneToFadeOutTrack(Track *track, int fadeDelay);
void setFtMusicState(int stateId);
diff --git a/engines/scumm/imuse_digi/dimuse_music.cpp b/engines/scumm/imuse_digi/dimuse_music.cpp
index 9efb86971f..db33f4a355 100644
--- a/engines/scumm/imuse_digi/dimuse_music.cpp
+++ b/engines/scumm/imuse_digi/dimuse_music.cpp
@@ -298,11 +298,11 @@ void IMuseDigital::playComiMusic(const char *songName, const imuseComiTable *tab
case 0:
break;
case 8:
- setHookId(table->soundId, table->hookId);
+ setHookIdForMusic(table->hookId);
break;
case 9:
_stopingSequence = true;
- setHookId(table->soundId, table->hookId);
+ setHookIdForMusic(table->hookId);
break;
case 2:
if (table->filename[0] == 0) {
diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp
index b2037d83fc..7421244662 100644
--- a/engines/scumm/imuse_digi/dimuse_track.cpp
+++ b/engines/scumm/imuse_digi/dimuse_track.cpp
@@ -280,6 +280,18 @@ void IMuseDigital::fadeOutMusic(int fadeDelay) {
}
}
+void IMuseDigital::setHookIdForMusic(int hookId) {
+ Common::StackLock lock(_mutex, "IMuseDigital::setHookIdForMusic()");
+ debug(5, "IMuseDigital::setHookIdForMusic");
+
+ for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) {
+ Track *track = _track[l];
+ if (track->used && !track->toBeRemoved && (track->volGroupId == IMUSE_VOLGRP_MUSIC)) {
+ track->curHookId = hookId;
+ }
+ }
+}
+
IMuseDigital::Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDelay) {
assert(track);
Track *fadeTrack = 0;