[Scummvm-cvs-logs] CVS: scummvm/bs2 resman.cpp,1.15,1.16 sound.cpp,1.11,1.12
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Sun Aug 31 11:10:03 CEST 2003
Update of /cvsroot/scummvm/scummvm/bs2
In directory sc8-pr-cvs1:/tmp/cvs-serv24193
Modified Files:
resman.cpp sound.cpp
Log Message:
Untested (because I don't have any savegames on this computer) support for
using music1.clu and music2.clu instead of music.clu
Index: resman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/resman.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- resman.cpp 23 Aug 2003 14:42:37 -0000 1.15
+++ resman.cpp 31 Aug 2003 18:09:21 -0000 1.16
@@ -345,6 +345,9 @@
GetCd(cdTab[parent_res_file] & 3); // Makes sure that the correct CD is in the drive.
}
*/
+
+ curCd = cdTab[parent_res_file] & 3;
+
//open the cluster file
if (file.open(resource_files[parent_res_file], g_sword2->getGameDataPath()) == false)
Con_fatal_error("Res_open cannot *OPEN* %s", resource_files[parent_res_file]);
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sound.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- sound.cpp 30 Aug 2003 18:06:07 -0000 1.11
+++ sound.cpp 31 Aug 2003 18:09:21 -0000 1.12
@@ -410,7 +410,20 @@
// add the appropriate file extension & play it
- sprintf(filename,"Music.clu");
+ if (g_sword2->_gameId == GID_SWORD2_DEMO)
+ // The demo I found didn't come with any music file, but you
+ // could use the music from the first CD of the complete game,
+ // I suppose...
+ strcpy(filename, "music.clu");
+ else {
+ File f;
+
+ sprintf(filename, "music%d.clu", res_man.WhichCd());
+ if (f.open(filename, g_sword2->getGameDataPath()))
+ f.close();
+ else
+ strcpy(filename, "music.clu");
+ }
rv = g_sword2->_sound->StreamCompMusic(filename, params[0], loopFlag);
More information about the Scummvm-git-logs
mailing list