From 610547acac60b84d155665c5003617903dc0b57d Mon Sep 17 00:00:00 2001 From: Oystein Eftevaag Date: Mon, 28 Aug 2006 18:43:35 +0000 Subject: Makes sure FilesystemNode::name isn't used to open a file, use a regular filehandle name instead. svn-id: r23800 --- engines/kyra/resource.cpp | 6 +++--- engines/kyra/resource.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engines') 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::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(); -- cgit v1.2.3