diff options
-rw-r--r-- | sword2/resman.cpp | 3 | ||||
-rw-r--r-- | sword2/sound.cpp | 15 |
2 files changed, 17 insertions, 1 deletions
diff --git a/sword2/resman.cpp b/sword2/resman.cpp index 9b3145739c..913e620b27 100644 --- a/sword2/resman.cpp +++ b/sword2/resman.cpp @@ -345,6 +345,9 @@ uint8 *resMan::Res_open( uint32 res ) //BHTony30May96 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]); diff --git a/sword2/sound.cpp b/sword2/sound.cpp index fae889a483..59ff147e09 100644 --- a/sword2/sound.cpp +++ b/sword2/sound.cpp @@ -410,7 +410,20 @@ int32 FN_play_music(int32 *params) // updated by James on 10apr97 // 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); |