#include <singleFireSprite.h>
Inherits spriteObject.
Inheritance diagram for singleFireSprite:
Public Member Functions | |
singleFireSprite (spriteManager *newsm, u8 palID, const unsigned char *spriteData, vector< u8 > frames, u8 ticksPerFrame, u8 sizex, u8 sizey, u8 cx=16, u8 cy=16, s16 nx=OFFX, s16 ny=OFFY, u8 minIndex=0, u8 colorMode=1) | |
Create an 'effect' sprite that will play once by giving it raw sprite data. | |
singleFireSprite (spriteManager *newsm, u8 palID, u16 gfxID, vector< u8 > frames, u8 ticksPerFrame, u8 sizex, u8 sizey, u8 cx=16, u8 cy=16, s16 nx=OFFX, s16 ny=OFFY, u8 minIndex=0, u8 colorMode=1) | |
Create an 'effect' sprite that will play once by giving it a preloaded GFX id. | |
virtual void | updateSprite () |
Update the animation frame for this spriteObject and flag for deletion if the animation has finished. | |
virtual | ~singleFireSprite () |
singleFireSprites are designed to be low-maintenance effects that you can simply assign a graphic and animation frames to and leave the rest up to them. Once the animation is completed, they destroy themselves and the spriteManager handling them cleans up the rest.
Definition at line 35 of file singleFireSprite.h.
singleFireSprite::singleFireSprite | ( | spriteManager * | newsm, | |
u8 | palID, | |||
const unsigned char * | spriteData, | |||
vector< u8 > | frames, | |||
u8 | ticksPerFrame, | |||
u8 | sizex, | |||
u8 | sizey, | |||
u8 | cx = 16 , |
|||
u8 | cy = 16 , |
|||
s16 | nx = OFFX , |
|||
s16 | ny = OFFY , |
|||
u8 | minIndex = 0 , |
|||
u8 | colorMode = 1 | |||
) |
Create an 'effect' sprite that will play once by giving it raw sprite data.
newsm | the spriteManager which should manage this spriteObject | |
palID | ID of the pallete (preloaded by newsm) to use | |
spriteData | the raw sprite data to use to draw this spriteObject | |
frames | a vector of frame numbers, to be played in sequence | |
ticksPerFrame | the animation speed of the effect | |
sizex | memory constant to specify x size of the sprite | |
sizey | memory constant to specify y size of the sprite | |
cx | x sprite center relative to top left of the graphic | |
cy | y sprite center relative to top left of the graphic | |
nx | x screen position (in pixels) to play the effect | |
ny | y screen position (in pixels) to play the effect | |
minIndex | minimum sprite index in the spriteManager OAM array, which can be used as a depth hierachy | |
colorMode | colour mode, using PALib constants. 1 = 8bit. |
Definition at line 39 of file singleFireSprite.cpp.
References spriteObject::giveSprite(), spriteObject::setArbitraryAnim(), spriteObject::setFrame(), spriteObject::setLayer(), and spriteObject::setPallete().
Here is the call graph for this function:
singleFireSprite::singleFireSprite | ( | spriteManager * | newsm, | |
u8 | palID, | |||
u16 | gfxID, | |||
vector< u8 > | frames, | |||
u8 | ticksPerFrame, | |||
u8 | sizex, | |||
u8 | sizey, | |||
u8 | cx = 16 , |
|||
u8 | cy = 16 , |
|||
s16 | nx = OFFX , |
|||
s16 | ny = OFFY , |
|||
u8 | minIndex = 0 , |
|||
u8 | colorMode = 1 | |||
) |
Create an 'effect' sprite that will play once by giving it a preloaded GFX id.
newsm | the spriteManager which should manage this spriteObject | |
palID | ID of the pallete (preloaded by newsm) to use | |
gfxID | ID of the GFX (preloaded by newsm) to use | |
frames | a vector of frame numbers, to be played in sequence | |
ticksPerFrame | the animation speed of the effect | |
sizex | memory constant to specify x size of the sprite | |
sizey | memory constant to specify y size of the sprite | |
cx | x sprite center relative to top left of the graphic | |
cy | y sprite center relative to top left of the graphic | |
nx | x screen position (in pixels) to play the effect | |
ny | y screen position (in pixels) to play the effect | |
minIndex | minimum sprite index in the spriteManager OAM array, which can be used as a depth hierachy | |
colorMode | colour mode, using PALib constants. 1 = 8bit. |
Definition at line 69 of file singleFireSprite.cpp.
References spriteObject::giveGFX(), spriteObject::setArbitraryAnim(), spriteObject::setFrame(), spriteObject::setLayer(), and spriteObject::setPallete().
Here is the call graph for this function:
singleFireSprite::~singleFireSprite | ( | ) | [virtual] |
Definition at line 95 of file singleFireSprite.cpp.
void singleFireSprite::updateSprite | ( | ) | [virtual] |
Update the animation frame for this spriteObject and flag for deletion if the animation has finished.
Reimplemented from spriteObject.
Definition at line 85 of file singleFireSprite.cpp.
References spriteObject::arbitraryAnim, spriteObject::destroy(), and spriteObject::updateSprite().
Here is the call graph for this function: