37 SetDrawMove(prim, &rect, pos.
x, pos.
y);
51 switch (task->
state) {
89 frame = task->
time % 18 / 6;
93 for (i = 0; i < 2; i++) {
101 for (i = 2; i < 16; i++) {
131 for (i = 0; i < 16; i++) {
134 for (i = 0; i < 16; i++) {
135 if (rects[i].x == 0xFF) {
138 if (rects[i].w != 0) {
FighterCache FIGHTSTG_fighterCache
the fighters' data, loaded one at a time
Battle FIGHTSTG_battle
the battle: its fighters, speed and drawing functions
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...
void FIGHTSTG_moveFacePart(Face *task, DR_MOVE *prim, s32 part, s32 frame)
Fills prim to copy part's frame of the face's texture over the part, in VRAM.
s32 FIGHTSTG_getEyesFrame(Face *task)
The eyes' frame for the model's motion: 2 (closed) for motions 4 to 11, 1 for 2, else 0 (open)
void FIGHTSTG_updateFace(Face *task)
A fighter's face task: each frame, copies the eyes' frame (blinking at random while open) and the oth...
Face * FIGHTSTG_createFace(Model *model, s32 fighter)
Creates the face of fighter's model, with its parts (FIGHTSTG_fighterCache.getFace); none for fighter...
#define SCREEN_LAYER
The layer over the whole screen that most modes create first and draw their menus on (FIELDSTG and ST...
s32 frames
since the last update
A part of a fighter's face (its eyes, then up to 14 more) and where its three frames are in its textu...
A model's face (FIGHTSTG_createFace, the model's first child): the eyes blink (or close for some moti...
void(* setState)(struct Face *task, s32 state)
void(* nextState)(struct Face *task)
struct FaceRect *(* getFace)(s32 fighter)
up to an x of 0xFF
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)
A 3D model (FIGHTSTG_createModel), registered with id 0x11: a tree of bones, each drawn by a Mesh chi...
Vec2 texPos
where its textures go in VRAM
s32(* next)(void)
0 to RANDOM_COUNT - 1
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find