#include <location.h>
Public Member Functions | |
| Location (Object *parent, byte subType, uint16 index, const Common::String &name) | |
| void | onAllLoaded () override |
| void | onEnterLocation () override |
| void | onGameLoop () override |
| void | saveLoadCurrent (ResourceSerializer *serializer) override |
| bool | has3DLayer () |
| Gfx::RenderEntryArray | listRenderEntries () |
| Gfx::LightEntryArray | listLightEntries () |
| void | initScroll (const Common::Point &maxScroll) |
| Common::Point | getScrollPosition () const |
| void | setScrollPosition (const Common::Point &position) |
| bool | scrollToCoordinateSmooth (uint32 coordinate) |
| void | scrollToCharacterImmediate () |
| void | goToLayer (Layer *layer) |
| void | setHasActiveScroll () |
| void | stopAllScrolls () |
| void | startFollowingCharacter () |
| void | stopFollowingCharacter () |
| void | scrollToCoordinateImmediate (uint32 coordinate) |
| ItemVisual * | getCharacterItem (int32 character) const |
| void | registerCharacterItem (int32 character, ItemVisual *item) |
| const Common::Array< ModelItem * > & | listModelItems () const |
| void | resetAnimationBlending () |
| Sound * | findStockSound (uint32 stockSoundType) const |
| void | startRumble (int32 rumbleDurationRemaining) |
| void | fadeInInit (int32 fadeDuration) |
| void | fadeOutInit (int32 fadeDuration) |
| void | swayScene (int32 periodMs, const Math::Angle &angle, float amplitude, float offset) |
| void | floatScene (int32 periodMs, float amplitude, float offset) |
| Layer * | getLayerByName (const Common::String &name) |
| Gfx::RenderEntry * | getRenderEntryByName (const Common::String &name) |
| Common::Array< Layer * > | listLayers () |
| Common::Array< Common::Point > | listExitPositions () |
Public Member Functions inherited from Stark::Resources::Object | |
| Type | getType () const |
| byte | getSubType () const |
| uint16 | getIndex () const |
| Common::String | getIndexAsString () const |
| Common::String | getName () const |
| virtual void | readData (Formats::XRCReadStream *stream) |
| virtual void | saveLoad (ResourceSerializer *serializer) |
| virtual void | onPostRead () |
| virtual void | onEnginePause (bool pause) |
| virtual void | onExitLocation () |
| virtual void | onPreDestroy () |
| template<class T > | |
| T * | findParent () |
| Object * | findChildWithIndex (Type type, uint16 index, int subType=-1) const |
| Object * | findChildWithOrder (Type type, uint16 order, int subType=-1) const |
| Object * | findChildWithName (Type type, const Common::String &name, int subType=-1) const |
| template<class T > | |
| T * | findChild (bool mustBeUnique=true) const |
| template<class T > | |
| T * | findChildWithSubtype (int subType, bool mustBeUnique=true) const |
| template<class T > | |
| T * | findChildWithIndex (uint16 index, int subType=-1) const |
| template<class T > | |
| T * | findChildWithOrder (uint16 order, int subType=-1) const |
| template<class T > | |
| T * | findChildWithName (const Common::String &name, int subType=-1) const |
| template<class T > | |
| Common::Array< T * > | listChildren (int subType=-1) const |
| template<class T > | |
| Common::Array< T * > | listChildrenRecursive (int subType=-1) |
| void | addChild (Object *child) |
| virtual void | print (uint depth=0) |
| template<> | |
| Object * | cast (Object *resource) |
| template<> | |
| Object * | findParent () |
| template<> | |
| Common::Array< Object * > | listChildren (int subType) const |
Static Public Attributes | |
| static const Type::ResourceType | TYPE = Type::kLocation |
Protected Member Functions | |
| void | printData () override |
Protected Member Functions inherited from Stark::Resources::Object | |
| Object (Object *parent, byte subType, uint16 index, const Common::String &name) | |
| void | printWithDepth (uint depth, const Common::String &string) const |
| void | printDescription (uint depth) const |
Additional Inherited Members | |
Static Public Member Functions inherited from Stark::Resources::Object | |
| template<class T > | |
| static T * | cast (Object *resource) |
Protected Attributes inherited from Stark::Resources::Object | |
| Type | _type |
| byte | _subType |
| uint16 | _index |
| Common::String | _name |
| Object * | _parent |
| Common::Array< Object * > | _children |
A location is a scene of the game
Locations contain layers. The game engine retrieves the list of renderable items from the current location.
|
overridevirtual |
Called when the resource sub-tree is entirely loaded.
Allows to load data from other nodes.
Reimplemented from Stark::Resources::Object.
|
overridevirtual |
Called when entering a location
Reimplemented from Stark::Resources::Object.
|
overridevirtual |
Called once per game loop
Reimplemented from Stark::Resources::Object.
|
overridevirtual |
Persist / restore the resource state
Called only for active locations
Reimplemented from Stark::Resources::Object.
| bool Stark::Resources::Location::has3DLayer | ( | ) |
Does the location have a 3D layer ?
| Gfx::RenderEntryArray Stark::Resources::Location::listRenderEntries | ( | ) |
Obtain a list of render entries for all the items in the location
| Gfx::LightEntryArray Stark::Resources::Location::listLightEntries | ( | ) |
Obtain a list of render entries for all the lights in the location
| void Stark::Resources::Location::initScroll | ( | const Common::Point & | maxScroll | ) |
Initialize scrolling from Camera data
| Common::Point Stark::Resources::Location::getScrollPosition | ( | ) | const |
Obtain the current scroll position
| void Stark::Resources::Location::setScrollPosition | ( | const Common::Point & | position | ) |
Scroll the location to the specified position if possible
| bool Stark::Resources::Location::scrollToCoordinateSmooth | ( | uint32 | coordinate | ) |
Smoothly scroll to a position in 2D world coordinates
| void Stark::Resources::Location::scrollToCharacterImmediate | ( | ) |
Immediatly scroll the character location
| void Stark::Resources::Location::goToLayer | ( | Layer * | layer | ) |
Replace the currently active layer
| void Stark::Resources::Location::setHasActiveScroll | ( | ) |
Indicate on script driven scroll is active.
This means that the location should not follow the character
| void Stark::Resources::Location::stopAllScrolls | ( | ) |
Stop all script driven scrolls
| void Stark::Resources::Location::startFollowingCharacter | ( | ) |
Tell the location to scroll to follow the character
| void Stark::Resources::Location::stopFollowingCharacter | ( | ) |
Tell the location not to scroll to follow the character
| ItemVisual* Stark::Resources::Location::getCharacterItem | ( | int32 | character | ) | const |
Get an item from its character index
| void Stark::Resources::Location::registerCharacterItem | ( | int32 | character, |
| ItemVisual * | item | ||
| ) |
Register an item as a character to the location
| const Common::Array<ModelItem *>& Stark::Resources::Location::listModelItems | ( | ) | const |
Get the list of items with a 3d model present in the location
| void Stark::Resources::Location::resetAnimationBlending | ( | ) |
Reset animation blending for all the items in the location
| Sound* Stark::Resources::Location::findStockSound | ( | uint32 | stockSoundType | ) | const |
Find a stock sound by its type in the location, the level, or the global level
| void Stark::Resources::Location::startRumble | ( | int32 | rumbleDurationRemaining | ) |
Set remaining frames to rumble on this lcation
| void Stark::Resources::Location::fadeInInit | ( | int32 | fadeDuration | ) |
Setup fading for this location
| void Stark::Resources::Location::swayScene | ( | int32 | periodMs, |
| const Math::Angle & | angle, | ||
| float | amplitude, | ||
| float | offset | ||
| ) |
Setup a swaying movement for the 3d items in this location
| void Stark::Resources::Location::floatScene | ( | int32 | periodMs, |
| float | amplitude, | ||
| float | offset | ||
| ) |
Setup a up / down floating movement for the 3d items in this location
| Layer* Stark::Resources::Location::getLayerByName | ( | const Common::String & | name | ) |
Get the layer with a given name, return null when not found
| Gfx::RenderEntry* Stark::Resources::Location::getRenderEntryByName | ( | const Common::String & | name | ) |
Get a render entry with a given name, return null when not found
|
inline |
Obtain the list of all the inner layers
| Common::Array<Common::Point> Stark::Resources::Location::listExitPositions | ( | ) |
List all the exit positions