ScummVM API documentation
Kyra::Resource Class Reference

Public Types

enum  Endianness { kPlatformEndianness = 0, kForceLE, kForceBE }
 

Public Member Functions

 Resource (KyraEngine_v1 *vm)
 
bool reset ()
 
bool loadPakFile (const Common::Path &filename)
 
bool loadPakFile (const Common::String &name, Common::ArchiveMemberPtr file)
 
void unloadPakFile (const Common::String &name, bool remFromCache=false)
 
void unloadPakFile (const char *name, bool remFromCache=false)
 
void unloadPakFile (const Common::Path &name, bool remFromCache=false)
 
bool isInPakList (const Common::String &name)
 
bool isInCacheList (const Common::String &name)
 
bool loadFileList (const Common::Path &filedata)
 
bool loadFileList (const char *const *filelist, uint32 numFiles)
 
void unloadAllPakFiles ()
 
void listFiles (const Common::Path &pattern, Common::ArchiveMemberList &list)
 
bool exists (const Common::Path &file, bool errorOutOnFail=false)
 
uint32 getFileSize (const Common::Path &file)
 
uint8 * fileData (const Common::Path &file, uint32 *size)
 
Common::SeekableReadStreamcreateReadStream (const Common::Path &file)
 
Common::SeekableReadStreamEndiancreateEndianAwareReadStream (const Common::Path &file, int endianness=kPlatformEndianness)
 
bool loadFileToBuf (const Common::Path &file, void *buf, uint32 maxSize)
 
Common::ArchivegetCachedArchive (const Common::String &file) const
 

Protected Types

typedef Common::HashMap< Common::String, Common::Archive *, Common::CaseSensitiveString_Hash, Common::CaseSensitiveString_EqualToArchiveMap
 
typedef Common::List< Common::SharedPtr< ResArchiveLoader > > LoaderList
 

Protected Member Functions

Common::ArchiveloadArchive (const Common::String &name, Common::ArchiveMemberPtr member)
 
Common::ArchiveloadInstallerArchive (const Common::Path &file, const Common::String &ext, const uint8 offset)
 
Common::ArchiveloadStuffItArchive (const Common::Path &file, const Common::String &canonicalName)
 
Common::ArchiveloadStuffItArchive (Common::SeekableReadStream *stream, const Common::String &canonicalName, const Common::String &debugName)
 
Common::ArchiveloadKyra1MacInstaller ()
 
bool loadProtectedFiles (const char *const *list)
 
void initializeLoaders ()
 

Protected Attributes

ArchiveMap _archiveCache
 
Common::SearchSet _files
 
Common::SearchSet _archiveFiles
 
Common::SearchSet _protectedFiles
 
LoaderList _loaders
 
const bool _bigEndianPlatForm
 
KyraEngine_v1_vm
 

The documentation for this class was generated from the following file: