[Scummvm-cvs-logs] CVS: scummvm/simon res.cpp,1.10,1.11 sound.cpp,1.5,1.6
Oliver Kiehl
olki at users.sourceforge.net
Sun Dec 8 15:07:05 CET 2002
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv22149/simon
Modified Files:
res.cpp sound.cpp
Log Message:
now simon versions with trailing dots after filenames also load correctly
Index: res.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/res.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- res.cpp 10 Nov 2002 15:24:17 -0000 1.10
+++ res.cpp 8 Dec 2002 23:06:11 -0000 1.11
@@ -102,8 +102,14 @@
/* read main gamepc file */
in->open(filename, _gameDataPath);
- if (in->isOpen() == false)
- return false;
+ if (in->isOpen() == false) {
+ char filename2[strlen(filename) + 1];
+ strcpy(filename2, filename);
+ strcat(filename2, ".");
+ in->open(filename2, _gameDataPath);
+ if (in->isOpen() == false)
+ return false;
+ }
num_inited_objects = allocGamePcVars(in);
@@ -121,8 +127,11 @@
/* Read list of TABLE resources */
in->open("TBLLIST", _gameDataPath);
- if (in->isOpen() == false)
- return false;
+ if (in->isOpen() == false) {
+ in->open("TBLLIST.", _gameDataPath);
+ if (in->isOpen() == false)
+ return false;
+ }
file_size = in->size();
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- sound.cpp 8 Dec 2002 01:30:19 -0000 1.5
+++ sound.cpp 8 Dec 2002 23:06:11 -0000 1.6
@@ -94,9 +94,15 @@
file->open(filename, gameDataPath);
if (file->isOpen() == false) {
- if (atoi(filename + 6) != 1 && atoi(filename + 6) != 30)
- warning("readSfxFile: Cannot load sfx file %s", filename);
- return;
+ char filename2[strlen(filename) + 1];
+ strcpy(filename2, filename);
+ strcat(filename2, ".");
+ file->open(filename2, gameDataPath);
+ if (file->isOpen() == false) {
+ if (atoi(filename + 6) != 1 && atoi(filename + 6) != 30)
+ warning("readSfxFile: Cannot load sfx file %s", filename);
+ return;
+ }
}
_effects = new WavSound(_mixer, file);
More information about the Scummvm-git-logs
mailing list