sgdk
|
Sprite structure used by the Sprite Engine to store state for a sprite.
WARNING: always use the SPR_addSprite(..) method to allocate Sprite object.
More...
#include <sprite_eng.h>
Public Attributes | |
u16 | status |
u16 | visibility |
const SpriteDefinition * | definition |
void(* | onFrameChange )(struct _Sprite *sprite) |
Animation * | animation |
AnimationFrame * | frame |
FrameInfo * | frameInfo |
s16 | animInd |
s16 | frameInd |
s16 | seqInd |
u16 | timer |
s16 | x |
s16 | y |
s16 | depth |
u16 | attribut |
u16 | VDPSpriteIndex |
VDPSprite * | lastVDPSprite |
u16 | lastNumSprite |
u16 | spriteToHide |
u32 | data |
struct _Sprite * | prev |
struct _Sprite * | next |
Sprite structure used by the Sprite Engine to store state for a sprite.
WARNING: always use the SPR_addSprite(..) method to allocate Sprite object.
status | Internal state and automatic allocation information (internal) |
spriteDef | Sprite definition pointer |
animation | Animation pointer cache (internal) |
frame | AnimationFrame pointer cache (internal) |
animInd | current animation index (internal) |
frameInd | current frame animation index (internal) |
seqInd | current frame animation sequence index (internal) |
timer | timer for current frame (internal) |
x | current sprite X position on screen |
y | current sprite Y position on screen |
depth | current sprite depth (Z) position used for Z sorting |
attribut | sprite specific attribut and allocated VRAM tile index (see TILE_ATTR_FULL() macro) |
visibility | visibility information of current frame for each VDP sprite (max = 16) |
VDPSpriteIndex | index of first allocated VDP sprite (0 when no yet allocated) Number of allocated VDP sprite is defined by definition->maxNumSprite |
frameNumSprite | the number of VDP sprite used by the current frame (internal) |
lastVDPSprite | Pointer to last VDP sprite used by this Sprite (used internally to update link between sprite) |
data | this is a free field for user data, use it for whatever you want (flags, pointer...) |
prev | pointer on previous Sprite in list |
next | pointer on next Sprite in list |
Used to manage an active sprite in game condition.