diff options
-rw-r--r-- | engines/kyra/resource.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/resource.h | 4 | ||||
-rw-r--r-- | engines/kyra/resource_intern.cpp | 10 | ||||
-rw-r--r-- | engines/kyra/resource_intern.h | 16 |
4 files changed, 17 insertions, 17 deletions
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 31a49a0af9..63b8072654 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -153,7 +153,7 @@ bool Resource::loadPakFile(Common::String filename) { return loadPakFile(filename, file); } -bool Resource::loadPakFile(Common::String name, Common::SharedPtr<Common::ArchiveMember> file) { +bool Resource::loadPakFile(Common::String name, Common::ArchiveMemberPtr file) { name.toUppercase(); if (_archiveFiles.hasArchive(name) || _protectedFiles.hasArchive(name)) @@ -319,7 +319,7 @@ Common::SeekableReadStream *Resource::createReadStream(const Common::String &fil return _files.createReadStreamForMember(file); } -Common::Archive *Resource::loadArchive(const Common::String &name, Common::SharedPtr<Common::ArchiveMember> member) { +Common::Archive *Resource::loadArchive(const Common::String &name, Common::ArchiveMemberPtr member) { ArchiveMap::iterator cachedArchive = _archiveCache.find(name); if (cachedArchive != _archiveCache.end()) return cachedArchive->_value; diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index d572c1ac54..8372bf9ad1 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -55,7 +55,7 @@ public: bool reset(); bool loadPakFile(Common::String filename); - bool loadPakFile(Common::String name, Common::SharedPtr<Common::ArchiveMember> file); + bool loadPakFile(Common::String name, Common::ArchiveMemberPtr file); void unloadPakFile(Common::String filename, bool remFromCache = false); @@ -86,7 +86,7 @@ protected: Common::SearchSet _archiveFiles; Common::SearchSet _protectedFiles; - Common::Archive *loadArchive(const Common::String &name, Common::SharedPtr<Common::ArchiveMember> member); + Common::Archive *loadArchive(const Common::String &name, Common::ArchiveMemberPtr member); Common::Archive *loadInstallerArchive(const Common::String &file, const Common::String &ext, const uint8 offset); bool loadProtectedFiles(const char * const * list); diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp index 85d47f1fd4..0d968de9ff 100644 --- a/engines/kyra/resource_intern.cpp +++ b/engines/kyra/resource_intern.cpp @@ -35,7 +35,7 @@ namespace Kyra { // -> PlainArchive implementation -PlainArchive::PlainArchive(Common::SharedPtr<Common::ArchiveMember> file) +PlainArchive::PlainArchive(Common::ArchiveMemberPtr file) : _file(file), _files() { } @@ -86,7 +86,7 @@ PlainArchive::Entry PlainArchive::getFileEntry(const Common::String &name) const // -> TlkArchive implementation -TlkArchive::TlkArchive(Common::SharedPtr<Common::ArchiveMember> file, uint16 entryCount, const uint32 *fileEntries) +TlkArchive::TlkArchive(Common::ArchiveMemberPtr file, uint16 entryCount, const uint32 *fileEntries) : _file(file), _entryCount(entryCount), _fileEntries(fileEntries) { } @@ -285,7 +285,7 @@ bool ResLoaderPak::isLoadable(const Common::String &filename, Common::SeekableRe return true; } -Common::Archive *ResLoaderPak::load(Common::SharedPtr<Common::ArchiveMember> memberFile, Common::SeekableReadStream &stream) const { +Common::Archive *ResLoaderPak::load(Common::ArchiveMemberPtr memberFile, Common::SeekableReadStream &stream) const { int32 filesize = stream.size(); if (filesize < 0) return 0; @@ -400,7 +400,7 @@ bool ResLoaderInsMalcolm::isLoadable(const Common::String &filename, Common::See return (buffer[0] == 0x0D && buffer[1] == 0x0A); } -Common::Archive *ResLoaderInsMalcolm::load(Common::SharedPtr<Common::ArchiveMember> memberFile, Common::SeekableReadStream &stream) const { +Common::Archive *ResLoaderInsMalcolm::load(Common::ArchiveMemberPtr memberFile, Common::SeekableReadStream &stream) const { Common::List<Common::String> filenames; Common::ScopedPtr<PlainArchive> result(new PlainArchive(memberFile)); if (!result) @@ -468,7 +468,7 @@ bool ResLoaderTlk::isLoadable(const Common::String &filename, Common::SeekableRe return true; } -Common::Archive *ResLoaderTlk::load(Common::SharedPtr<Common::ArchiveMember> file, Common::SeekableReadStream &stream) const { +Common::Archive *ResLoaderTlk::load(Common::ArchiveMemberPtr file, Common::SeekableReadStream &stream) const { const uint16 entryCount = stream.readUint16LE(); uint32 *fileEntries = new uint32[entryCount * 2]; diff --git a/engines/kyra/resource_intern.h b/engines/kyra/resource_intern.h index ad4ee0eb1d..16f3a1fe91 100644 --- a/engines/kyra/resource_intern.h +++ b/engines/kyra/resource_intern.h @@ -46,7 +46,7 @@ public: uint32 size; }; - PlainArchive(Common::SharedPtr<Common::ArchiveMember> file); + PlainArchive(Common::ArchiveMemberPtr file); void addFileEntry(const Common::String &name, const Entry entry); Entry getFileEntry(const Common::String &name) const; @@ -59,13 +59,13 @@ public: private: typedef Common::HashMap<Common::String, Entry, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> FileMap; - Common::SharedPtr<Common::ArchiveMember> _file; + Common::ArchiveMemberPtr _file; FileMap _files; }; class TlkArchive : public Common::Archive { public: - TlkArchive(Common::SharedPtr<Common::ArchiveMember> file, uint16 entryCount, const uint32 *fileEntries); + TlkArchive(Common::ArchiveMemberPtr file, uint16 entryCount, const uint32 *fileEntries); ~TlkArchive(); bool hasFile(const Common::String &name); @@ -73,7 +73,7 @@ public: Common::ArchiveMemberPtr getMember(const Common::String &name); Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const; private: - Common::SharedPtr<Common::ArchiveMember> _file; + Common::ArchiveMemberPtr _file; const uint32 *findFile(const Common::String &name) const; @@ -115,28 +115,28 @@ public: virtual ~ResArchiveLoader() {} virtual bool checkFilename(Common::String filename) const = 0; virtual bool isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const = 0; - virtual Common::Archive *load(Common::SharedPtr<Common::ArchiveMember> file, Common::SeekableReadStream &stream) const = 0; + virtual Common::Archive *load(Common::ArchiveMemberPtr file, Common::SeekableReadStream &stream) const = 0; }; class ResLoaderPak : public ResArchiveLoader { public: bool checkFilename(Common::String filename) const; bool isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const; - Common::Archive *load(Common::SharedPtr<Common::ArchiveMember> file, Common::SeekableReadStream &stream) const; + Common::Archive *load(Common::ArchiveMemberPtr file, Common::SeekableReadStream &stream) const; }; class ResLoaderInsMalcolm : public ResArchiveLoader { public: bool checkFilename(Common::String filename) const; bool isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const; - Common::Archive *load(Common::SharedPtr<Common::ArchiveMember> file, Common::SeekableReadStream &stream) const; + Common::Archive *load(Common::ArchiveMemberPtr file, Common::SeekableReadStream &stream) const; }; class ResLoaderTlk : public ResArchiveLoader { public: bool checkFilename(Common::String filename) const; bool isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const; - Common::Archive *load(Common::SharedPtr<Common::ArchiveMember> file, Common::SeekableReadStream &stream) const; + Common::Archive *load(Common::ArchiveMemberPtr file, Common::SeekableReadStream &stream) const; }; class InstallerLoader { |