diff options
-rw-r--r-- | engines/kyra/sequences_lok.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/sound_amiga.cpp | 28 |
2 files changed, 17 insertions, 17 deletions
diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp index 2f902aa1c5..83b4dd9af4 100644 --- a/engines/kyra/sequences_lok.cpp +++ b/engines/kyra/sequences_lok.cpp @@ -997,9 +997,9 @@ int KyraEngine_LoK::seq_playEnd() { if (_flags.platform == Common::kPlatformAmiga) { _sound->loadSoundFile(kMusicFinale); - // The original used 0 here. Due to how our Sound code - // is implemented we need to use track 10 here though. - _sound->playTrack(10); + // The original started song 0 directly here. Since our player + // uses 0, 1 for stop and fade we start song 0 with 2 + _sound->playTrack(2); } _finalA = createWSAMovie(); diff --git a/engines/kyra/sound_amiga.cpp b/engines/kyra/sound_amiga.cpp index 6602759b33..0b64e67525 100644 --- a/engines/kyra/sound_amiga.cpp +++ b/engines/kyra/sound_amiga.cpp @@ -120,13 +120,14 @@ void SoundAmiga::loadSoundFile(uint file) { void SoundAmiga::playTrack(uint8 track) { debugC(5, kDebugLevelSound, "SoundAmiga::playTrack(%d)", track); - static const byte tempoIntro[6] = { 0x46, 0x55, 0x3C, 0x41, 0x78, 0x50 }; - static const byte tempoIngame[23] = { + static const byte tempoIntro[] = { 0x46, 0x55, 0x3C, 0x41 }; + static const byte tempoFinal[] = { 0x78, 0x50 }; + static const byte tempoIngame[] = { 0x64, 0x64, 0x64, 0x64, 0x64, 0x73, 0x4B, 0x64, 0x64, 0x64, 0x55, 0x9C, 0x6E, 0x91, 0x78, 0x84, 0x32, 0x64, 0x64, 0x6E, 0x3C, 0xD8, 0xAF }; - static const byte loopIngame[23] = { + static const byte loopIngame[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00 @@ -139,17 +140,6 @@ void SoundAmiga::playTrack(uint8 track) { switch (_fileLoaded) { - case kFileFinal: - // score 0 gets started immediately after loading the music-files with different tempo. - // we need to define a track-value for the fake call of this function - if (track == 10) { - score = 0; - loop = true; - tempo = 0x78; - break; - } - // if this is not the hardcoded start of the song then - // Fallthrough case kFileIntro: if (track >= 2 && track < ARRAYSIZE(tempoIntro) + 2) { score = track - 2; @@ -165,6 +155,16 @@ void SoundAmiga::playTrack(uint8 track) { } break; + case kFileFinal: + // score 0 gets started immediately after loading the music-files with different tempo. + // we need to define a track-value for the fake call of this function + if (track >= 2 && track < ARRAYSIZE(tempoFinal) + 2) { + score = track - 2; + loop = true; + tempo = tempoFinal[score]; + } + break; + default: return; } |