aboutsummaryrefslogtreecommitdiff
path: root/queen
diff options
context:
space:
mode:
authorMax Horn2003-10-10 13:55:08 +0000
committerMax Horn2003-10-10 13:55:08 +0000
commit5301edc38306c27143f38d74085e6c095688f6aa (patch)
tree101c5188d06ac1f476edae9f3a5755e48554dc64 /queen
parent1f9497cb1fbfcc8c3ffd412ce450144983b2452d (diff)
downloadscummvm-rg350-5301edc38306c27143f38d74085e6c095688f6aa.tar.gz
scummvm-rg350-5301edc38306c27143f38d74085e6c095688f6aa.tar.bz2
scummvm-rg350-5301edc38306c27143f38d74085e6c095688f6aa.zip
some cleanup
svn-id: r10720
Diffstat (limited to 'queen')
-rw-r--r--queen/resource.cpp9
-rw-r--r--queen/resource.h4
2 files changed, 6 insertions, 7 deletions
diff --git a/queen/resource.cpp b/queen/resource.cpp
index bb8bac391c..61a1e55e13 100644
--- a/queen/resource.cpp
+++ b/queen/resource.cpp
@@ -43,14 +43,13 @@ const GameVersion Resource::_gameVersions[] = {
{ "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 @@ Resource::Resource(const char *datafilePath)
_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);
}
}
diff --git a/queen/resource.h b/queen/resource.h
index 744ed8c3bf..bfc808f5d6 100644
--- a/queen/resource.h
+++ b/queen/resource.h
@@ -57,7 +57,7 @@ struct GameVersion {
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 @@ public:
protected:
File *_resourceFile;
- const char *_datafilePath;
+ const Common::String _datafilePath;
const GameVersion *_gameVersion;
uint32 _resourceEntries;
ResourceEntry *_resourceTable;