Public Member Functions | Public Attributes

Sprite::spriteFrame Struct Reference

Contains all information necessary for animation frames of a Sprite. More...

List of all members.

Public Member Functions

 spriteFrame (Image *src, int x, int y, int w, int h, int aX, int aY, int d)
 spriteFrame (const spriteFrame &spriteframe)
spriteFrameoperator= (const spriteFrame &rhs)
 ~spriteFrame ()

Public Attributes

ImagemFrameImage
int mAnchorX
int mAnchorY
Uint mWidth
Uint mHeight
Uint mFrameDelay

Detailed Description

Contains all information necessary for animation frames of a Sprite.

Note:
Opted to use a struct instead of a class as all members are publicly exposed.

Constructor & Destructor Documentation

Sprite::spriteFrame::spriteFrame ( Image src,
int  x,
int  y,
int  w,
int  h,
int  aX,
int  aY,
int  d 
)

Constructor

Parameters:
src A pointer to a source Image to copy from.
x X-Coordinte of the area to copy from the source Image object.
y Y-Coordinte of the area to copy from the source Image object.
w Width of the area to copy from the source Image object.
h Height of the area to copy from the source Image object.
aX X-Axis of the Anchor Point for this spriteFrame.
aY Y-Axis of the Anchor Point for this spriteFrame.
d Length of time milliseconds to display this spriteFrame during animation playback.
Sprite::spriteFrame::spriteFrame ( const spriteFrame spriteframe  ) 

Copy Constructor

Sprite::spriteFrame::~spriteFrame (  ) 

Free memory allocated for the sprite frame.


Member Function Documentation

Sprite::spriteFrame & Sprite::spriteFrame::operator= ( const spriteFrame rhs  ) 

Assignment Operator


Member Data Documentation


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines