diff options
author | Paweł Kołodziejski | 2004-04-09 06:17:20 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2004-04-09 06:17:20 +0000 |
commit | c2e0647f6a2a17b4d1d8a41573aff9b6ddafe688 (patch) | |
tree | f05f2d3643be091d55923b97456b1a7130b20589 /scumm | |
parent | 5763122a69d7f33b93601a73c0add87576f2ce37 (diff) | |
download | scummvm-rg350-c2e0647f6a2a17b4d1d8a41573aff9b6ddafe688.tar.gz scummvm-rg350-c2e0647f6a2a17b4d1d8a41573aff9b6ddafe688.tar.bz2 scummvm-rg350-c2e0647f6a2a17b4d1d8a41573aff9b6ddafe688.zip |
-fix for dig demo
-handle some music opcodes without filename
svn-id: r13514
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/imuse_digi/dimuse_music.cpp | 24 | ||||
-rw-r--r-- | scumm/imuse_digi/dimuse_track.cpp | 6 |
2 files changed, 20 insertions, 10 deletions
diff --git a/scumm/imuse_digi/dimuse_music.cpp b/scumm/imuse_digi/dimuse_music.cpp index c424001cbf..8920c23b27 100644 --- a/scumm/imuse_digi/dimuse_music.cpp +++ b/scumm/imuse_digi/dimuse_music.cpp @@ -171,10 +171,6 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table fadeOutMusic(120); - if (table->filename[0] == 0) { - return; - } - switch(table->opcode) { case 0: case 5: @@ -182,6 +178,9 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table break; case 3: case 4: + if (table->filename[0] == 0) { + return; + } if ((!sequence) && (table->param != 0) && (table->param == _digStateMusicTable[_curMusicState].param)) { startMusic(table->filename, table->soundId, 0, 127); @@ -289,11 +288,6 @@ void IMuseDigital::playComiMusic(const char *songName, const imuseComiTable *tab } } - if (table->filename[0] == 0) { - fadeOutMusic(120); - return; - } - switch(table->opcode) { case 0: case 8: @@ -301,17 +295,29 @@ void IMuseDigital::playComiMusic(const char *songName, const imuseComiTable *tab fadeOutMusic(120); break; case 1: + if (table->filename[0] == 0) { + fadeOutMusic(120); + return; + } fadeOutMusic(120); startMusic(table->filename, table->soundId, 0, 1); setFade(table->soundId, 127, 120); break; case 2: + if (table->filename[0] == 0) { + fadeOutMusic(60); + return; + } fadeOutMusic(table->fadeOut60TicksDelay); startMusic(table->filename, table->soundId, table->hookId, 127); break; case 3: case 4: case 12: + if (table->filename[0] == 0) { + fadeOutMusic(60); + return; + } fadeOutMusic(table->fadeOut60TicksDelay); if ((!sequence) && (table->param != 0) && (table->param == _comiStateMusicTable[_curMusicState].param)) { diff --git a/scumm/imuse_digi/dimuse_track.cpp b/scumm/imuse_digi/dimuse_track.cpp index 36d3618af1..3541de5ddf 100644 --- a/scumm/imuse_digi/dimuse_track.cpp +++ b/scumm/imuse_digi/dimuse_track.cpp @@ -205,7 +205,11 @@ void IMuseDigital::setPan(int soundId, int pan) { void IMuseDigital::selectVolumeGroup(int soundId, int volGroupId) { Common::StackLock lock(_mutex, "IMuseDigital::setGroupVolume()"); debug(5, "IMuseDigital::setGroupVolume(%d, %d)", soundId, volGroupId); - assert((volGroupId >= 1) && (volGroupId <= 3)); + assert((volGroupId >= 1) && (volGroupId <= 4)); + + if (volGroupId == 4) + volGroupId = 3; + for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) { if ((_track[l].soundId == soundId) && _track[l].used) { _track[l].volGroupId = volGroupId; |