14 color[0] = task->
color.vx;
15 color[1] = task->
color.vy;
16 color[2] = task->
color.vz;
21 if (task->
bg.vx != 0 || task->
bg.vy != 0 || task->
bg.vz != 0) {
32 0xA004E03C, 0xA004E0BD, 0xA004E13E, 0xA004E1BF,
33 0xA004E240, 0xA004E2C1, 0xA004E342, 0xA004E3C3,
53 for (i = 0; i < 8; i++) {
90 if (task->
fade > 0x1000) {
121 switch (task->
state) {
141 if (children[0]->state ==
TASK_RUN) {
153 if (task->
fade == 0x1000) {
172 if (task->
fade == 0x1000) {
190 if (task->
stage !=
id) {
#define FILE_FIGHT_STAGES
The fight stages, the battle's backgrounds: WFIGHTTS lists them as MFSTG001-027.
#define BATTLE_LAYER_STAGE
#define BATTLE_TASK_LIGHTS
#define BATTLE_TASK_STAGE
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.
#define SCREEN_LAYER
The layer over the whole screen that most modes create first and draw their menus on (FIELDSTG and ST...
InterpFuncs FIGHTSTG_interp
the functions that go between values
Model * FIGHTSTG_createPlainModel(s32 file, s32 motionFile, Vec2 texPos, ModelControl *control)
A model whose motions just end (FIGHTSTG_createModel)
TaskRegistry TASK_REGISTRY
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
s32 FIGHTSTG_getStageMotionsFile(s32 id)
The file of fight stage ID's motions.
static void startStageFadeOut(FightStage *task, FightStageInfo *stages)
Sets the fade of the model's color and the old stage's background out to black.
void FIGHTSTG_updateStage(FightStage *task, Model **children)
The fight stage's task: loads the stage's model, starts its music and fades in its lights,...
s32 FIGHTSTG_randomStage(void)
A random fight stage, 1-27.
static void fadeInStageLights(FightStage *task)
Fades the stage's lights in.
static void startStageFadeIn(FightStage *task, FightStageInfo *stages)
Sets the fade of the model's color and the background in from black.
const Vec2 FIGHTSTG_stageTexPos
static void advanceStageFade(FightStage *task)
Moves the fade on by the frame's time, up to its end (0x1000).
void FIGHTSTG_setStage(FightStage *task, s32 id, s32 fadeOutTime, s32 fadeInTime)
FightStage.setStage: changes to stage ID, fading the old one out over FADEOUTTIME and the new one in ...
void FIGHTSTG_fadeStage(FightStage *task, Model **children)
Sets the stage model's color and SCREEN_LAYER's background to their fades' current values (a black ba...
s32 FIGHTSTG_stageMusic[8]
the fight stages' music (FightStageInfo.music), as sound ids
FightStage * FIGHTSTG_createStage(s32 id, s32 fadeInTime)
Creates the fight stage (id 0x15), which loads stage id and fades it in over fadeInTime.
static void prepareStageModel(FightStage *task, Model **children, FightStageInfo *stages)
Once the stage's model is in: turns off the bounds check of the stage's listed bones and starts the m...
A fight stage, in FILE_FIGHT_STAGES.
s32 model
file << 16 | index
s32 music
an index in FIGHTSTG_stageMusic, or -1
u8 noBoundsBones[8]
bones given to the model's setBoneNoBoundsCheck, up to a 0
The fight stage (FIGHTSTG_createStage), registered as BATTLE_TASK_STAGE: its model,...
void(* setStage)(struct FightStage *task, s32 stage, s32 fadeOutTime, s32 fadeInTime)
SVECTOR colorFrom
the model's
void(* nextSubstate)(struct FightStage *task)
void(* setState)(struct FightStage *task, s32 state)
void(* nextState)(struct FightStage *task)
SVECTOR bgFrom
SCREEN_LAYER's background.
void(* request)(s32 file)
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(* setBgColor)()
no prototype: callers would truncate u8 args
The stage lights (FIGHTSTG_createLights), registered as BATTLE_TASK_LIGHTS: set puts a light set,...
void(* fade)(struct Lights *task, LightSet *from, LightSet *to, s32 time)
from: NULL for the current
LightSet *(* getStageLights)(struct Lights *task, s32 stage)
s32 wireframe
they are drawn as wireframe (Mesh.drawWireframe)
s32 layerId
the layer its meshes are drawn in
struct ModelControl::@3 layers[2]
the model is drawn once for each one enabled
s32 fighter
the Models task's
A 3D model (FIGHTSTG_createModel), registered with id 0x11: a tree of bones, each drawn by a Mesh chi...
void(* setColor)()
(model, mode, color): its meshes'
void(* setState)(struct Model *task, s32 state)
void(* setBoneNoBoundsCheck)()
s32(* next)(void)
0 to RANDOM_COUNT - 1
short(* playSound)(s32 id)
returns the voice of a key-on
void(* keyOff)(s32 id, s16 voice)
void *(* find)(s32 id, s32 key1, s32 key2)
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.