aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-08-31 18:09:21 +0000
committerTorbjörn Andersson2003-08-31 18:09:21 +0000
commit54f5caedc5f93f6a7ae067f1fda08c2dedd79de1 (patch)
tree864a2eb5e4d061d5f059f5bb91cc5c0780410591 /sword2
parente60ee06e2d0a885cfc71fbb46a2b2fe564ba90b4 (diff)
downloadscummvm-rg350-54f5caedc5f93f6a7ae067f1fda08c2dedd79de1.tar.gz
scummvm-rg350-54f5caedc5f93f6a7ae067f1fda08c2dedd79de1.tar.bz2
scummvm-rg350-54f5caedc5f93f6a7ae067f1fda08c2dedd79de1.zip
Untested (because I don't have any savegames on this computer) support for
using music1.clu and music2.clu instead of music.clu svn-id: r9943
Diffstat (limited to 'sword2')
-rw-r--r--sword2/resman.cpp3
-rw-r--r--sword2/sound.cpp15
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);