aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOystein Eftevaag2006-08-28 18:43:35 +0000
committerOystein Eftevaag2006-08-28 18:43:35 +0000
commit610547acac60b84d155665c5003617903dc0b57d (patch)
tree071863f90786312702de4c8f8e88ac5fcbc1a256
parent7c99b54b4e275e376b60231087375cd260fa4cd0 (diff)
downloadscummvm-rg350-610547acac60b84d155665c5003617903dc0b57d.tar.gz
scummvm-rg350-610547acac60b84d155665c5003617903dc0b57d.tar.bz2
scummvm-rg350-610547acac60b84d155665c5003617903dc0b57d.zip
Makes sure FilesystemNode::name isn't used to open a file, use a regular filehandle name instead.
svn-id: r23800
-rw-r--r--engines/kyra/resource.cpp6
-rw-r--r--engines/kyra/resource.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index e6976d3f77..80f2289c70 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -105,7 +105,7 @@ bool Resource::loadPakFile(const Common::String &filename) {
PAKFile *file = 0;
if (handle.name() == filename) {
- file = new PAKFile(fsNode->name().c_str(), (_engine->features() & GF_AMIGA) != 0);
+ file = new PAKFile(fsNode->name().c_str(), handle.name(), (_engine->features() & GF_AMIGA) != 0);
} else {
uint32 offset = handle.pos();
uint8 *buf = new uint8[size];
@@ -252,7 +252,7 @@ bool Resource::loadFileToBuf(const char *file, void *buf, uint32 maxSize) {
///////////////////////////////////////////
// Pak file manager
#define PAKFile_Iterate Common::List<PakChunk>::iterator start=_files.begin();start != _files.end(); ++start
-PAKFile::PAKFile(const char *file, bool isAmiga) : ResourceFile() {
+PAKFile::PAKFile(const char *file, const char *physfile, bool isAmiga) : ResourceFile() {
_isAmiga = isAmiga;
Common::File pakfile;
@@ -316,7 +316,7 @@ PAKFile::PAKFile(const char *file, bool isAmiga) : ResourceFile() {
delete [] buffer;
_filename = file;
- _physfile = "";
+ _physfile = physfile;
}
PAKFile::PAKFile(const char *file, const char *physfile, const uint32 off, const uint8 *buffer, uint32 filesize, bool isAmiga) : ResourceFile() {
diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h
index 23bcd7ea32..49631c282e 100644
--- a/engines/kyra/resource.h
+++ b/engines/kyra/resource.h
@@ -60,7 +60,7 @@ class PAKFile : public ResourceFile {
};
public:
- PAKFile(const char *file, bool isAmiga = false);
+ PAKFile(const char *file, const char *physfile, bool isAmiga = false);
PAKFile(const char *file, const char *physfile, const uint32 off, const uint8 *buf, uint32 size, bool isAmiga = false);
~PAKFile();