[Scummvm-cvs-logs] CVS: scummvm/simon res.cpp,1.12,1.13 simon.cpp,1.129,1.130

Travis Howell kirben at users.sourceforge.net
Fri Jan 3 02:38:10 CET 2003


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv575/simon

Modified Files:
	res.cpp simon.cpp 
Log Message:

Improve error message when data files are missing


Index: res.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/res.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- res.cpp	10 Dec 2002 09:50:22 -0000	1.12
+++ res.cpp	3 Jan 2003 10:36:13 -0000	1.13
@@ -110,7 +110,7 @@
 		in->open(filename2, _gameDataPath);
 		free(filename2);
 		if (in->isOpen() == false)
-			return false;
+			error("Can't open gamepc file '%s' or '%s.'", gss->gamepc_filename, gss->gamepc_filename);
 	}
 
 	num_inited_objects = allocGamePcVars(in);
@@ -132,7 +132,7 @@
 	if (in->isOpen() == false) {
 		in->open("TBLLIST.", _gameDataPath);
 		if (in->isOpen() == false)
-			return false;
+			error("Can't open table resources file 'TBLLIST' or 'TBLLIST.'");
 	}
 
 	file_size = in->size();
@@ -151,7 +151,7 @@
 	/* Read list of TEXT resources */
 	in->open("STRIPPED.TXT", _gameDataPath);
 	if (in->isOpen() == false)
-		return false;
+		error("Can't open text resources file 'STRIPPED.TXT'");
 
 	file_size = in->size();
 	_stripped_txt_mem = (byte *)malloc(file_size);

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- simon.cpp	3 Jan 2003 04:24:16 -0000	1.129
+++ simon.cpp	3 Jan 2003 10:36:13 -0000	1.130
@@ -638,7 +638,7 @@
 {
 	Item *first, *parent, *next;
 
-	/* cannot unlink item without parent */
+	/* can't unlink item without parent */
 	if (item->parent == 0)
 		return;
 
@@ -889,7 +889,7 @@
 	uint32 size;
 
 	if (fo.isOpen() == false)
-		error("loadTextFile: Cannot open '%s'", filename);
+		error("loadTextFile: Can't open '%s'", filename);
 
 	size = fo.size();
 
@@ -906,7 +906,7 @@
 	File *fo = new File();
 	fo->open(filename, _gameDataPath);
 	if (fo->isOpen() == false)
-		error("openTablesFile: Cannot open '%s'", filename);
+		error("openTablesFile: Can't open '%s'", filename);
 	return fo;
 }
 
@@ -1429,7 +1429,7 @@
 	uint size;
 
 	if (in.isOpen() == false)
-		error("Cannot open icon.dat");
+		error("Can't open icons file 'ICON.DAT'");
 
 	size = in.size();
 
@@ -4219,7 +4219,7 @@
 
 		in.open(buf, _gameDataPath);
 		if (in.isOpen() == false)
-			error("read_vga_from_datfile_1: cannot open %s", buf);
+			error("read_vga_from_datfile_1: can't open %s", buf);
 
 		size = in.size();
 
@@ -4247,7 +4247,7 @@
 
 		in.open(buf, _gameDataPath);
 		if (in.isOpen() == false)
-			error("read_vga_from_datfile_2: cannot open %s", buf);
+			error("read_vga_from_datfile_2: can't open %s", buf);
 
 		size = in.size();
 
@@ -4286,7 +4286,7 @@
 		_game_file->open(gss->gme_filename, _gameDataPath);
 
 		if (_game_file->isOpen() == false)
-			error("cannot open game file '%s'", gss->gme_filename);
+			error("Can't open game file '%s'", gss->gme_filename);
 
 		uint32 size = _game_file->readUint32LE();
 
@@ -4478,9 +4478,7 @@
 
 	_sound = new SimonSound(_game, gss, _gameDataPath, _mixer);
 
-	if (!loadGamePcFile(gss->gamepc_filename))
-		error("Error loading gamepc file '%s' (or one of the files it depends on)",
-					gss->gamepc_filename);
+	loadGamePcFile(gss->gamepc_filename);
 
 	addTimeEvent(0, 1);
 	openGameFile();
@@ -4839,7 +4837,7 @@
 			sprintf(buf, "MOD%d.MUS", music);
 			f->open(buf, _gameDataPath);
 			if (f->isOpen() == false) {
-				warning("Cannot load music from '%s'", buf);
+				warning("Can't load music from '%s'", buf);
 				return;
 			}
 			midi.read_all_songs_old(f, music);





More information about the Scummvm-git-logs mailing list