aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/sequences_lok.cpp8
-rw-r--r--engines/kyra/sound_amiga.cpp23
2 files changed, 21 insertions, 10 deletions
diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp
index 5b41c3cef8..2f902aa1c5 100644
--- a/engines/kyra/sequences_lok.cpp
+++ b/engines/kyra/sequences_lok.cpp
@@ -994,6 +994,14 @@ int KyraEngine_LoK::seq_playEnd() {
snd_playWanderScoreViaMap(50, 1);
setupPanPages();
+ 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);
+ }
+
_finalA = createWSAMovie();
assert(_finalA);
_finalA->open("finala.wsa", 1, 0);
diff --git a/engines/kyra/sound_amiga.cpp b/engines/kyra/sound_amiga.cpp
index 87bdd443b6..db7a1bc8a0 100644
--- a/engines/kyra/sound_amiga.cpp
+++ b/engines/kyra/sound_amiga.cpp
@@ -205,10 +205,11 @@ void SoundAmiga::playSoundEffect(uint8 track) {
switch (_fileLoaded) {
case kFileFinal:
case kFileIntro:
- assert(track < 40);
-
- tableEntry = &_tableSfxIntro[track * 8];
- pan = (sfxTableGetPan(tableEntry) != 0);
+ // We only allow playing of sound effects, which are included in the table.
+ if (track < 40) {
+ tableEntry = &_tableSfxIntro[track * 8];
+ pan = (sfxTableGetPan(tableEntry) != 0);
+ }
break;
case kFileGame:
@@ -216,12 +217,14 @@ void SoundAmiga::playSoundEffect(uint8 track) {
if (0x61 <= track && track <= 0x63)
playTrack(track - 0x4F);
- assert(track < 120);
- // variable(0x1BFE4) && tableEffectsGame[track].note, which gets set for ingame and unset for finale
- // (and some function reverses its state)
- if (sfxTableGetNote(&_tableSfxGame[track * 8])) {
- tableEntry = &_tableSfxGame[track * 8];
- pan = (sfxTableGetPan(tableEntry) != 0) && (sfxTableGetPan(tableEntry) != 2);
+ // We only allow playing of sound effects, which are included in the table.
+ if (track < 120) {
+ // variable(0x1BFE4) && tableEffectsGame[track].note, which gets set for ingame and unset for finale
+ // (and some function reverses its state)
+ if (sfxTableGetNote(&_tableSfxGame[track * 8])) {
+ tableEntry = &_tableSfxGame[track * 8];
+ pan = (sfxTableGetPan(tableEntry) != 0) && (sfxTableGetPan(tableEntry) != 2);
+ }
}
break;
default: