12 if (children[0].task ==
NULL) {
15 if (children[1].task ==
NULL) {
18 if (children[2].task ==
NULL) {
21 if (children[6].task ==
NULL) {
169 if ((task->
result & 0xF) == 0) {
192 if (children[2].task ==
NULL) {
195 if (children[6].task ==
NULL) {
198 if (children[1].task ==
NULL) {
227 if (children[6].task ==
NULL) {
230 if (children[3].task ==
NULL) {
250 if ((task->
result & 0xF) == 0) {
272 switch (task->
state) {
281 switch (task->
step) {
285 for (i = 1; i < 7; i++) {
286 if (children[i].task !=
NULL) {
297 if (children[0].task ==
NULL) {
303 switch (task->
step) {
Battle FIGHTSTG_battle
the battle: its fighters, speed and drawing functions
#define BATTLE_TASK_PLAYER_TURN
FIGHTSTG.PRO: the battle.
CommandMenu * FIGHTSTG_createCommandMenu(s32 start, s32 *result)
Opens the battle's command menu with the cursor on start; *result gets the command (PlayerTurn....
GameState GAME
The save data, the game mode and the methods.
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
HpDisplay * FIGHTSTG_createHud(void)
Creates the battle HUD (FIGHTSTG_updateHud)
PartnerView * FIGHTSTG_createPartnerView(void)
Creates the partner view (FIGHTSTG_updatePartnerView), whose children are its two cameras.
void FIGHTSTG_updatePlayerTurn(PlayerTurn *task, PlayerTurnChild *children)
The player's turn: substate 2 opens the command menu (runCommandMenu) and then the menu of its comman...
static void runTechMenu(PlayerTurn *task, PlayerTurnChild *children)
Opens the technique menu and, once a technique is picked, makes using it the action.
static void runConfusedMenu(PlayerTurn *task, PlayerTurnChild *children)
Opens the confused menu with the partner view and the shot camera, and makes its pick the action.
static void runDigivolveMenu(PlayerTurn *task, PlayerTurnChild *children)
Opens the digivolve menu for the active partner and, once a Digimon is picked, makes digivolving the ...
static void runCommandMenu(PlayerTurn *task, PlayerTurnChild *children)
Opens the command menu with the HUD, the partner view and the shot camera, then goes to the menu of t...
static void runItemMenu(PlayerTurn *task, PlayerTurnChild *children)
Opens the item menu and, once an item is picked, makes using it the action.
static void runKnockOutSwitchMenu(PlayerTurn *task, PlayerTurnChild *children)
Opens the switch menu after a knockout and then the switch-in menu, and makes the switch the action.
void FIGHTSTG_setPlayerTurnStep(s32 substate)
Sets the player's turn's substate, while it runs (4 picks the next fighter)
s32 FIGHTSTG_isPlayerChoosing(void)
Whether the player's turn has a menu open (its substate isn't 0)
PlayerTurn * FIGHTSTG_startPlayerTurn(void)
Starts the player's turn (FIGHTSTG_updatePlayerTurn, id 0xE)
static void runSwitchMenu(PlayerTurn *task, PlayerTurnChild *children)
Opens the switch menu and then the switch-in menu with the pair technique for the Digimon picked,...
TaskRegistry TASK_REGISTRY
ShotCamera * FIGHTSTG_createShotCamera(void)
Starts the camera that plays lists of shots (FIGHTSTG_updateShotCamera)
s32 active[2]
each side's fighter
s32(* getPartyMember)(u32 index)
The player's turn (FIGHTSTG_updatePlayerTurn, BATTLE_TASK_PLAYER_TURN): the battle menu,...
s32 arg
the action's: the item, the technique, or the party slot of the partner that digivolves or switches o...
s32 action
what the turn does
void(* setStep)(struct PlayerTurn *task, s32 step)
s32 pairTech
FIGHTSTG_createPairSwitchMenu's technique, which the outgoing and incoming partners do together (acti...
s32 digimon
the Digimon a partner changes into, or the one it switches to
void(* nextStep)(struct PlayerTurn *task)
s32 result
the open menu's, -1 until it is done and -2 to go back
s32 switchLine
FIGHTSTG_createSwitchMenu's line, kept while the turn goes back to it.
void(* setCounter)(struct PlayerTurn *task, s32 counter)
void(* setSubstate)(struct PlayerTurn *task, s32 substate)
void(* nextState)(struct PlayerTurn *task)
void(* tickCounter)(struct PlayerTurn *task)
s32 command
the command menu's choice, a BATTLE_COMMAND_*
void *(* find)(s32 id, s32 key1, s32 key2)
Any task, seen through its header.
void(* setSubstate)(struct Task *task, s32 substate)
void(* setState)(struct Task *task, s32 state)
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.
One of FIGHTSTG_updatePlayerTurn's seven children: 0 the HUD, 1 the command or the confused menu,...
PartnerView * partnerView
ConfusedMenu * confusedMenu
CommandMenu * commandMenu
DigivolveMenu * digivolveMenu
SwitchInMenu * switchInMenu