diff options
author | Paweł Kołodziejski | 2008-01-14 14:48:35 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2008-01-14 14:48:35 +0000 |
commit | 5870bebd6d4bf659c4a405b3a0be895ff42f93b0 (patch) | |
tree | 0cfe96d7754950d084ce3c6d3649371d78e874ab | |
parent | a6f8e5c89a41bf10b65251ed1ec97b36c99b7313 (diff) | |
download | scummvm-rg350-5870bebd6d4bf659c4a405b3a0be895ff42f93b0.tar.gz scummvm-rg350-5870bebd6d4bf659c4a405b3a0be895ff42f93b0.tar.bz2 scummvm-rg350-5870bebd6d4bf659c4a405b3a0be895ff42f93b0.zip |
fixed setting hookId for music, it doesn't worked before
svn-id: r30481
-rw-r--r-- | engines/scumm/imuse_digi/dimuse.h | 1 | ||||
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_music.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.cpp | 12 |
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; |