Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
battle_test.h
Go to the documentation of this file.
1#ifndef WFIGHTTS_H
2#define WFIGHTTS_H
3
4/* WFIGHTTS.PRO: the battle test, a debug menu. FIGHTSTG loads it (file 0x1FB)
5 in place of WFIGHTMN when the battle mode's argument is set. It picks
6 the fighters, their motions (ウェイト, ダメージ, ガード...), the effects
7 (MEFT00xx) and the fight stage (MFSTG0xx) from lists. */
8
10
11/* The fighters' and the cameras' lists (WFIGHTTS_fighterList, WFIGHTTS_cameraList) */
12typedef struct BattleTestList {
14 /* 0x50 */ s32 *side; /* 0 the partner, 1 the enemy, -1 for none */
15 /* 0x54 */ s32 *pick; /* set to 0 when it starts */
17
18/* The stage list's task */
19typedef struct BattleTestStageList {
21 /* 0x50 */ s32 *result; /* the stage picked, 1-55, or -1 */
23
24/* A fighter's motions, in the motion list (WFIGHTTS_motionList) */
25typedef struct BattleTestMotionList {
26 /* 0x00 */ s32 motions[0x3E]; /* the ones the fighter has */
27 /* 0xF8 */ s32 count;
28 /* 0xFC */ s32 shown; /* up to 14 */
30
31/* A fighter's effects, in the effect list (WFIGHTTS_effectList): each one
32 plus 1, or just a 0 for a fighter without any */
33typedef struct BattleTestEffectList {
34 /* 0x00 */ s32 effects[0x13];
35 /* 0x4C */ s32 count;
36 /* 0x50 */ s32 shown; /* up to 14 */
38
39/* Where the motion and the effect lists are: the fighters they were made
40 for, the list LEFT and RIGHT pick and the lists' cursors and scrolls */
41typedef struct BattleTestCursors {
42 /* 0x00 */ s32 fighter[2];
43 /* 0x08 */ s32 side;
44 /* 0x0C */ s32 cursor[2];
45 /* 0x14 */ s32 scroll[2];
47
48/* The fighter, motion and effect lists' windows, by list */
49typedef struct BattleTestWindows {
50 /* 0x00 */ TextWindow *windows[2][14];
52
53/* The camera list's windows: the partners' cameras and the enemies' */
54typedef struct CameraListWindows {
55 /* 0x00 */ TextWindow *partner[12];
56 /* 0x30 */ TextWindow *enemy[3];
58
59/* The motion list's task */
60typedef struct BattleTestMotions {
62 /* 0x050 */ BattleTestMotionList lists[2]; /* the partner's, the enemy's */
63 /* 0x250 */ s32 *side;
64 /* 0x254 */ s32 *motion; /* the motion picked */
66
67/* The effect list's task */
68typedef struct BattleTestEffects {
70 /* 0x50 */ BattleTestEffectList lists[2]; /* the partner's, the enemy's */
71 /* 0xF8 */ s32 *side;
72 /* 0xFC */ s32 *effect; /* the effect picked */
74
75/* The battle test (WFIGHTTS_battleTest). Its pages (substate): 0 the battle,
76 1 the fighters, 2 the camera, 3 the stage, 4 the motions, 5 the effects;
77 L1 and R1 go from one list to the next */
78typedef struct BattleTest {
80 /* 0x50 */ s32 page; /* the last list, which CROSS goes back to */
81 /* 0x54 */ s32 side; /* 0 the partner, 1 the enemy, -1 for none */
82 /* 0x58 */ s32 fighter;
83 /* 0x5C */ s32 camera; /* by the fighter's motion */
84 /* 0x60 */ s32 stage; /* 1-55, or -1 */
85 /* 0x64 */ s32 motion;
86 /* 0x68 */ s32 effect;
88
89/* The battle test's children */
90typedef struct BattleTestChildren {
91 /* 0x00 */ BattleChild task; /* what plays, NULL when done */
92 /* 0x04 */ PlayerTurn *commands; /* the player's turn (FIGHTSTG_startPlayerTurn) */
93 /* 0x08 */ BattleCamera *camera;
94 /* 0x0C */ Lights *lights;
95 /* 0x10 */ FightStage *stage;
101 /* 0x28 */ Models *models;
103
104/* The battle test's data, defined after its code */
105extern RECT WFIGHTTS_screen;
108extern char *WFIGHTTS_stageNames[];
109extern s16 WFIGHTTS_fighters[][2];
110extern DVECTOR WFIGHTTS_backPoints[4];
111extern CVECTOR WFIGHTTS_backColors[4];
117extern s32 WFIGHTTS_cameraPicks[2];
118extern char *WFIGHTTS_partnerCameraNames[];
119extern char *WFIGHTTS_enemyCameraNames[];
126extern char *WFIGHTTS_motionNames[];
127extern char *WFIGHTTS_effectNames[];
128
129void WFIGHTTS_initLayers(void);
130void WFIGHTTS_loadImages(void);
142
143#endif /* WFIGHTTS_H */
FIGHTSTG.PRO: the battle.
CameraView WFIGHTTS_enemyView
char * WFIGHTTS_stageNames[]
s16 WFIGHTTS_fighters[][2]
The partner and the enemy the battle test starts with, by the mode's argument.
void WFIGHTTS_initLayers(void)
Sets up the display and the battle test's layers.
Definition battle_test.c:4
void WFIGHTTS_cameraList(BattleTestList *task, CameraListWindows *windows)
The camera list: the partner's 12 cameras on the right and the enemy's 3 on the left (RIGHT and LEFT ...
char * WFIGHTTS_effectNames[]
s32 WFIGHTTS_fighterScrolls[2]
void WFIGHTTS_fighterList(BattleTestList *task, BattleTestWindows *windows)
The fighter list: the partners on the right and the enemies on the left, fourteen shown at a time (RI...
s32 WFIGHTTS_fighterCursors[2]
BattleTestMotions * WFIGHTTS_createMotionList(s32 *side, s32 *motion)
Starts the motion list, which sets *SIDE and *MOTION.
char * WFIGHTTS_partnerCameraNames[]
the cameras' names: the partner's 12 and the enemy's 3
void WFIGHTTS_loadImages(void)
Loads the battle test's images into VRAM.
Definition battle_test.c:9
BattleTestList * WFIGHTTS_createFighterList(s32 *side, s32 *pick)
Starts the fighter list, which sets *SIDE and *PICK.
BattleTestCursors WFIGHTTS_effectCursors
s32 WFIGHTTS_displayY
DVECTOR WFIGHTTS_backPoints[4]
the full-screen quad behind the lists, and its grey
void WFIGHTTS_effectList(BattleTestEffects *task, BattleTestWindows *windows)
The effect list, like the motion list: fills its lists (fillEffectLists), then CROSS sets the side an...
CVECTOR WFIGHTTS_backColors[4]
BattleTestList * WFIGHTTS_createCameraList(s32 *side, s32 *pick)
Starts the camera list, which sets *SIDE and *PICK.
s32 WFIGHTTS_stageCursor
s32 WFIGHTTS_displayX
where R2 with the pad moves the display to
s32 WFIGHTTS_cameraSide
the camera list's side, and each side's camera
void WFIGHTTS_battleTest(BattleTest *task, BattleTestChildren *children)
The battle test: sets up the battle (setUpBattle), then runs its pages.
BattleTestStageList * WFIGHTTS_createStageList(s32 *result)
Starts the stage list, which sets *RESULT.
s32 WFIGHTTS_cameraPicks[2]
s32 WFIGHTTS_fighterSide
the fighter list's side, and each side's cursor and scroll
char * WFIGHTTS_motionNames[]
the motions' and the effects' names, for their lists
void WFIGHTTS_motionList(BattleTestMotions *task, BattleTestWindows *windows)
The motion list: the partner's motions on the right and the enemy's on the left, fourteen shown at a ...
s32 WFIGHTTS_speedMode
the battle's speed (FIGHTSTG_battle.speed.mode), which SELECT cycles
BattleTestCursors WFIGHTTS_motionCursors
char * WFIGHTTS_enemyCameraNames[]
void WFIGHTTS_stageList(BattleTestStageList *task, TextWindow **windows)
The fight stage list: 14 of the 55 stages at a time (UP and DOWN, ten at a time with SQUARE held); it...
CameraView WFIGHTTS_partnerView
the views the camera list fades to, from the partner's and the enemy's cameras
BattleTestEffects * WFIGHTTS_createEffectList(s32 *side, s32 *effect)
Starts the effect list, which sets *SIDE and *EFFECT.
RECT WFIGHTTS_screen
The battle test's data, defined after its code.
s32 WFIGHTTS_stageScroll
signed int s32
Definition common.h:11
signed short s16
Definition common.h:9
#define TASK_HEADER(Type)
Definition task.h:39
The battle camera (FIGHTSTG_createBattleCamera), registered as BATTLE_TASK_CAMERA on a layer: set put...
Definition camera.h:66
The battle test's children.
Definition battle_test.h:90
BattleChild task
what plays, NULL when done
Definition battle_test.h:91
BattleTestList * fighters
Definition battle_test.h:96
FightStage * stage
Definition battle_test.h:95
BattleTestStageList * stages
Definition battle_test.h:98
BattleCamera * camera
Definition battle_test.h:93
BattleTestMotions * motions
Definition battle_test.h:99
PlayerTurn * commands
the player's turn (FIGHTSTG_startPlayerTurn)
Definition battle_test.h:92
BattleTestList * cameras
Definition battle_test.h:97
BattleTestEffects * effects
Where the motion and the effect lists are: the fighters they were made for, the list LEFT and RIGHT p...
Definition battle_test.h:41
A fighter's effects, in the effect list (WFIGHTTS_effectList): each one plus 1, or just a 0 for a fig...
Definition battle_test.h:33
The effect list's task.
Definition battle_test.h:68
BattleTestEffectList lists[2]
the partner's, the enemy's
Definition battle_test.h:70
s32 * effect
the effect picked
Definition battle_test.h:72
The fighters' and the cameras' lists (WFIGHTTS_fighterList, WFIGHTTS_cameraList)
Definition battle_test.h:12
s32 * side
0 the partner, 1 the enemy, -1 for none
Definition battle_test.h:14
s32 * pick
set to 0 when it starts
Definition battle_test.h:15
A fighter's motions, in the motion list (WFIGHTTS_motionList)
Definition battle_test.h:25
s32 motions[0x3E]
the ones the fighter has
Definition battle_test.h:26
The motion list's task.
Definition battle_test.h:60
BattleTestMotionList lists[2]
the partner's, the enemy's
Definition battle_test.h:62
s32 * motion
the motion picked
Definition battle_test.h:64
The stage list's task.
Definition battle_test.h:19
s32 * result
the stage picked, 1-55, or -1
Definition battle_test.h:21
The fighter, motion and effect lists' windows, by list.
Definition battle_test.h:49
TextWindow * windows[2][14]
Definition battle_test.h:50
The battle test (WFIGHTTS_battleTest).
Definition battle_test.h:78
s32 page
the last list, which CROSS goes back to
Definition battle_test.h:80
s32 camera
by the fighter's motion
Definition battle_test.h:83
s32 stage
1-55, or -1
Definition battle_test.h:84
s32 side
0 the partner, 1 the enemy, -1 for none
Definition battle_test.h:81
The camera list's windows: the partners' cameras and the enemies'.
Definition battle_test.h:54
TextWindow * partner[12]
Definition battle_test.h:55
TextWindow * enemy[3]
Definition battle_test.h:56
Where the battle camera looks from and to, as a GsRVIEW2 with the transform of its coordinate system.
Definition camera.h:49
The fight stage (FIGHTSTG_createStage), registered as BATTLE_TASK_STAGE: its model,...
Definition stage.h:38
The stage lights (FIGHTSTG_createLights), registered as BATTLE_TASK_LIGHTS: set puts a light set,...
Definition stage.h:59
The fighters' models (FIGHTSTG_createModels), registered as BATTLE_TASK_MODELS: up to four,...
Definition model.h:284
The player's turn (FIGHTSTG_updatePlayerTurn, BATTLE_TASK_PLAYER_TURN): the battle menu,...
Definition menu.h:32
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
Definition text.h:131
A turn's or a counterattack's one child, and what WFIGHTMN's battle menu waits for (NULL when it is d...
Definition task.h:16