aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2006-09-09 17:10:09 +0000
committerMax Horn2006-09-09 17:10:09 +0000
commitc7ab445755e94fd45192a3e2bcf3d0b2e704aed3 (patch)
treef042d99e9272b307cb2c7ef48b5c1cc143c85029
parentbf0b82326f27a9b4035aa0f2bc95241f68b929f3 (diff)
downloadscummvm-rg350-c7ab445755e94fd45192a3e2bcf3d0b2e704aed3.tar.gz
scummvm-rg350-c7ab445755e94fd45192a3e2bcf3d0b2e704aed3.tar.bz2
scummvm-rg350-c7ab445755e94fd45192a3e2bcf3d0b2e704aed3.zip
Get rid of fsnode hack
svn-id: r23852
-rw-r--r--engines/kyra/resource.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index 92c669bbb8..6aa17408e8 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -70,11 +70,11 @@ Resource::Resource(KyraEngine *engine) {
}
for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
- Common::String filename = file->path();
+ Common::String filename = file->name();
filename.toUppercase();
if (filename.hasSuffix("PAK") || filename.hasSuffix("APK")) {
- if (!loadPakFile(file->path())) {
- error("couldn't open pakfile '%s'", file->path().c_str());
+ if (!loadPakFile(file->name())) {
+ error("couldn't open pakfile '%s'", file->name().c_str());
}
}
}
@@ -102,19 +102,17 @@ bool Resource::loadPakFile(const Common::String &filename) {
}
PAKFile *file = 0;
- FilesystemNode *fsNode = new FilesystemNode(ConfMan.get("path") + filename);
if (handle.name() == filename) {
- file = new PAKFile(fsNode->name().c_str(), handle.name(), (_engine->features() & GF_AMIGA) != 0);
+ file = new PAKFile(filename.c_str(), handle.name(), (_engine->features() & GF_AMIGA) != 0);
} else {
uint32 offset = handle.pos();
uint8 *buf = new uint8[size];
handle.read(buf, size);
- file = new PAKFile(fsNode->name().c_str(), handle.name(), offset, buf, size, (_engine->features() & GF_AMIGA) != 0);
+ file = new PAKFile(filename.c_str(), handle.name(), offset, buf, size, (_engine->features() & GF_AMIGA) != 0);
delete [] buf;
}
handle.close();
- delete fsNode;
if (!file)
return false;