[Scummvm-cvs-logs] CVS: scummvm/sword1 sword1.cpp,1.54,1.55
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Wed Oct 13 23:38:03 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.304,2.305 script_v100he.cpp,2.17,2.18 script_v72he.cpp,2.172,2.173 script_v7he.cpp,2.107,2.108 script_v80he.cpp,2.58,2.59 script_v90he.cpp,2.95,2.96
- Next message: [Scummvm-cvs-logs] CVS: scummvm README,1.285,1.286
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1249
Modified Files:
sword1.cpp
Log Message:
The checkCdFiles() function still looked only for SPEECH1.CLU and
SPEECH2.CLU. Now it also looks for the corresponding CL3 and CLV files.
Index: sword1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sword1.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- sword1.cpp 12 Oct 2004 15:50:00 -0000 1.54
+++ sword1.cpp 14 Oct 2004 06:36:05 -0000 1.55
@@ -1070,20 +1070,37 @@
}
void SwordEngine::checkCdFiles(void) { // check if we're running from cd, hdd or what...
+ const char *speechFiles[] = {
+#ifdef USE_MAD
+ "SPEECH%d.CL3",
+#endif
+#ifdef USE_VORBIS
+ "SPEECH%d.CLV",
+#endif
+ "SPEECH%d.CLU"
+ };
+ int numFiles = 0;
File test;
_systemVars.playSpeech = true;
- if (test.open("SPEECH1.CLU")) {
- test.close();
- if (test.open("SPEECH2.CLU")) {
- // both files exist, assume running from HDD and everything's fine.
- test.close();
- _systemVars.runningFromCd = false;
- _systemVars.playSpeech = true;
- return ;
- } else {
+
+ for (int i = 1; i <= 2; i++) {
+ for (int j = 0; j < ARRAYSIZE(speechFiles); j++) {
+ char fileName[12];
+ sprintf(fileName, speechFiles[j], i);
+ if (test.open(fileName)) {
+ test.close();
+ numFiles++;
+ break;
+ }
}
- } else { // speech1.clu & speech2.clu not present. are we running from cd?
+ }
+
+ if (numFiles == 2) {
+ // both files exist, assume running from HDD and everything's fine.
+ _systemVars.runningFromCd = false;
+ _systemVars.playSpeech = true;
+ } else { // speech1 & speech2 not present. are we running from cd?
if (test.open("cd1.id")) {
_systemVars.runningFromCd = true;
_systemVars.currentCD = 1;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.304,2.305 script_v100he.cpp,2.17,2.18 script_v72he.cpp,2.172,2.173 script_v7he.cpp,2.107,2.108 script_v80he.cpp,2.58,2.59 script_v90he.cpp,2.95,2.96
- Next message: [Scummvm-cvs-logs] CVS: scummvm README,1.285,1.286
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list