[Scummvm-cvs-logs] CVS: scummvm/gob dataio.cpp,1.7,1.8 dataio.h,1.5,1.6 global.cpp,1.5,1.6 global.h,1.4,1.5 gob.cpp,1.13,1.14 inter.cpp,1.18,1.19

Max Horn fingolfin at users.sourceforge.net
Tue May 10 16:00:24 CEST 2005


Update of /cvsroot/scummvm/scummvm/gob
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17315/gob

Modified Files:
	dataio.cpp dataio.h global.cpp global.h gob.cpp inter.cpp 
Log Message:
Moved class File and the MD5 stuff to namespace Common

Index: dataio.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/dataio.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- dataio.cpp	3 May 2005 08:37:03 -0000	1.7
+++ dataio.cpp	10 May 2005 22:55:47 -0000	1.8
@@ -30,7 +30,7 @@
 	return filesHandles[handle].write(buf, size);
 }
 
-int16 file_open(const char *path, File::AccessMode mode) {
+int16 file_open(const char *path, Common::File::AccessMode mode) {
 	int16 i;
 
 	for (i = 0; i < MAX_FILES; i++) {
@@ -48,7 +48,7 @@
 	return -1;
 }
 
-File *file_getHandle(int16 handle) {
+Common::File *file_getHandle(int16 handle) {
 	return &filesHandles[handle];
 }
 
@@ -284,10 +284,10 @@
 		file_getHandle(handle)->close();
 }
 
-int16 data_openData(const char *path, File::AccessMode mode) {
+int16 data_openData(const char *path, Common::File::AccessMode mode) {
 	int16 handle;
 
-	if (mode != File::kFileReadMode)
+	if (mode != Common::File::kFileReadMode)
 		return file_open(path, mode);
 
 	handle = data_getChunk(path);
@@ -320,7 +320,7 @@
 int32 data_getDataSize(const char *name) {
 	char buf[128];
 	int32 chunkSz;
-	File file;
+	Common::File file;
 
 	strcpy(buf, name);
 	chunkSz = data_getChunkSize(buf);

Index: dataio.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/dataio.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- dataio.h	3 May 2005 08:37:04 -0000	1.5
+++ dataio.h	10 May 2005 22:55:47 -0000	1.6
@@ -36,8 +36,8 @@
 	byte packed;
 };
 
-int16 file_open(const char *path, File::AccessMode mode = File::kFileReadMode);
-File *file_getHandle(int16 handle);
+int16 file_open(const char *path, Common::File::AccessMode mode = Common::File::kFileReadMode);
+Common::File *file_getHandle(int16 handle);
 int16 data_getChunk(const char *chunkName);
 char data_freeChunk(int16 handle);
 int32 data_readChunk(int16 handle, char *buf, int16 size);
@@ -47,7 +47,7 @@
 void data_closeDataFile(void);
 char *data_getUnpackedData(const char *name);
 void data_closeData(int16 handle);
-int16 data_openData(const char *path, File::AccessMode mode = File::kFileReadMode);
+int16 data_openData(const char *path, Common::File::AccessMode mode = Common::File::kFileReadMode);
 int32 data_readData(int16 handle, char *buf, int16 size);
 void data_seekData(int16 handle, int32 pos, int16 from);
 int32 data_getDataSize(const char *name);

Index: global.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/global.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- global.cpp	13 Apr 2005 22:32:59 -0000	1.5
+++ global.cpp	10 May 2005 22:55:47 -0000	1.6
@@ -92,7 +92,7 @@
 
 /* Files */
 int16 filesCount = 0;
-File filesHandles[MAX_FILES];
+Common::File filesHandles[MAX_FILES];
 
 /* Data files */
 struct ChunkDesc *dataFiles[MAX_DATA_FILES];

Index: global.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/global.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- global.h	9 Apr 2005 19:19:53 -0000	1.4
+++ global.h	10 May 2005 22:55:47 -0000	1.5
@@ -116,7 +116,7 @@
 #define MAX_FILES	30
 
 extern int16 filesCount;
-extern File filesHandles[MAX_FILES];
+extern Common::File filesHandles[MAX_FILES];
 
 /* Data files */
 extern struct ChunkDesc *dataFiles[MAX_DATA_FILES];

Index: gob.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/gob.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- gob.cpp	9 May 2005 13:29:04 -0000	1.13
+++ gob.cpp	10 May 2005 22:55:47 -0000	1.14
@@ -97,7 +97,7 @@
 	uint8 md5sum[16];
 	char md5str[32 + 1];
 
-	if (md5_file(file->path().c_str(), md5sum, NULL, kMD5FileSizeLimit)) {
+	if (Common::md5_file(file->path().c_str(), md5sum, NULL, kMD5FileSizeLimit)) {
 		for (int i = 0; i < 16; i++) {
 			sprintf(md5str + i * 2, "%02x", (int)md5sum[i]);
 		}

Index: inter.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gob/inter.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- inter.cpp	6 May 2005 15:59:33 -0000	1.18
+++ inter.cpp	10 May 2005 22:55:47 -0000	1.19
@@ -489,7 +489,7 @@
 	offset = parse_parseValExpr();
 
 	WRITE_VAR(1, 1);
-	handle = data_openData(inter_resStr, File::kFileWriteMode);
+	handle = data_openData(inter_resStr, Common::File::kFileWriteMode);
 
 	if (handle < 0)
 		return;





More information about the Scummvm-git-logs mailing list