#include <archiveloader.h>
Public Member Functions | |
| bool | load (const Common::Path &archiveName) |
| void | unloadUnused () |
| ArchiveReadStream * | getFile (const Common::Path &fileName, const Common::Path &archiveName) |
| template<class T > | |
| T * | useRoot (const Common::Path &archiveName) |
| bool | returnRoot (const Common::Path &archiveName) |
| Common::Path | buildArchiveName (Resources::Level *level, Resources::Location *location=nullptr) const |
| Common::SeekableReadStream * | getExternalFile (const Common::Path &fileName, const Common::Path &archiveName) const |
| Common::Path | getExternalFilePath (const Common::Path &fileName, const Common::Path &archiveName) const |
XARC Archive loader.
Maintains a list of opened archive files. Loads the resources from the XRC tree.
| bool Stark::ArchiveLoader::load | ( | const Common::Path & | archiveName | ) |
Load a Xarc archive, and add it to the managed archives list
| void Stark::ArchiveLoader::unloadUnused | ( | ) |
Unload all the unused Xarc archives
| ArchiveReadStream* Stark::ArchiveLoader::getFile | ( | const Common::Path & | fileName, |
| const Common::Path & | archiveName | ||
| ) |
Retrieve a file from a specified archive
| T * Stark::ArchiveLoader::useRoot | ( | const Common::Path & | archiveName | ) |
Get the resource tree root for an archive, and increment the archive use count
| bool Stark::ArchiveLoader::returnRoot | ( | const Common::Path & | archiveName | ) |
Decrement the root's archive use count
| Common::Path Stark::ArchiveLoader::buildArchiveName | ( | Resources::Level * | level, |
| Resources::Location * | location = nullptr |
||
| ) | const |
Build the archive filename for a level or a location
| Common::SeekableReadStream* Stark::ArchiveLoader::getExternalFile | ( | const Common::Path & | fileName, |
| const Common::Path & | archiveName | ||
| ) | const |
Retrieve a file relative to a specified archive