13 poly->r0 = task->
level;
14 poly->g0 = task->
level;
15 poly->b0 = task->
level;
19 poly->x3 = poly->x1 = 320;
20 poly->x2 = poly->x0 = 0;
21 poly->y1 = poly->y0 = 0;
22 poly->y3 = poly->y2 = 240;
24 mode = (DR_TPAGE *)(poly + 1);
25 SetDrawTPage(mode, 0, 1, 0xA0);
35 switch (task->
state) {
44 if (task->
level >= 0xFF) {
52 if (task->
level < 0) {
65 task->
speed = 0xFF / frames;
73 task->
speed = 0xFF / frames;
#define BATTLE_LAYER_FRONT
the fades, the flashes and the sprite effects over all
FIGHTSTG.PRO: the battle.
GfxState GFX
GFX: the graphics state and its methods.
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
s32(* getFrameTime)(void)
struct Layer *(* getLayer)(s32 id)
void(* setPrim)(void *next)
A drawing layer (GFX.funcs.createLayer): a DRAWENV with a pair of ordering tables,...
u_long *(* getOtEntry)(struct Layer *, s32 depth)
The white flash (FIGHTSTG_startWhiteFlash): fades the screen to white, and back once ended.
s32 level
added to the screen (white), 0-0xFF
void(* setState)(struct WhiteFlash *task, s32 state)
s32 speed
0xFF / the frames
void(* nextState)(struct WhiteFlash *task)
void(* nextSubstate)(struct WhiteFlash *task)
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
WhiteFlash * FIGHTSTG_startWhiteFlash(s32 frames)
Starts a white flash that whitens the screen over FRAMES.
void FIGHTSTG_drawWhiteFlash(WhiteFlash *task)
Draws the white flash: a full-screen quad of the task's level, added to the screen on layer BATTLE_LA...
void FIGHTSTG_updateWhiteFlash(WhiteFlash *task)
The white flash's task: brightens up to full white and holds it, then once ended (FIGHTSTG_endWhiteFl...
void FIGHTSTG_endWhiteFlash(WhiteFlash *task, s32 frames)
Fades the white flash back out over FRAMES.