[Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.48,1.49 scumm.h,1.126,1.127

Max Horn fingolfin at users.sourceforge.net
Wed Jan 8 15:42:10 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv4596

Modified Files:
	resource.cpp scumm.h 
Log Message:
our File class already makes sure we find stuff in the resource subdirectory. Plus, it handles different cases right. So now COMI works from CD on Mac OS X, too

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- resource.cpp	2 Jan 2003 10:36:17 -0000	1.48
+++ resource.cpp	8 Jan 2003 23:41:27 -0000	1.49
@@ -195,7 +195,7 @@
 	}
 
 	strcpy(buf, filename);
-	_fileHandle.open(buf, getResDataPath(), 1, _encbyte);
+	_fileHandle.open(buf, getGameDataPath(), 1, _encbyte);
 
 	return _fileHandle.isOpen();
 }
@@ -207,7 +207,7 @@
 	if (_features & GF_AFTER_V8) {
 		char result;
 
-		sprintf(buf, "Cannot find file: '%s'\nInsert disk %d into drive %s\nHit Ok to retry, Cancel to exit", filename, disknum, getResDataPath());
+		sprintf(buf, "Cannot find file: '%s'\nInsert disk %d into drive %s\nHit Ok to retry, Cancel to exit", filename, disknum, getGameDataPath());
 
 		result = displayError(true, buf);
 		if (result == 2)

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- scumm.h	2 Jan 2003 10:36:17 -0000	1.126
+++ scumm.h	8 Jan 2003 23:41:27 -0000	1.127
@@ -291,18 +291,7 @@
 	bool _insaneState;
 	bool _videoFinished;
 	
-	const char *getResDataPath() const { return _gameDataPath; }
-	const char *getGameDataPath() const {
-		if (_features & GF_AFTER_V8) {
-			static char resourcePath[256];
-			if (_gameDataPath[0] == '\0')
-				return "resource";
-
-			sprintf(resourcePath, "%sresource", _gameDataPath);
-			return resourcePath;
-		}
-		return _gameDataPath; 
-	}
+	const char *getGameDataPath() const { return _gameDataPath; }
 
 	void pauseGame(bool user);
 	void shutDown(int i);





More information about the Scummvm-git-logs mailing list