ScummVM API documentation
Stark::ArchiveLoader Class Reference

#include <archiveloader.h>

Public Member Functions

bool load (const Common::Path &archiveName)
 
void unloadUnused ()
 
ArchiveReadStreamgetFile (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::SeekableReadStreamgetExternalFile (const Common::Path &fileName, const Common::Path &archiveName) const
 
Common::Path getExternalFilePath (const Common::Path &fileName, const Common::Path &archiveName) const
 

Detailed Description

XARC Archive loader.

Maintains a list of opened archive files. Loads the resources from the XRC tree.

Member Function Documentation

◆ load()

bool Stark::ArchiveLoader::load ( const Common::Path archiveName)

Load a Xarc archive, and add it to the managed archives list

◆ unloadUnused()

void Stark::ArchiveLoader::unloadUnused ( )

Unload all the unused Xarc archives

◆ getFile()

ArchiveReadStream* Stark::ArchiveLoader::getFile ( const Common::Path fileName,
const Common::Path archiveName 
)

Retrieve a file from a specified archive

◆ useRoot()

template<class T >
T * Stark::ArchiveLoader::useRoot ( const Common::Path archiveName)

Get the resource tree root for an archive, and increment the archive use count

◆ returnRoot()

bool Stark::ArchiveLoader::returnRoot ( const Common::Path archiveName)

Decrement the root's archive use count

◆ buildArchiveName()

Common::Path Stark::ArchiveLoader::buildArchiveName ( Resources::Level level,
Resources::Location location = nullptr 
) const

Build the archive filename for a level or a location

◆ getExternalFile()

Common::SeekableReadStream* Stark::ArchiveLoader::getExternalFile ( const Common::Path fileName,
const Common::Path archiveName 
) const

Retrieve a file relative to a specified archive


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