[Scummvm-cvs-logs] SF.net SVN: scummvm: [24797] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Thu Nov 30 14:13:35 CET 2006


Revision: 24797
          http://svn.sourceforge.net/scummvm/?rev=24797&view=rev
Author:   drmccoy
Date:     2006-11-30 05:13:35 -0800 (Thu, 30 Nov 2006)

Log Message:
-----------
The music in the Mac version of Gob1 seems to be selected randomly for each scene

Modified Paths:
--------------
    scummvm/trunk/engines/gob/music.cpp
    scummvm/trunk/engines/gob/music.h

Modified: scummvm/trunk/engines/gob/music.cpp
===================================================================
--- scummvm/trunk/engines/gob/music.cpp	2006-11-30 13:09:01 UTC (rev 24796)
+++ scummvm/trunk/engines/gob/music.cpp	2006-11-30 13:13:35 UTC (rev 24797)
@@ -28,6 +28,7 @@
 #include "gob/music.h"
 #include "gob/gob.h"
 #include "gob/game.h"
+#include "gob/util.h"
 
 namespace Gob {
 
@@ -56,14 +57,13 @@
 	{"avt022.tot", "zombie"}
 };
 
-const char *Music::_tracksToFiles[][2] = {
-	{"campagne", "Musmac2.adl"},
-	{"extsor1", "Musmac3.adl"},
-	{"interieure", "Musmac4.adl"},
-	{"mine", "Musmac5.adl"},
-	{"nuit", "Musmac6.adl"},
-	{"statue", "Musmac2.adl"},
-	{"zombie", "Musmac3.adl"}
+const char *Music::_trackFiles[] = {
+//	"musmac1.adl", // TODO: This track isn't played correctly at all yet
+	"musmac2.adl",
+	"musmac3.adl",
+	"musmac4.adl",
+	"musmac5.adl",
+	"musmac6.adl"
 };
 
 const unsigned char Music::_operators[] = {0, 1, 2, 8, 9, 10, 16, 17, 18};
@@ -445,12 +445,8 @@
 	
 	debugC(1, DEBUG_MUSIC, "Music::playTrack(%s)", trackname);
 	unloadMusic();
-	for (int i = 0; i < ARRAYSIZE(_tracksToFiles); i++)
-		if (!scumm_stricmp(trackname, _tracksToFiles[i][0])) {
-			loadMusic(_tracksToFiles[i][1]);
-			startPlay();
-			break;
-		}
+	loadMusic(_trackFiles[_vm->_util->getRandom(ARRAYSIZE(_trackFiles))]);
+	startPlay();
 }
 
 bool Music::loadMusic(const char *filename) {

Modified: scummvm/trunk/engines/gob/music.h
===================================================================
--- scummvm/trunk/engines/gob/music.h	2006-11-30 13:09:01 UTC (rev 24796)
+++ scummvm/trunk/engines/gob/music.h	2006-11-30 13:13:35 UTC (rev 24797)
@@ -65,7 +65,7 @@
 	
 protected:
 	static const char *_tracks[][2];
-	static const char *_tracksToFiles[][2];
+	static const char *_trackFiles[];
 	static const unsigned char _operators[];
 	static const unsigned char _volRegNums [];
 	FM_OPL *_opl;


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