#include <PSPFAnimationSheet.h>
Inherits PSPFAnimation.
Public Member Functions | |
PSPFAnimationSheet (PSPFImage *Image) | |
PSPFAnimationSheet. | |
virtual | ~PSPFAnimationSheet () |
~PSPFAnimationSheet | |
void | addFrame (unsigned short iFrame, unsigned int iTime, bool bMirror=false) |
addFrame | |
void | setPos (int pX, int pY) |
setPos | |
void | setScale (int sX, int sY) |
setScale | |
void | setPivot (int pX, int pY) |
setPivot | |
void | setAngle (int ang) |
setAngle | |
void | Draw () |
Draw. | |
void | DrawXY (int pX, int pY) |
DrawXY. | |
void | Update (unsigned long mCount) |
Update. | |
int | getPosX () |
getPosX | |
int | getPosY () |
getPosY | |
int | getSizeX () |
getSizeX | |
int | getSizeY () |
getSizeY | |
int | getPivotX () |
getPivotX | |
int | getPivotY () |
getPivotY | |
int | getAngle () |
getAngle | |
int | getScaleX () |
getScaleX | |
int | getScaleY () |
getScaleY |
PSPFAnimationSheet::PSPFAnimationSheet | ( | PSPFImage * | Image | ) |
This method creates an AnimationSheet. AnimationShet and a class that create an animation through an image with many frames inside. It receive an instance of PSPFImage, that should be configured in the spreadsheet format. For more details of some methods, verify PSPFGraphic and PSPFAnimation.
Image | Instance of an image with the configured format. |
virtual PSPFAnimationSheet::~PSPFAnimationSheet | ( | ) | [virtual] |
~PSPFAnimationSheet
Destruct PSPFAnimationSheet
void PSPFAnimationSheet::addFrame | ( | unsigned short | iFrame, | |
unsigned int | iTime, | |||
bool | bMirror = false | |||
) |
addFrame
This method allows add a new animation frame For that, it is necessary spritesheet´s frame and time of duration to be pass.
iFrame | Frame number in ImageSheet. | |
iTime | Time of duration, in mileseconds, of the frame. | |
bMirror | Define if the frame will be drawn mirrored or not. |
void PSPFAnimationSheet::setPos | ( | int | pX, | |
int | pY | |||
) | [virtual] |
setPos
permit to define the position of the graphc pivot. Should be specified the coordinates X and Y as parameters. The screen of PSP possesses the resolution of 480x272. The position is used to draw the graphic in the screen.
pX | Pivot position in X. | |
pY | Pivot position in Y. |
getPosY Function that return the position Y of the graph.
Reimplemented from PSPFAnimation.
void PSPFAnimationSheet::setScale | ( | int | sX, | |
int | sY | |||
) | [virtual] |
setScale
This method permits the graphic to be scale. enough to inform the new sizes. The original size won't be altered, just as it will be drawn.
sX | Size in X. | |
sY | Size in Y. |
getScaleY Function that return the image size scaled in Y.
Reimplemented from PSPFAnimation.
void PSPFAnimationSheet::setPivot | ( | int | pX, | |
int | pY | |||
) | [virtual] |
setPivot
Define the graphc pivot. The pivot and the point of graphc reference. This point is used for the displacement operations and graphc rotation. Its is relative the position (0,0) of the graph.
pX | Pivot Position X. | |
pY | Pivot Position Y. |
getPivotY Function that return the pivot position in Y.
Reimplemented from PSPFAnimation.
void PSPFAnimationSheet::setAngle | ( | int | ang | ) | [virtual] |
setAngle
This function defines the grephc angle. Positive values rotate the graph in the counterclockwise sense, and value negative in the hourly sense.
ang | Angle of graphc rotation. |
Reimplemented from PSPFAnimation.
void PSPFAnimationSheet::Draw | ( | ) | [virtual] |
Draw.
This function draws the graph in the screen, in agreement with the defined values previously.
Reimplemented from PSPFAnimation.
void PSPFAnimationSheet::DrawXY | ( | int | pX, | |
int | pY | |||
) | [virtual] |
DrawXY.
draw the graph in the screen, in the informed position for the parameters. Just the attribute of class position and ignored.
pX | Position X | |
pY | Position Y |
Reimplemented from PSPFAnimation.
void PSPFAnimationSheet::Update | ( | unsigned long | mCount | ) | [virtual] |
Update.
Update the animation. And through this method that is made the animation.
mCount | current time application. |
Reimplemented from PSPFAnimation.
int PSPFAnimationSheet::getPosX | ( | ) | [virtual] |
getPosX
Function to get the graphc position in X.
Reimplemented from PSPFAnimation.
int PSPFAnimationSheet::getPosY | ( | ) | [virtual] |
getPosY
Function to get the graphc position in Y.
Reimplemented from PSPFAnimation.
int PSPFAnimationSheet::getSizeX | ( | ) | [virtual] |
getSizeX
Function to get the graphc size in X. The size returned, is the size. real graphc
Reimplemented from PSPFAnimation.
int PSPFAnimationSheet::getSizeY | ( | ) | [virtual] |
getSizeY
Function to get the graphc size in Y. The size returned, is the size. real graphc
Reimplemented from PSPFAnimation.
int PSPFAnimationSheet::getPivotX | ( | ) | [virtual] |
getPivotX
Return the pivot position in X, graphc relative.
Reimplemented from PSPFAnimation.
int PSPFAnimationSheet::getPivotY | ( | ) | [virtual] |
getPivotY
Return the pivot position in Y, graphc relative.
Reimplemented from PSPFAnimation.
int PSPFAnimationSheet::getAngle | ( | ) | [virtual] |
getAngle
Return the angle of graphc rotation.
Reimplemented from PSPFAnimation.
int PSPFAnimationSheet::getScaleX | ( | ) | [virtual] |
getScaleX
Return the graphc size to be scale in X. This function doesn't return the real size.
Reimplemented from PSPFAnimation.
int PSPFAnimationSheet::getScaleY | ( | ) | [virtual] |
getScaleY
Return the graphc size to be scale in Y. This function doesn't return the real size.
Reimplemented from PSPFAnimation.