Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
start.c
Go to the documentation of this file.
1/* FIGHTSTG's root task, which the mode starts (FIGHTSTG_start). */
2
4
5/* The mode's root task: loads WFIGHTTS (the battle test, with the mode's
6 argument) or WFIGHTMN and starts it, then runs the battle's update */
7void FIGHTSTG_updateRoot(Task *task, Task **children) {
8 switch (task->state) {
9 case TASK_INIT:
10 default:
11 if (GAME.funcs.getModeArg()) {
14 children[0] = WFIGHTTS_start();
15 } else {
17 children[0] = WFIGHTMN_start();
18 }
20 task->nextState(task);
21 break;
22 case TASK_RUN:
24 break;
25 case 2:
26 case TASK_KILL:
27 break;
28 }
29}
30
31/* The mode's entry point (MODE_ENTRY_POINTS): starts the root task */
33 return createTask(FIGHTSTG_updateRoot, sizeof(Task), sizeof(Task *));
34}
Battle FIGHTSTG_battle
the battle: its fighters, speed and drawing functions
Definition battle.c:16
Task * FIGHTSTG_start(void)
The mode's entry point (MODE_ENTRY_POINTS): starts the root task.
Definition start.c:32
void FIGHTSTG_updateRoot(Task *task, Task **children)
The mode's root task: loads WFIGHTTS (the battle test, with the mode's argument) or WFIGHTMN and star...
Definition start.c:7
Task * WFIGHTMN_start(void)
WFIGHTMN's entry point: creates the battle menu, and zeroes FIGHTSTG_battle's state and BATTLE_RESULT...
Definition menu.c:1455
FIGHTSTG.PRO: the battle.
#define FILE_WFIGHTMN
The sub-overlays (FIGHTSTG_updateRoot) and their entry points.
Definition battle_mode.h:33
#define FILE_WFIGHTTS
Definition battle_mode.h:34
Task * WFIGHTTS_start(void)
WFIGHTTS's entry point: creates the battle test, though with 0 bytes for its fields and for its child...
GameState GAME
The save data, the game mode and the methods.
Definition state.c:64
#define TASK_RUN
Definition task.h:35
#define TASK_KILL
Definition task.h:37
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Definition task.h:34
BattleSetup BATTLE_SETUP
Definition items.c:886
OverlayLoader OVERLAY_LOADER
Definition overlay.c:21
s32 FIGHTSTG_randomStage(void)
A random fight stage, 1-27.
Definition stage.c:200
s32 stage
the battle's fight stage
Definition game_state.h:383
void(* countFrames)(void)
Definition battle.h:242
void(* setSpeed)(s32 mode)
Definition battle.h:243
s32(* getModeArg)()
Definition game_state.h:20
GameFuncs funcs
Definition game_state.h:582
void(* loadSubOverlay)(s32 file)
Definition overlay.h:14
Any task, seen through its header.
Definition task.h:62
void(* nextState)(struct Task *task)
Definition task.h:63
s32 state
Definition task.h:63
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
Definition task.c:105