ScummVM API documentation
Stark::ResourceProvider Class Reference

#include <resourceprovider.h>

Public Member Functions

 ResourceProvider (ArchiveLoader *archiveLoader, StateProvider *stateProvider, Global *global)
 
void initGlobal ()
 
void requestLocationChange (uint16 level, uint16 location)
 
bool hasLocationChangeRequest () const
 
void setShouldRestoreCurrentState ()
 
void pushAndChangeLocation (int16 level, int16 location)
 
void returnToPushedLocation ()
 
void readLocationStack (Common::SeekableReadStream *stream, uint32 version)
 
void writeLocationStack (Common::WriteStream *stream)
 
void performLocationChange ()
 
void setNextLocationPosition (const ResourceReference &bookmark, int32 direction)
 
void commitActiveLocationsState ()
 
void shutdown ()
 
Resources::LevelgetLevel (uint16 level) const
 
Resources::LocationgetLocation (uint16 level, uint16 location) const
 
Resources::LevelgetLevelFromLocation (Resources::Location *location) const
 

Detailed Description

Game Resource provider.

Maintains a list of resource trees. Maintained trees are the global and the current ones.

Member Function Documentation

◆ initGlobal()

void Stark::ResourceProvider::initGlobal ( )

Load the global archives and fill the global object

◆ requestLocationChange()

void Stark::ResourceProvider::requestLocationChange ( uint16  level,
uint16  location 
)

Load the resources for the specified location

◆ hasLocationChangeRequest()

bool Stark::ResourceProvider::hasLocationChangeRequest ( ) const
inline

Is a location change pending?

◆ readLocationStack()

void Stark::ResourceProvider::readLocationStack ( Common::SeekableReadStream stream,
uint32  version 
)

Save and restore the previous location stack

◆ performLocationChange()

void Stark::ResourceProvider::performLocationChange ( )

Apply a location change request.

Update the global object with the new location. Perform the necessary resource lifecycle updates

◆ setNextLocationPosition()

void Stark::ResourceProvider::setNextLocationPosition ( const ResourceReference bookmark,
int32  direction 
)

Set the initial position and direction for the next location change

◆ commitActiveLocationsState()

void Stark::ResourceProvider::commitActiveLocationsState ( )

Save the current location state to the state store.

◆ shutdown()

void Stark::ResourceProvider::shutdown ( )

Release the global and current resources

◆ getLevel()

Resources::Level* Stark::ResourceProvider::getLevel ( uint16  level) const

Obtain the root resource for a loaded level

◆ getLocation()

Resources::Location* Stark::ResourceProvider::getLocation ( uint16  level,
uint16  location 
) const

Obtain the root resource for a loaded location

◆ getLevelFromLocation()

Resources::Level* Stark::ResourceProvider::getLevelFromLocation ( Resources::Location location) const

Get the parent level from a currently loaded location


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