24 for (i = 0; i < 4; i++) {
36 for (i = 0; i < 4; i++) {
59 { 832, 0 }, { 896, 0 }, { 960, 0 }, { 960, 256 },
121 if (control !=
NULL) {
127 control->
rot.
y = 0x800;
148 if (control !=
NULL) {
158 for (i = 0; i < 4; i++) {
FighterCache FIGHTSTG_fighterCache
the fighters' data, loaded one at a time
#define BATTLE_TASK_MODELS
the fighters'
#define BATTLE_LAYER_MODELS
FIGHTSTG.PRO: the battle.
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Heap HEAP
The functions that return what a call left in v0 (allocMemHigh, findTask) and the ones that take othe...
Model * FIGHTSTG_createIdlingModel(s32 file, s32 motionFile, Vec2 texPos, ModelControl *control)
A model whose motions go back to its idle motion (FIGHTSTG_createModel): the fighters'.
Vec2 FIGHTSTG_fighterTexPos[]
the fighters' models' texture places
void FIGHTSTG_faceModel(Models *task, s32 id)
Models.face: puts the model registered as ID at its side's place, facing the other side,...
ModelControl * FIGHTSTG_getModelControl(Models *task, s32 id)
Models.get: the control of the model registered as ID, or NULL.
s32 FIGHTSTG_getModelFighter(Models *task, s32 id)
Models.getFighter: the fighter of the model registered as ID, or 0.
Models * FIGHTSTG_createModels(void)
Creates the fighters' models (Models), with no fighters yet.
void FIGHTSTG_addFighterModel(Models *task, s32 id, s32 fighter, s32 visible)
Models.add: replaces the model registered as ID with FIGHTER's, in a free slot with that slot's textu...
s32 FIGHTSTG_findFreeModelSlot(Models *task)
A free fighter model slot, or -1.
void FIGHTSTG_updateModels(Models *task)
The fighters' models' task: nothing to do but start.
s32 FIGHTSTG_findModelSlot(Models *task, s32 id)
The slot of the fighter model registered as ID, or -1.
void FIGHTSTG_setModelId(Models *task, s32 id, s32 newId)
Models.setId: registers the model ID as NEWID instead, removing the one that had it.
void FIGHTSTG_removeFighterModel(Models *task, s32 id)
Models.remove: kills the model registered as ID and frees its slot.
void FIGHTSTG_setModelIdleMotion(Models *task, s32 id, s32 motion)
Models.setIdleMotion.
FighterInfo *(* getInfo)(s32 id)
A fighter's entry in its file, from FIGHTSTG_fighterCache.funcs.getInfo.
s16 distance
how far past 0x1400 from the middle it stands
void(* zero)(void *ptr, s32 size)
What drives a Model, owned by whoever created it.
s32 active
in the Models task's list
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 motion
the motion to play
s32 fighter
the Models task's
void(* setState)(struct Model *task, s32 state)
The Models task's children: a removed model stays until it is gone.
The fighters' models (FIGHTSTG_createModels), registered as BATTLE_TASK_MODELS: up to four,...
void(* remove)(struct Models *task, s32 id)
void(* setId)(struct Models *task, s32 id, s32 newId)
void(* setIdleMotion)(struct Models *task, s32 id, s32 motion)
void(* face)(struct Models *task, s32 id)
ids under 0x10 are one side
void(* add)(struct Models *task, s32 id, s32 fighter, s32 visible)
void(* nextState)(struct Models *task)
s32(* getFighter)(struct Models *task, s32 id)
ModelControl *(* get)(struct Models *task, s32 id)
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.