TileAnim Class Reference

#include <TileAnim.h>

Collaboration diagram for TileAnim:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class represents an animated 2D texture mapped quad which is one-shot, and expires as soon as the animation is through. The function calls the SDL timing functions internally in order to update it's current displayed frame of animation on a regular timing schedule.

Definition at line 32 of file TileAnim.h.

Public Member Functions

 TileAnim (void)
 default constructor
 TileAnim (Vector vPos, float angle, float duration, int anim, float delay, int setup, bool over)
 general constructor
 ~TileAnim (void)
 removes the effect
void Draw (void)
 draws the effect in it's current state
bool Step (float timeStep)
 advances the animation

Public Attributes

bool bOver
 set to true when the animation has reached the last frame
Vector vPosition
 absolute position of the effect's origin
float fAngle
 rotation angle of the animation when displayed on screen
float fFrameTimer
 timer used to keep track of the time elapsed displaying each frame
float fFrameDelay
 amount of time a frame will be displayed
float iDuration
 total amount of time the animation will be on screen before being removed
int iAnimation
 the animation this effect will display
int iCurrentFrame
 the current frame of animation to be displayed
int iSetupTimer
 timer used to keep track of the setup frame display
int iSetupFrames
 amount of times the first frame of animation will be displayed


Constructor & Destructor Documentation

TileAnim::TileAnim ( void   ) 

Definition at line 26 of file TileAnim.cpp.

References ANIMID_NULL, bOver, fAngle, fFrameDelay, fFrameTimer, iAnimation, iCurrentFrame, iDuration, iSetupFrames, iSetupTimer, vPosition, Vector::x, Vector::y, and Vector::z.

TileAnim::TileAnim ( Vector  vPos,
float  angle,
float  duration,
int  anim,
float  delay,
int  setup,
bool  over 
)

Definition at line 42 of file TileAnim.cpp.

References bOver, fAngle, fFrameDelay, fFrameTimer, iAnimation, iCurrentFrame, iDuration, iSetupFrames, iSetupTimer, and vPosition.

TileAnim::~TileAnim ( void   ) 

Definition at line 56 of file TileAnim.cpp.


Member Function Documentation

void TileAnim::Draw ( void   ) 

Definition at line 93 of file TileAnim.cpp.

References bOver, fAngle, GetAnimation(), GetFrame(), iAnimation, iCurrentFrame, iDuration, TILEANIM_FADEOUT_TIME, vPosition, Vector::x, and Vector::y.

Referenced by CEffect::Draw().

Here is the call graph for this function:

Here is the caller graph for this function:

bool TileAnim::Step ( float  timeStep  ) 

Advances the animations current frame based on the time that the animation been in existance, as determined by the time step parameter passed to the function. This function also contains keep the current frame clamped to the animation's last frame when playback is complete.

Definition at line 64 of file TileAnim.cpp.

References fFrameDelay, fFrameTimer, GetAnimation(), iAnimation, iCurrentFrame, iDuration, iSetupFrames, iSetupTimer, and CAnimation::iTotalFrames.

Referenced by CEffect::Step().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

bool TileAnim::bOver

Definition at line 35 of file TileAnim.h.

Referenced by Draw(), and TileAnim().

Vector TileAnim::vPosition

Definition at line 36 of file TileAnim.h.

Referenced by Draw(), and TileAnim().

float TileAnim::fAngle

Definition at line 37 of file TileAnim.h.

Referenced by Draw(), and TileAnim().

float TileAnim::fFrameTimer

Definition at line 38 of file TileAnim.h.

Referenced by Step(), and TileAnim().

float TileAnim::fFrameDelay

Definition at line 39 of file TileAnim.h.

Referenced by Step(), and TileAnim().

float TileAnim::iDuration

Definition at line 40 of file TileAnim.h.

Referenced by Draw(), Step(), and TileAnim().

int TileAnim::iAnimation

Definition at line 41 of file TileAnim.h.

Referenced by Draw(), Step(), and TileAnim().

int TileAnim::iCurrentFrame

Definition at line 42 of file TileAnim.h.

Referenced by Draw(), Step(), and TileAnim().

int TileAnim::iSetupTimer

Definition at line 43 of file TileAnim.h.

Referenced by Step(), and TileAnim().

int TileAnim::iSetupFrames

Definition at line 44 of file TileAnim.h.

Referenced by Step(), and TileAnim().

 

Copyright Windsor Schmidt 2006 - All rights reserved.