[Scummvm-cvs-logs] CVS: scummvm/sword1 resman.cpp,1.27,1.28 resman.h,1.13,1.14

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Mon Feb 21 00:16:22 CET 2005


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

Modified Files:
	resman.cpp resman.h 
Log Message:
Fixed warning.


Index: resman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/resman.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- resman.cpp	20 Feb 2005 18:53:30 -0000	1.27
+++ resman.cpp	21 Feb 2005 08:15:15 -0000	1.28
@@ -46,11 +46,11 @@
 
 #define MAX_PATH_LEN 260
 
-ResMan::ResMan(const char *resFile) {
+ResMan::ResMan(const char *fileName) {
 	_openCluStart = _openCluEnd = NULL;
 	_openClus = 0;
 	_memMan = new MemMan();
-	loadCluDescript(resFile);
+	loadCluDescript(fileName);
 }
 
 ResMan::~ResMan(void) {
@@ -79,51 +79,51 @@
 }
 
 void ResMan::loadCluDescript(const char *fileName) {
-	File resFile;
-	resFile.open(fileName);
+	File file;
+	file.open(fileName);
 
-	if (!resFile.isOpen()) {
+	if (!file.isOpen()) {
 		char msg[512];
 		sprintf(msg, "Couldn't open CLU description '%s'\n\nIf you are running from CD, please ensure you have read the ScummVM documentation regarding multi-cd games.", fileName);
 		guiFatalError(msg);
 	}
 
 	
-	_prj.noClu = resFile.readUint32LE();
+	_prj.noClu = file.readUint32LE();
 	_prj.clu = new Clu[_prj.noClu];
 	memset(_prj.clu, 0, _prj.noClu * sizeof(Clu));
 
 	uint32 *cluIndex = (uint32*)malloc(_prj.noClu * 4);
-	resFile.read(cluIndex, _prj.noClu * 4);
+	file.read(cluIndex, _prj.noClu * 4);
 
 	for (uint32 clusCnt = 0; clusCnt < _prj.noClu; clusCnt++)
 		if (cluIndex[clusCnt]) {
 			Clu *cluster = _prj.clu + clusCnt;
-			resFile.read(cluster->label, MAX_LABEL_SIZE);
+			file.read(cluster->label, MAX_LABEL_SIZE);
 
 			cluster->file = NULL;
-			cluster->noGrp = resFile.readUint32LE();
+			cluster->noGrp = file.readUint32LE();
 			cluster->grp = new Grp[cluster->noGrp];
 			memset(cluster->grp, 0, cluster->noGrp * sizeof(Grp));
 			cluster->refCount = 0;
 
 			uint32 *grpIndex = (uint32*)malloc(cluster->noGrp * 4);
-			resFile.read(grpIndex, cluster->noGrp * 4);
+			file.read(grpIndex, cluster->noGrp * 4);
 
 			for (uint32 grpCnt = 0; grpCnt < cluster->noGrp; grpCnt++)
 				if (grpIndex[grpCnt]) {
 					Grp *group = cluster->grp + grpCnt;
-					group->noRes = resFile.readUint32LE();
+					group->noRes = file.readUint32LE();
 					group->resHandle = new MemHandle[group->noRes];
 					group->offset = new uint32[group->noRes];
 					group->length = new uint32[group->noRes];
 					uint32 *resIdIdx = (uint32*)malloc(group->noRes * 4);
-					resFile.read(resIdIdx, group->noRes * 4);
+					file.read(resIdIdx, group->noRes * 4);
 
 					for (uint32 resCnt = 0; resCnt < group->noRes; resCnt++) {
 						if (resIdIdx[resCnt]) {
-							group->offset[resCnt] = resFile.readUint32LE();
-							group->length[resCnt] = resFile.readUint32LE();
+							group->offset[resCnt] = file.readUint32LE();
+							group->length[resCnt] = file.readUint32LE();
 							_memMan->initHandle(group->resHandle + resCnt);
 						} else {
 							group->offset[resCnt] = 0xFFFFFFFF;

Index: resman.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/resman.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- resman.h	20 Feb 2005 18:53:30 -0000	1.13
+++ resman.h	21 Feb 2005 08:15:15 -0000	1.14
@@ -54,7 +54,7 @@
 
 class ResMan {
 public:
-	ResMan(const char *resFile);
+	ResMan(const char *fileName);
 	~ResMan(void);
 	void flush(void);
 	void resClose(uint32 id);





More information about the Scummvm-git-logs mailing list