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

Animation scripts control the currently displayed frame for images animation resources. More...

#include <animscript.h>

Inheritance diagram for Stark::Resources::AnimScript:
Collaboration diagram for Stark::Resources::AnimScript:

List of all members.

Public Member Functions

 AnimScript (Object *parent, byte subType, uint16 index, const Common::String &name)
virtual ~AnimScript ()
void onAllLoaded () override
 Called when the resource sub-tree is entirely loaded.
void onGameLoop () override
 Called once per game loop.
void saveLoad (ResourceSerializer *serializer) override
 Persist / restore the resource state.
void goToScriptItem (AnimScriptItem *item)
 Go to a script item.
uint32 getDurationStartingWithItem (AnimScriptItem *startItem)
 Compute the duration in milliseconds of an animation script portion.
bool hasReached (AnimScriptItem *item)
 Is the current script item later in the script when compared to the specified one?

Static Public Attributes

static const Type::ResourceType TYPE = Type::kAnimScript

Protected Member Functions

void goToNextItem ()
int32 findItemIndex (AnimScriptItem *item)

Protected Attributes

Anim_anim
Common::Array< AnimScriptItem * > _items
int32 _nextItemIndex
int32 _msecsToNextUpdate

Detailed Description

Animation scripts control the currently displayed frame for images animation resources.

Animation scripts contain animation script items defining which frames should be displayed and when.

Animation scripts also allow to play sounds.

Definition at line 50 of file animscript.h.


Constructor & Destructor Documentation

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

Definition at line 45 of file animscript.cpp.

Stark::Resources::AnimScript::~AnimScript (  )  [virtual]

Definition at line 42 of file animscript.cpp.


Member Function Documentation

int32 Stark::Resources::AnimScript::findItemIndex ( AnimScriptItem item  )  [protected]

Definition at line 179 of file animscript.cpp.

uint32 Stark::Resources::AnimScript::getDurationStartingWithItem ( AnimScriptItem startItem  ) 

Compute the duration in milliseconds of an animation script portion.

Said portion goes from the specified starting point to the end of the script

Definition at line 139 of file animscript.cpp.

void Stark::Resources::AnimScript::goToNextItem (  )  [protected]

Definition at line 125 of file animscript.cpp.

void Stark::Resources::AnimScript::goToScriptItem ( AnimScriptItem item  ) 

Go to a script item.

Cancel any delay so that it is shown immediately.

Definition at line 130 of file animscript.cpp.

bool Stark::Resources::AnimScript::hasReached ( AnimScriptItem item  ) 

Is the current script item later in the script when compared to the specified one?

Definition at line 174 of file animscript.cpp.

void Stark::Resources::AnimScript::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 53 of file animscript.cpp.

void Stark::Resources::AnimScript::onGameLoop (  )  [override, virtual]

Called once per game loop.

Reimplemented from Stark::Resources::Object.

Definition at line 65 of file animscript.cpp.

void Stark::Resources::AnimScript::saveLoad ( ResourceSerializer serializer  )  [override, virtual]

Persist / restore the resource state.

Reimplemented from Stark::Resources::Object.

Definition at line 193 of file animscript.cpp.


Member Data Documentation

Definition at line 79 of file animscript.h.

Definition at line 83 of file animscript.h.

Definition at line 82 of file animscript.h.

const Type::ResourceType Stark::Resources::AnimScript::TYPE = Type::kAnimScript [static]

Definition at line 52 of file animscript.h.


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


Generated on Sat Jan 19 2019 05:07:50 for ResidualVM by doxygen 1.7.1
curved edge   curved edge