AnimatedSprite Class Reference

A sprite that contains animation data. More...

#include <Graphics/AnimatedSprite.h>

Inherits Sprite.

List of all members.

Classes

struct  Animation
 Holds all of the data neccecary for rendering a complete animation. More...
struct  AnimationFrame
 Holds all of the data neccecary for rendering a frame in an animation. More...

Public Member Functions

bool LoadAnimatedSprite (const char *file)
 Loads The animated sprite data from the specified file.
uint GetNumberOfAnimations () const
 Gets the number of animations the loaded sprite has.
const AnimationGetAnimation (uint index) const
 Gets a spacific Animation.
int FindAnimation (const char *name) const
 Finds an animation by name.
void DrawFrame (uint animationNumber, uint frameNumber) const
 Draws a spacific frame of an animation.
void DrawFrame (const Animation &anim, uint frameNumber) const
 Draws a spacific frame of an animation.
void DrawFrame (const AnimationFrame &frame) const
 Draws a spacific frame of an animation.

Detailed Description

A sprite that contains animation data.


Member Function Documentation

void AnimatedSprite::DrawFrame ( const AnimationFrame frame  )  const

Draws a spacific frame of an animation.

Parameters:
[in] frame the AnimationFrame to draw.
void AnimatedSprite::DrawFrame ( const Animation anim,
uint  frameNumber 
) const

Draws a spacific frame of an animation.

Parameters:
[in] anim the animation to draw from.
[in] frameNumber the index to the frame to draw from the animation.
void AnimatedSprite::DrawFrame ( uint  animationNumber,
uint  frameNumber 
) const

Draws a spacific frame of an animation.

Parameters:
[in] animationNumber the index to the animation to draw from use.
[in] frameNumber the index to the frame to draw from the animation.
int AnimatedSprite::FindAnimation ( const char *  name  )  const

Finds an animation by name.

Parameters:
[in] name the name of the animation to find.
Returns:
The index to the first animation with the given name, returns -1 if the animation dosn't exist.
const AnimatedSprite::Animation & AnimatedSprite::GetAnimation ( uint  index  )  const

Gets a spacific Animation.

Parameters:
[in] index the index to the Animation.
Returns:
The specified animation.
uint AnimatedSprite::GetNumberOfAnimations (  )  const

Gets the number of animations the loaded sprite has.

Returns:
The number of animations in the Loaded sprite.
bool AnimatedSprite::LoadAnimatedSprite ( const char *  file  ) 

Loads The animated sprite data from the specified file.

Parameters:
[in] file the file containing the animation data, assumed to be relitive to the 'Animations' data paths.
Returns:
True if the animated sprite was loaded, false otherwise.

The documentation for this class was generated from the following files:
Generated on Mon Apr 5 19:08:05 2010 for BrickOut |ReDuX| by  doxygen 1.6.3