CSprite Class Reference

Holds generic sprite information. More...

#include <class.sprites.hh>

Collaboration diagram for CSprite:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CSprite (CSpriteType *pSpriteType, SDL_Surface *pTargetSurface)
 ~CSprite ()
void Draw (int offsetX, int offsetY)
 Draws the sprite.
void SetAnim (CSprite_AnimID iAnimID)
 Sets the sprite's current animation.

Public Attributes

CSpriteTypempSpriteType
SDL_Surface * mpTargetSurface
CVector2D mvPos
CVector2D mvOldPos
CSprite_AnimID miAnimID
int miAnimStartTime


Detailed Description

Holds generic sprite information.

Constructor & Destructor Documentation

CSprite::CSprite ( CSpriteType pSpriteType,
SDL_Surface *  pTargetSurface 
)

CSprite::~CSprite (  ) 


Member Function Documentation

void CSprite::Draw ( int  offsetX,
int  offsetY 
)

Draws the sprite.

void CSprite::SetAnim ( CSprite_AnimID  iAnimID  ) 

Sets the sprite's current animation.

Remarks:
The given animation ID won't be set when the same animation ID is already set. This to prevent the animation from restarting all the time, since the animation's start time (on which the frame selection is based) will be reset too.


Member Data Documentation


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

Generated on Fri Feb 22 09:36:54 2008 for Mega Maryo by  doxygen 1.5.5