25 switch (task->
state) {
41 control = models->
get(models, 0);
46 if (cameras[0] ==
NULL) {
#define BATTLE_LAYER_MENUS
the HUD, the menus and the messages
#define BATTLE_TASK_MODELS
the fighters'
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...
FighterCamera * FIGHTSTG_createCamera(s32 fighter, ModelControl *control)
Creates the camera of a fighter of the partner view, on control's model.
#define FILE_BATTLE_MENU
The battle menu's files (WFIGHTMN, WFIGHTTS): FILE_BATTLE_IMAGES is an archive whose entries go throu...
FileCache FILE_CACHE
The file cache.
RECT FIGHTSTG_fighterCameraRect
FIGHTSTG_updatePartnerView's layer.
void FIGHTSTG_drawPartnerViewFrame(PartnerView *task, FighterCamera **cameras)
Draws the frame around the partner view.
void FIGHTSTG_updatePartnerView(PartnerView *task, FighterCamera **cameras)
The partner view's task: makes layer 0x1009 beside the menus, then once the models are there shows th...
PartnerView * FIGHTSTG_createPartnerView(void)
Creates the partner view (FIGHTSTG_updatePartnerView), whose children are its two cameras.
TaskRegistry TASK_REGISTRY
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
A fighter's camera (FIGHTSTG_createCamera) on layer 0x1009, from its FighterInfo; frames counts the f...
void(* setState)(struct FighterCamera *task, s32 state)
void *(* getEntry)(u32 fileAndIndex)
s32(* destroyLayer)(s32 id)
struct Layer *(* createLayer)(RECT *rect, s32 otShift, s32 id)
void(* setOffset)()
no prototype: callers would truncate s16 args
What drives a Model, owned by whoever created it.
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
The fighters' models (FIGHTSTG_createModels), registered as BATTLE_TASK_MODELS: up to four,...
ModelControl *(* get)(struct Models *task, s32 id)
Shows the partner's model on layer 0x1009 (FIGHTSTG_createPartnerView), through the two FighterCamera...
void(* nextState)(struct PartnerView *task)
void(* nextSubstate)(struct PartnerView *task)
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
void(* setLayerId)()
(id, depth)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
void *(* find)(s32 id, s32 key1, s32 key2)
Any task, seen through its header.
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find