|
SGDK
A free and open development kit for the Sega Mega Drive
|
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 |
| s16 | animInd |
| s16 | frameInd |
| s16 | timer |
| s16 | x |
| s16 | y |
| s16 | depth |
| u16 | attribut |
| 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) |
| visibility | visibility information of current frame for each VDP sprite (max = 16) |
| spriteDef | Sprite definition pointer |
| onFrameChange | Custom callback on frame change event (see SPR_setFrameChangeCallback(..) method) |
| animation | Animation pointer cache (internal) |
| frame | AnimationFrame pointer cache (internal) |
| animInd | current animation index (internal) |
| frameInd | current frame animation index (internal) |
| timer | timer for current frame (internal) |
| x | current sprite X position on screen offseted by 0x80 (internal VDP position) |
| y | current sprite Y position on screen offseted by 0x80 (internal VDP position) |
| depth | current sprite depth (Z) position used for Z sorting |
| attribut | sprite specific attribut and allocated VRAM tile index (see TILE_ATTR_FULL() macro) |
| 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.