Enable music support in the finale of Kyrandia 1 Amiga.

svn-id: r43335
This commit is contained in:
Johannes Schickel 2009-08-12 23:23:44 +00:00
parent cbc0b9e480
commit 0a17555e73
3 changed files with 22 additions and 11 deletions

2
README
View file

@ -769,7 +769,7 @@ site, please see the section on reporting bugs.
original game.
The Legend of Kyrandia:
- No music or sound effects in the Amiga and Macintosh floppy versions.
- No music or sound effects in the Macintosh floppy versions.
- Macintosh CD is using included DOS music and sound effects.
- PC-9821 version lacks support for sound effects.

View file

@ -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);

View file

@ -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: