11 switch (task->
state) {
GfxState GFX
GFX: the graphics state and its methods.
void drawStageEffect(StageEffect *task, void *arg, s32 idx)
Draws sprite idx of a StageEffect (the second, the one-shot one, 0x20 higher) on LAYER,...
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
#define FIELD_LAYER_MAP
the map, its objects and characters, and the menus
s32 isOnScreen(s32 x, s32 y, s32 w, s32 h)
Whether the rectangle (x, y, w, h) is in the view of the map's layer.
s32 stepAnimation(AnimState *anim, AnimFrame *frames, s32 once, s32 depth)
Steps ANIM through FRAMES by the frame time (at most 4) and returns its frame: at the end (frame 0xFF...
struct Layer *(* getLayer)(s32 id)
A drawing layer (GFX.funcs.createLayer): a DRAWENV with a pair of ordering tables,...
void(* addSortedCallback)()
A sprite at (x, y) from the stage's sheet (FieldState.sheetEntry) with an animated palette,...
AnimState anim
the one-shot animation
void(* nextState)(struct StageEffect *task)
void(* setSubstate)(struct StageEffect *task, s32 substate)
StageSprite sprites[2]
drawn at depth 6 and 4
void(* setState)(struct StageEffect *task, s32 state)
void updateStageEffect(StageEffect *task)
A StageEffect's update: its sprite with its palette animated (effectClutFrames) while it runs,...
AnimFrame effectClutFrames[]