16 switch (task->
state) {
30 if (task->
t != 0x1000) {
32 if (task->
t < 0x1000) {
34 for (i = 0; i < 3; i++) {
72 for (j = 0; j < 3; j++) {
78 if (task->
t == 0x1000) {
105 task->
tStep = 0x1000 / time;
114 return &stages[stage].
lights;
#define FILE_FIGHT_STAGES
The fight stages, the battle's backgrounds: WFIGHTTS lists them as MFSTG001-027.
#define BATTLE_TASK_LIGHTS
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...
FileCache FILE_CACHE
The file cache.
InterpFuncs FIGHTSTG_interp
the functions that go between values
LightSet * FIGHTSTG_getStageLights(Lights *task, s32 stage)
Lights.getStageLights: fight stage STAGE's lights.
void FIGHTSTG_updateLights(Lights *task)
The stage lights' task: steps their fade, then sets the three flat lights and the ambient color for t...
Lights * FIGHTSTG_createLights(s32 layerId)
Creates the stage lights (id 0x13) for layer layerId.
void FIGHTSTG_fadeLights(Lights *task, LightSet *from, LightSet *to, s32 time)
Lights.fade: fades from FROM (NULL for the current lights) to TO over TIME.
void FIGHTSTG_setLights(Lights *task, LightSet *set)
Lights.set: switches to SET at once.
A fight stage, in FILE_FIGHT_STAGES.
s32(* getFrameTime)(void)
struct Layer *(* getLayer)(s32 id)
void(* lerp)(SVECTOR *from, SVECTOR *to, s32 t, SVECTOR *out)
t: 0-0x1000
A drawing layer (GFX.funcs.createLayer): a DRAWENV with a pair of ordering tables,...
void(* setKeepLightMatrix)()
A fight stage's lights: three flat lights and the ambient colour.
The stage lights (FIGHTSTG_createLights), registered as BATTLE_TASK_LIGHTS: set puts a light set,...
void(* nextSubstate)(struct Lights *task)
void(* fade)(struct Lights *task, LightSet *from, LightSet *to, s32 time)
from: NULL for the current
void(* setState)(struct Lights *task, s32 state)
void(* setSubstate)(struct Lights *task, s32 substate)
void(* set)(struct Lights *task, LightSet *set)
LightSet *(* getStageLights)(struct Lights *task, s32 stage)
void(* nextState)(struct Lights *task)
void * createTaskWithId(void(*update)(), s32 size, s32 childrenSize, s32 id)
Allocates a zeroed task of size bytes (header included) with room for childrenSize / 4 child tasks.