ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Game Resource provider. More...

#include <resourceprovider.h>

Collaboration diagram for Stark::ResourceProvider:

List of all members.

Classes

struct  PreviousLocation

Public Member Functions

 ResourceProvider (ArchiveLoader *archiveLoader, StateProvider *stateProvider, Global *global)
void initGlobal ()
 Load the global archives and fill the global object.
void requestLocationChange (uint16 level, uint16 location)
 Load the resources for the specified location.
bool hasLocationChangeRequest () const
 Is a location change pending?
void setShouldRestoreCurrentState ()
void pushAndChangeLocation (int16 level, int16 location)
void returnToPushedLocation ()
void readLocationStack (Common::SeekableReadStream *stream, uint32 version)
 Save and restore the previous location stack.
void writeLocationStack (Common::WriteStream *stream)
void performLocationChange ()
 Apply a location change request.
void setNextLocationPosition (const ResourceReference &bookmark, int32 direction)
 Set the initial position and direction for the next location change.
void commitActiveLocationsState ()
 Save the current location state to the state store.
void shutdown ()
 Release the global and current resources.
Resources::LevelgetLevel (uint16 level) const
 Obtain the root resource for a loaded level.
Resources::LocationgetLocation (uint16 level, uint16 location) const
 Obtain the root resource for a loaded location.
Resources::LevelgetLevelFromLocation (Resources::Location *location) const
 Get the parent level from a currently loaded location.

Private Types

typedef Common::List< Current * > CurrentList

Private Member Functions

void pushCurrentLocation ()
void popCurrentLocation ()
void saveLoadLocationStack (ResourceSerializer &serializer)
CurrentfindLevel (uint16 level) const
CurrentfindLocation (uint16 level, uint16 location) const
void purgeOldLocations ()
void runLocationChangeScripts (Resources::Object *resource, uint32 scriptCallMode)
void setAprilInitialPosition ()
void setScrollInitialPosition ()

Private Attributes

Common::Array< PreviousLocation_locationStack
Global_global
ArchiveLoader_archiveLoader
StateProvider_stateProvider
bool _locationChangeRequest
bool _restoreCurrentState
CurrentList _locations
ResourceReference _nextPositionBookmarkReference
int32 _nextDirection

Detailed Description

Game Resource provider.

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

Definition at line 49 of file resourceprovider.h.


Member Typedef Documentation

Definition at line 109 of file resourceprovider.h.


Constructor & Destructor Documentation

Stark::ResourceProvider::ResourceProvider ( ArchiveLoader archiveLoader,
StateProvider stateProvider,
Global global 
)

Definition at line 45 of file resourceprovider.cpp.


Member Function Documentation

void Stark::ResourceProvider::commitActiveLocationsState (  ) 

Save the current location state to the state store.

Definition at line 336 of file resourceprovider.cpp.

Current * Stark::ResourceProvider::findLevel ( uint16  level  )  const [private]

Definition at line 86 of file resourceprovider.cpp.

Current * Stark::ResourceProvider::findLocation ( uint16  level,
uint16  location 
) const [private]

Definition at line 96 of file resourceprovider.cpp.

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

Obtain the root resource for a loaded level.

Definition at line 107 of file resourceprovider.cpp.

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

Get the parent level from a currently loaded location.

Definition at line 387 of file resourceprovider.cpp.

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

Obtain the root resource for a loaded location.

Definition at line 117 of file resourceprovider.cpp.

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

Is a location change pending?

Definition at line 60 of file resourceprovider.h.

void Stark::ResourceProvider::initGlobal (  ) 

Load the global archives and fill the global object.

Definition at line 54 of file resourceprovider.cpp.

void Stark::ResourceProvider::performLocationChange (  ) 

Apply a location change request.

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

Definition at line 205 of file resourceprovider.cpp.

void Stark::ResourceProvider::popCurrentLocation (  )  [private]

Definition at line 147 of file resourceprovider.cpp.

void Stark::ResourceProvider::purgeOldLocations (  )  [private]

Definition at line 318 of file resourceprovider.cpp.

void Stark::ResourceProvider::pushAndChangeLocation ( int16  level,
int16  location 
)

Definition at line 127 of file resourceprovider.cpp.

void Stark::ResourceProvider::pushCurrentLocation (  )  [private]

Definition at line 136 of file resourceprovider.cpp.

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

Save and restore the previous location stack.

Definition at line 397 of file resourceprovider.cpp.

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

Load the resources for the specified location.

Definition at line 159 of file resourceprovider.cpp.

void Stark::ResourceProvider::returnToPushedLocation (  ) 

Definition at line 132 of file resourceprovider.cpp.

void Stark::ResourceProvider::runLocationChangeScripts ( Resources::Object resource,
uint32  scriptCallMode 
) [private]

Definition at line 262 of file resourceprovider.cpp.

void Stark::ResourceProvider::saveLoadLocationStack ( ResourceSerializer serializer  )  [private]

Definition at line 407 of file resourceprovider.cpp.

void Stark::ResourceProvider::setAprilInitialPosition (  )  [private]

Definition at line 288 of file resourceprovider.cpp.

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

Set the initial position and direction for the next location change.

Definition at line 283 of file resourceprovider.cpp.

void Stark::ResourceProvider::setScrollInitialPosition (  )  [private]

Definition at line 312 of file resourceprovider.cpp.

void Stark::ResourceProvider::setShouldRestoreCurrentState (  )  [inline]

Definition at line 62 of file resourceprovider.h.

void Stark::ResourceProvider::shutdown (  ) 

Release the global and current resources.

Definition at line 353 of file resourceprovider.cpp.

void Stark::ResourceProvider::writeLocationStack ( Common::WriteStream stream  ) 

Definition at line 402 of file resourceprovider.cpp.


Member Data Documentation

Definition at line 120 of file resourceprovider.h.

Definition at line 124 of file resourceprovider.h.

Definition at line 125 of file resourceprovider.h.


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


Generated on Sat May 18 2019 05:07:17 for ResidualVM by doxygen 1.7.1
curved edge   curved edge