[Scummvm-cvs-logs] SF.net SVN: scummvm:[43364] scummvm/branches/gsoc2009-mods/engines/kyra

nolange at users.sourceforge.net nolange at users.sourceforge.net
Fri Aug 14 15:15:40 CEST 2009


Revision: 43364
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43364&view=rev
Author:   nolange
Date:     2009-08-14 13:15:40 +0000 (Fri, 14 Aug 2009)

Log Message:
-----------
changed handling of finale - music should use right tempo now

Modified Paths:
--------------
    scummvm/branches/gsoc2009-mods/engines/kyra/sequences_lok.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/sound_amiga.cpp

Modified: scummvm/branches/gsoc2009-mods/engines/kyra/sequences_lok.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/kyra/sequences_lok.cpp	2009-08-14 08:11:18 UTC (rev 43363)
+++ scummvm/branches/gsoc2009-mods/engines/kyra/sequences_lok.cpp	2009-08-14 13:15:40 UTC (rev 43364)
@@ -997,9 +997,9 @@
 		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();

Modified: scummvm/branches/gsoc2009-mods/engines/kyra/sound_amiga.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/engines/kyra/sound_amiga.cpp	2009-08-14 08:11:18 UTC (rev 43363)
+++ scummvm/branches/gsoc2009-mods/engines/kyra/sound_amiga.cpp	2009-08-14 13:15:40 UTC (rev 43364)
@@ -120,13 +120,14 @@
 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 @@
 
 
 	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 @@
 		}
 		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;
 	}


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