38 control = models->
get(models, task->
key2);
65 s32 is1D2 = task->
key1 == 0x1D2;
66 s32 is1D3 = task->
key1 == 0x1D3;
69 switch (task->
state) {
88 if (!is1D2 && !is1D3) {
107 switch (task->
step) {
113 models->
get(models, task->
key2 == 0 ? 0x10 : 0)->layers[0].enabled = 0;
129 if ((*children)->substate == 0) {
142 if (*children !=
NULL) {
149 if (is1D2 ? task->
step < 10 : task->
step < 120) {
156 entering = models->
get(models, task->
key2);
157 if (task->
weak != 0) {
162 models->
get(models, task->
key2 == 0 ? 0x10 : 0)->layers[0].enabled = 1;
FighterCache FIGHTSTG_fighterCache
the fighters' data, loaded one at a time
#define BATTLE_TASK_CAMERA
#define BATTLE_TASK_MODELS
the fighters'
#define BATTLE_TASK_STAGE
#define BATTLE_LAYER_MODELS
FIGHTSTG.PRO: the battle.
GfxState GFX
GFX: the graphics state and its methods.
#define FILE_ENTRANCE_1D2
What fighter 0x1D2's entrance (FIGHTSTG_updateEntrance) loads.
static void loadEntranceExtras(Entrance *task, s32 is1D2)
Loads what fighter 0x1D2 (its stage file) or 0x1D3 (its music, fading the current one out) brings,...
static void showEnteringModel(Entrance *task, Models *models, BattleCamera *camera)
Gives the loaded model the fighter's id and shows it in its entrance motion, with the camera on it.
Entrance * FIGHTSTG_startEntrance(s32 id, s32 side, s32 weak)
Starts a fighter's entrance: Digimon id on the player's side (side 0) or the enemy's.
static void applyEntranceExtras(FightStage *stage, s32 is1D2, s32 is1D3)
Fighter 0x1D2 changes the fight stage and 0x1D3 the music.
void FIGHTSTG_updateEntrance(Entrance *task, WhiteFlash **children)
A fighter's entrance: loads its model and adds it, then shows it behind a fade (FIGHTSTG_startWhiteFl...
FileCache FILE_CACHE
The file cache.
TaskRegistry TASK_REGISTRY
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define MUSIC_LAST_BOSS_2
LASTB_02: Lord Megadeath's second form (WSTAG820, fighter 0x1D3's entrance)
#define SOUND_PLAYER11
held until SOUND.keyOff
#define MUSIC_LAST_BOSS
LASTBOSS: Lord Megadeath's battle (WSTAG820)
The battle camera (FIGHTSTG_createBattleCamera), registered as BATTLE_TASK_CAMERA on a layer: set put...
CameraView *(* getFighterView)(struct BattleCamera *task, s32 id, s32 camera)
CameraView *(* getEnemyView)(struct BattleCamera *task)
void(* set)(struct BattleCamera *task, CameraView *view)
void(* fade)(struct BattleCamera *task, CameraView *from, CameraView *to, s32 time)
from: NULL for the current
s32 music
the battle's music
s32 stage
the battle's fight stage
A fighter's entrance (FIGHTSTG_startEntrance): key1 its Digimon, key2 its side.
void(* nextSubstate)(struct Entrance *task)
s32 weak
it comes in with motion 2 (WFIGHTMN_setIdleMotion's weak one)
void(* setState)(struct Entrance *task, s32 state)
struct FightStage * stage
struct BattleCamera * camera
void(* nextStep)(struct Entrance *task)
void(* nextState)(struct Entrance *task)
The fight stage (FIGHTSTG_createStage), registered as BATTLE_TASK_STAGE: its model,...
void(* setStage)(struct FightStage *task, s32 stage, s32 fadeOutTime, s32 fadeInTime)
FighterInfo *(* getInfo)(s32 id)
s32(* isLoading)(s32 file)
void(* request)(s32 file)
s32(* getFrameTime)(void)
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 motion
the motion to play
The fighters' models (FIGHTSTG_createModels), registered as BATTLE_TASK_MODELS: up to four,...
void(* setId)(struct Models *task, s32 id, s32 newId)
void(* face)(struct Models *task, s32 id)
ids under 0x10 are one side
void(* add)(struct Models *task, s32 id, s32 fighter, s32 visible)
ModelControl *(* get)(struct Models *task, s32 id)
short(* playSound)(s32 id)
returns the voice of a key-on
void *(* find)(s32 id, s32 key1, s32 key2)
The white flash (FIGHTSTG_startWhiteFlash): fades the screen to white, and back once ended.
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
WhiteFlash * FIGHTSTG_startWhiteFlash(s32 frames)
Starts a white flash that whitens the screen over FRAMES.
void FIGHTSTG_endWhiteFlash(WhiteFlash *task, s32 frames)
Fades the white flash back out over FRAMES.