From 14c5bbbccf30f333b92092ca55063b338335c3a5 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 23 Jan 2009 04:45:44 +0000 Subject: Renamed Archive::openFile to createReadStreamForMember svn-id: r36021 --- engines/kyra/resource.cpp | 2 +- engines/kyra/resource_intern.cpp | 4 ++-- engines/kyra/resource_intern.h | 4 ++-- engines/parallaction/disk_br.cpp | 4 ++-- engines/parallaction/disk_ns.cpp | 20 ++++++++++---------- engines/scumm/he/resource_he.cpp | 2 +- engines/scumm/he/script_v60he.cpp | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) (limited to 'engines') diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index e319b89023..6e1623e984 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -311,7 +311,7 @@ bool Resource::loadFileToBuf(const char *file, void *buf, uint32 maxSize) { } Common::SeekableReadStream *Resource::getFileStream(const Common::String &file) { - return _files.openFile(file); + return _files.createReadStreamForMember(file); } Common::Archive *Resource::loadArchive(const Common::String &name, Common::SharedPtr member) { diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp index 68a4a55886..4f435e8927 100644 --- a/engines/kyra/resource_intern.cpp +++ b/engines/kyra/resource_intern.cpp @@ -69,7 +69,7 @@ Common::ArchiveMemberPtr PlainArchive::getMember(const Common::String &name) { return Common::ArchiveMemberPtr(new Common::GenericArchiveMember(name, this)); } -Common::SeekableReadStream *PlainArchive::openFile(const Common::String &name) const { +Common::SeekableReadStream *PlainArchive::createReadStreamForMember(const Common::String &name) const { FileMap::const_iterator fDesc = _files.find(name); if (fDesc == _files.end()) return 0; @@ -124,7 +124,7 @@ Common::ArchiveMemberPtr CachedArchive::getMember(const Common::String &name) { return Common::ArchiveMemberPtr(new Common::GenericArchiveMember(name, this)); } -Common::SeekableReadStream *CachedArchive::openFile(const Common::String &name) const { +Common::SeekableReadStream *CachedArchive::createReadStreamForMember(const Common::String &name) const { FileMap::const_iterator fDesc = _files.find(name); if (fDesc == _files.end()) return 0; diff --git a/engines/kyra/resource_intern.h b/engines/kyra/resource_intern.h index 6f16a2ba8e..4f15985dd2 100644 --- a/engines/kyra/resource_intern.h +++ b/engines/kyra/resource_intern.h @@ -52,7 +52,7 @@ public: bool hasFile(const Common::String &name); int listMembers(Common::ArchiveMemberList &list); Common::ArchiveMemberPtr getMember(const Common::String &name); - Common::SeekableReadStream *openFile(const Common::String &name) const; + Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const; private: struct Entry { uint32 offset; @@ -82,7 +82,7 @@ public: bool hasFile(const Common::String &name); int listMembers(Common::ArchiveMemberList &list); Common::ArchiveMemberPtr getMember(const Common::String &name); - Common::SeekableReadStream *openFile(const Common::String &name) const; + Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const; private: struct Entry { byte *data; diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp index 1bb4023010..0dca43a55c 100644 --- a/engines/parallaction/disk_br.cpp +++ b/engines/parallaction/disk_br.cpp @@ -101,7 +101,7 @@ Common::SeekableReadStream *Disk_br::openFile_internal(bool errorOnNotFound, con lookup = name + ext; } - Common::SeekableReadStream *stream = _sset.openFile(lookup); + Common::SeekableReadStream *stream = _sset.createReadStreamForMember(lookup); if (stream) { return stream; } @@ -116,7 +116,7 @@ Common::SeekableReadStream *Disk_br::openFile_internal(bool errorOnNotFound, con lookup.deleteLastChar(); } lookup += ext; - stream = _sset.openFile(lookup); + stream = _sset.createReadStreamForMember(lookup); } } diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp index a526facaad..94d9f8482b 100644 --- a/engines/parallaction/disk_ns.cpp +++ b/engines/parallaction/disk_ns.cpp @@ -78,7 +78,7 @@ public: NSArchive(Common::SeekableReadStream *stream, Common::Platform platform, uint32 features); ~NSArchive(); - Common::SeekableReadStream *openFile(const Common::String &name) const; + Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const; bool hasFile(const Common::String &name); int listMembers(Common::ArchiveMemberList &list); Common::ArchiveMemberPtr getMember(const Common::String &name); @@ -127,8 +127,8 @@ uint32 NSArchive::lookup(const char *name) const { return i; } -Common::SeekableReadStream *NSArchive::openFile(const Common::String &name) const { - debugC(3, kDebugDisk, "NSArchive::openFile(%s)", name.c_str()); +Common::SeekableReadStream *NSArchive::createReadStreamForMember(const Common::String &name) const { + debugC(3, kDebugDisk, "NSArchive::createReadStreamForMember(%s)", name.c_str()); if (name.empty()) return 0; @@ -136,7 +136,7 @@ Common::SeekableReadStream *NSArchive::openFile(const Common::String &name) cons uint32 index = lookup(name.c_str()); if (index == _numFiles) return 0; - debugC(9, kDebugDisk, "NSArchive::openFile: '%s' found in slot %i", name.c_str(), index); + debugC(9, kDebugDisk, "NSArchive::createReadStreamForMember: '%s' found in slot %i", name.c_str(), index); int offset = _archiveOffsets[index]; int endOffset = _archiveOffsets[index] + _archiveLenghts[index]; @@ -195,7 +195,7 @@ Common::SeekableReadStream *Disk_ns::openFile(const char *filename) { void Disk_ns::addArchive(const Common::String& name, int priority) { - Common::SeekableReadStream *stream = _sset.openFile(name); + Common::SeekableReadStream *stream = _sset.createReadStreamForMember(name); if (!stream) error("Disk_ns::addArchive() couldn't find archive '%s'", name.c_str()); @@ -257,13 +257,13 @@ void DosDisk_ns::init() { Common::SeekableReadStream *DosDisk_ns::tryOpenFile(const char* name) { debugC(3, kDebugDisk, "DosDisk_ns::tryOpenFile(%s)", name); - Common::SeekableReadStream *stream = _sset.openFile(name); + Common::SeekableReadStream *stream = _sset.createReadStreamForMember(name); if (stream) return stream; char path[PATH_LEN]; sprintf(path, "%s.pp", name); - return _sset.openFile(path); + return _sset.createReadStreamForMember(path); } @@ -896,18 +896,18 @@ GfxObj* AmigaDisk_ns::loadStatic(const char* name) { Common::SeekableReadStream *AmigaDisk_ns::tryOpenFile(const char* name) { debugC(3, kDebugDisk, "AmigaDisk_ns::tryOpenFile(%s)", name); - Common::SeekableReadStream *stream = _sset.openFile(name); + Common::SeekableReadStream *stream = _sset.createReadStreamForMember(name); if (stream) return stream; char path[PATH_LEN]; sprintf(path, "%s.pp", name); - stream = _sset.openFile(path); + stream = _sset.createReadStreamForMember(path); if (stream) return new PowerPackerStream(*stream); sprintf(path, "%s.dd", name); - stream = _sset.openFile(path); + stream = _sset.createReadStreamForMember(path); if (stream) return new PowerPackerStream(*stream); diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp index ebe13f29a4..1b5b467512 100644 --- a/engines/scumm/he/resource_he.cpp +++ b/engines/scumm/he/resource_he.cpp @@ -167,7 +167,7 @@ int Win32ResExtractor::extractResource_(const char *resType, char *resName, byte } /* get file size */ - fi.file = SearchMan.openFile(_fileName); + fi.file = SearchMan.createReadStreamForMember(_fileName); if (!fi.file) { error("Cannot open file %s", _fileName.c_str()); } diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp index 8cf74983ca..86ce492033 100644 --- a/engines/scumm/he/script_v60he.cpp +++ b/engines/scumm/he/script_v60he.cpp @@ -1010,7 +1010,7 @@ void ScummEngine_v60he::o60_openFile() { // TODO / FIXME: Consider using listSavefiles to avoid unneccessary openForLoading calls _hInFileTable[slot] = _saveFileMan->openForLoading(filename); if (_hInFileTable[slot] == 0) { - _hInFileTable[slot] = SearchMan.openFile(filename); + _hInFileTable[slot] = SearchMan.createReadStreamForMember(filename); } break; case 2: -- cgit v1.2.3