sgdk
_Sprite Struct Reference

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>

List of all members.

Public Attributes

u16 status
u16 visibility
const SpriteDefinitiondefinition
void(* onFrameChange )(struct _Sprite *sprite)
Animationanimation
AnimationFrameframe
FrameInfoframeInfo
s16 animInd
s16 frameInd
s16 seqInd
u16 timer
s16 x
s16 y
s16 depth
u16 attribut
u16 VDPSpriteIndex
VDPSpritelastVDPSprite
u16 lastNumSprite
u16 spriteToHide
u32 data
struct _Spriteprev
struct _Spritenext

Detailed Description

Sprite structure used by the Sprite Engine to store state for a sprite.
WARNING: always use the SPR_addSprite(..) method to allocate Sprite object.

Parameters:
statusInternal state and automatic allocation information (internal)
spriteDefSprite definition pointer
animationAnimation pointer cache (internal)
frameAnimationFrame pointer cache (internal)
animIndcurrent animation index (internal)
frameIndcurrent frame animation index (internal)
seqIndcurrent frame animation sequence index (internal)
timertimer for current frame (internal)
xcurrent sprite X position on screen
ycurrent sprite Y position on screen
depthcurrent sprite depth (Z) position used for Z sorting
attributsprite specific attribut and allocated VRAM tile index (see TILE_ATTR_FULL() macro)
visibilityvisibility information of current frame for each VDP sprite (max = 16)
VDPSpriteIndexindex of first allocated VDP sprite (0 when no yet allocated)
Number of allocated VDP sprite is defined by definition->maxNumSprite
frameNumSpritethe number of VDP sprite used by the current frame (internal)
lastVDPSpritePointer to last VDP sprite used by this Sprite (used internally to update link between sprite)
datathis is a free field for user data, use it for whatever you want (flags, pointer...)
prevpointer on previous Sprite in list
nextpointer on next Sprite in list

Used to manage an active sprite in game condition.


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