[Scummvm-cvs-logs] CVS: scummvm/queen resource.cpp,1.9,1.10 resource.h,1.10,1.11
Max Horn
fingolfin at users.sourceforge.net
Fri Oct 10 06:56:07 CEST 2003
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv26276/queen
Modified Files:
resource.cpp resource.h
Log Message:
some cleanup
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/resource.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- resource.cpp 10 Oct 2003 10:42:37 -0000 1.9
+++ resource.cpp 10 Oct 2003 13:55:06 -0000 1.10
@@ -43,14 +43,13 @@
{ "PE100", true, true, 0x000B40F5 }
};
-Resource::Resource(const char *datafilePath)
- : _resourceEntries(0), _resourceTable(NULL) {
+Resource::Resource(const Common::String &datafilePath)
+ : _resourceEntries(0), _resourceTable(NULL), _datafilePath(datafilePath) {
- _datafilePath = datafilePath;
_resourceFile = new File();
_resourceFile->open(dataFilename, _datafilePath);
if (_resourceFile->isOpen() == false)
- error("Could not open resource file '%s%s'", _datafilePath, dataFilename);
+ error("Could not open resource file '%s%s'", _datafilePath.c_str(), dataFilename);
_gameVersion = detectGameVersion(_resourceFile->size());
@@ -62,7 +61,7 @@
_resourceEntries = 1076;
_resourceTable = _resourceTablePEM10;
} else {
- error("Couldn't find tablefile '%s%s'", _datafilePath, tableFilename);
+ error("Couldn't find tablefile '%s%s'", _datafilePath.c_str(), tableFilename);
}
}
Index: resource.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/resource.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- resource.h 10 Oct 2003 10:42:37 -0000 1.10
+++ resource.h 10 Oct 2003 13:55:06 -0000 1.11
@@ -57,7 +57,7 @@
class Resource {
public:
- Resource(const char *datafilePath);
+ Resource(const Common::String &datafilePath);
~Resource(void);
uint8 *loadFile(const char *filename, uint32 skipBytes = 0);
bool exists(const char *filename);
@@ -66,7 +66,7 @@
protected:
File *_resourceFile;
- const char *_datafilePath;
+ const Common::String _datafilePath;
const GameVersion *_gameVersion;
uint32 _resourceEntries;
ResourceEntry *_resourceTable;
More information about the Scummvm-git-logs
mailing list