#include <Anim2D.h>
Inherits MemoryPoolObject.
Public Member Functions | |
| Anim2DTemplate (AsciiString name) | |
| AsciiString | getName (void) const |
| const Image * | getFrame (UnsignedShort frameNumber) const |
| UnsignedShort | getNumFrames (void) const |
| UnsignedShort | getNumFramesBetweenUpdates (void) const |
| Anim2DMode | getAnimMode (void) const |
| Bool | isRandomizedStartFrame (void) const |
| void | friend_setNextTemplate (Anim2DTemplate *animTemplate) |
| Anim2DTemplate * | friend_getNextTemplate (void) const |
| const FieldParse * | getFieldParse (void) const |
| void | storeImage (const Image *image) |
| store image in next available slot | |
| void | allocateImages (UnsignedShort numFrames) |
| allocate the array of image pointers to use | |
Public Member Functions inherited from MemoryPoolObject | |
| void | deleteInstance () |
Protected Types | |
| enum | { NUM_FRAMES_INVALID = 0 } |
Static Protected Member Functions | |
| static void | parseImage (INI *ini, void *instance, void *store, const void *userData) |
| static void | parseNumImages (INI *ini, void *instance, void *store, const void *userData) |
| static void | parseImageSequence (INI *ini, void *instance, void *store, const void *userData) |
Protected Attributes | |
| Anim2DTemplate * | m_nextTemplate |
| next animation in collections animation list | |
| AsciiString | m_name |
| name of this 2D animation | |
| const Image ** | m_images |
| array of image pointers that make up this animation | |
| UnsignedShort | m_numFrames |
| total number of frames in this animation | |
| UnsignedShort | m_framesBetweenUpdates |
| frames between frame updates | |
| Anim2DMode | m_animMode |
| the animation mode | |
| Bool | m_randomizeStartFrame |
| randomize animation instance start frames | |
Static Protected Attributes | |
| static const FieldParse | s_anim2DFieldParseTable [] |
| the parse table for INI definition | |
Additional Inherited Members | |
Protected Member Functions inherited from MemoryPoolObject | |
| virtual | ~MemoryPoolObject () |
| void * | operator new (size_t s) |
| void | operator delete (void *p) |
| virtual MemoryPool * | getObjectMemoryPool ()=0 |
| Anim2DTemplate::Anim2DTemplate | ( | AsciiString | name | ) |
Definition at line 56 of file Anim2D.cpp.
| void Anim2DTemplate::allocateImages | ( | UnsignedShort | numFrames | ) |
allocate the array of image pointers to use
Allocate the image array for an animation template and store the number of frames we have
Definition at line 128 of file Anim2D.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
| const Image * Anim2DTemplate::getFrame | ( | UnsignedShort | frameNumber | ) | const |
Return the Image* for the frame number requested
Definition at line 270 of file Anim2D.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
staticprotected |
Parsing a single image definition for an animation
Definition at line 146 of file Anim2D.cpp.
|
staticprotected |
This will parse the image sequence of an animation. You can use this as a shortcut to specifying a series of images for an animation instead of having to specify them all individually. Image names will be assumed to start with an appended "000" to the end end of the first image name and incremented up to the number of images for the animation. NOTE: That the number images must have already been specified before we can parse this entry so we know how many images to allocate and look for
Definition at line 183 of file Anim2D.cpp.
|
staticprotected |
Parse the number of images we will have in this animation and allocate the array for them
Definition at line 99 of file Anim2D.cpp.
| void Anim2DTemplate::storeImage | ( | const Image * | image | ) |
store image in next available slot
Store the image at the next open image slot for the animation
Definition at line 239 of file Anim2D.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
the parse table for INI definition
Field parse table for 2D animation templates