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

An animation hierarchy is a container resource referencing the available animations for an item. More...

#include <animhierarchy.h>

Inheritance diagram for Stark::Resources::AnimHierarchy:
Collaboration diagram for Stark::Resources::AnimHierarchy:

List of all members.

Public Member Functions

 AnimHierarchy (Object *parent, byte subType, uint16 index, const Common::String &name)
 ~AnimHierarchy () override
void readData (Formats::XRCReadStream *stream) override
 Deserialize the resource static data and initial state.
void onAllLoaded () override
 Called when the resource sub-tree is entirely loaded.
void setItemAnim (ItemVisual *item, int32 activity)
 Set and apply the current animation kind for an item.
void unselectItemAnim (ItemVisual *item)
 Unselect the current animation and remove it from an item.
void selectItemAnim (ItemVisual *item)
 Apply the current animation to an item.
AnimgetCurrentAnim ()
 Obtain the currently selected animation.
BonesMeshfindBonesMesh ()
 Retrieve the first bone mesh from the anim hierarchy children, if any.
TextureSetfindTextureSet (uint32 textureType)
 Retrieve the first texture of the appropriate type from the anim hierarchy children, if any.
VisualgetVisualForUsage (uint32 usage)
AnimgetIdleActionAnim () const
 Randomize an idle action animation.

Static Public Attributes

static const Type::ResourceType TYPE = Type::kAnimHierarchy

Protected Member Functions

void loadActivityAnimations ()
void loadIdleAnimations ()
AnimgetAnimForActivity (uint32 activity)
void printData () override

Protected Attributes

Common::Array< ResourceReference_animationReferences
Common::Array< Anim * > _activityAnimations
Common::Array< Anim * > _idleAnimations
ResourceReference _parentAnimHierarchyReference
float _field_5C
uint32 _currentActivity
Anim_currentAnim
uint32 _idleActionsFrequencySum

Detailed Description

An animation hierarchy is a container resource referencing the available animations for an item.

This resource keeps track of the currently selected animation.

Definition at line 52 of file animhierarchy.h.


Constructor & Destructor Documentation

Stark::Resources::AnimHierarchy::AnimHierarchy ( Object parent,
byte  subType,
uint16  index,
const Common::String name 
)

Definition at line 41 of file animhierarchy.cpp.

Stark::Resources::AnimHierarchy::~AnimHierarchy (  )  [override]

Definition at line 38 of file animhierarchy.cpp.


Member Function Documentation

BonesMesh * Stark::Resources::AnimHierarchy::findBonesMesh (  ) 

Retrieve the first bone mesh from the anim hierarchy children, if any.

Definition at line 155 of file animhierarchy.cpp.

TextureSet * Stark::Resources::AnimHierarchy::findTextureSet ( uint32  textureType  ) 

Retrieve the first texture of the appropriate type from the anim hierarchy children, if any.

Definition at line 159 of file animhierarchy.cpp.

Anim * Stark::Resources::AnimHierarchy::getAnimForActivity ( uint32  activity  )  [protected]

Definition at line 163 of file animhierarchy.cpp.

Anim * Stark::Resources::AnimHierarchy::getCurrentAnim (  ) 

Obtain the currently selected animation.

Definition at line 151 of file animhierarchy.cpp.

Anim * Stark::Resources::AnimHierarchy::getIdleActionAnim (  )  const

Randomize an idle action animation.

Definition at line 183 of file animhierarchy.cpp.

Visual * Stark::Resources::AnimHierarchy::getVisualForUsage ( uint32  usage  ) 

Definition at line 174 of file animhierarchy.cpp.

void Stark::Resources::AnimHierarchy::loadActivityAnimations (  )  [protected]

Definition at line 69 of file animhierarchy.cpp.

void Stark::Resources::AnimHierarchy::loadIdleAnimations (  )  [protected]

Definition at line 95 of file animhierarchy.cpp.

void Stark::Resources::AnimHierarchy::onAllLoaded (  )  [override, virtual]

Called when the resource sub-tree is entirely loaded.

Allows to load data from other nodes.

Reimplemented from Stark::Resources::Object.

Definition at line 62 of file animhierarchy.cpp.

void Stark::Resources::AnimHierarchy::printData (  )  [override, protected, virtual]

Reimplemented from Stark::Resources::Object.

Definition at line 200 of file animhierarchy.cpp.

void Stark::Resources::AnimHierarchy::readData ( Formats::XRCReadStream stream  )  [override, virtual]

Deserialize the resource static data and initial state.

Reimplemented from Stark::Resources::Object.

Definition at line 50 of file animhierarchy.cpp.

void Stark::Resources::AnimHierarchy::selectItemAnim ( ItemVisual item  ) 

Apply the current animation to an item.

Definition at line 128 of file animhierarchy.cpp.

void Stark::Resources::AnimHierarchy::setItemAnim ( ItemVisual item,
int32  activity 
)

Set and apply the current animation kind for an item.

Definition at line 114 of file animhierarchy.cpp.

void Stark::Resources::AnimHierarchy::unselectItemAnim ( ItemVisual item  ) 

Unselect the current animation and remove it from an item.

Definition at line 120 of file animhierarchy.cpp.


Member Data Documentation

Definition at line 104 of file animhierarchy.h.

Definition at line 102 of file animhierarchy.h.

const Type::ResourceType Stark::Resources::AnimHierarchy::TYPE = Type::kAnimHierarchy [static]

Definition at line 54 of file animhierarchy.h.


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


Generated on Sat Sep 14 2019 05:05:01 for ResidualVM by doxygen 1.7.1
curved edge   curved edge