[Scummvm-cvs-logs] SF.net SVN: scummvm:[43335] scummvm/branches/gsoc2009-mods
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Thu Aug 13 01:23:44 CEST 2009
Revision: 43335
http://scummvm.svn.sourceforge.net/scummvm/?rev=43335&view=rev
Author: lordhoto
Date: 2009-08-12 23:23:44 +0000 (Wed, 12 Aug 2009)
Log Message:
-----------
Enable music support in the finale of Kyrandia 1 Amiga.
Modified Paths:
--------------
scummvm/branches/gsoc2009-mods/README
scummvm/branches/gsoc2009-mods/engines/kyra/sequences_lok.cpp
scummvm/branches/gsoc2009-mods/engines/kyra/sound_amiga.cpp
Modified: scummvm/branches/gsoc2009-mods/README
===================================================================
--- scummvm/branches/gsoc2009-mods/README 2009-08-12 23:20:16 UTC (rev 43334)
+++ scummvm/branches/gsoc2009-mods/README 2009-08-12 23:23:44 UTC (rev 43335)
@@ -769,7 +769,7 @@
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.
Modified: scummvm/branches/gsoc2009-mods/engines/kyra/sequences_lok.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/kyra/sequences_lok.cpp 2009-08-12 23:20:16 UTC (rev 43334)
+++ scummvm/branches/gsoc2009-mods/engines/kyra/sequences_lok.cpp 2009-08-12 23:23:44 UTC (rev 43335)
@@ -994,6 +994,14 @@
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);
Modified: scummvm/branches/gsoc2009-mods/engines/kyra/sound_amiga.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/kyra/sound_amiga.cpp 2009-08-12 23:20:16 UTC (rev 43334)
+++ scummvm/branches/gsoc2009-mods/engines/kyra/sound_amiga.cpp 2009-08-12 23:23:44 UTC (rev 43335)
@@ -205,10 +205,11 @@
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 @@
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:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list