|
Digimon World 3 decomp
The European version, SLES_039.36
|
#include "debug/battle_test.h"Go to the source code of this file.
Macros | |
| #define | WFIGHTTS_STR(offset) ((char *)WFIGHTTS_strings + (offset)) |
Functions | |
| void | WFIGHTTS_initLayers (void) |
| Sets up the display and the battle test's layers. | |
| void | WFIGHTTS_loadImages (void) |
| Loads the battle test's images into VRAM. | |
| static void | setUpBattle (BattleTest *task, BattleTestChildren *children) |
| Frees the files, loads the sound bank and plays the music, loads the images, then creates the battle's tasks and the mode's pair of fighters. | |
| static void | runPlayPage (BattleTest *task, BattleTestChildren *children) |
| Page 0: CROSS goes back to the last list, and R1, R2 and L2 play an entrance, a Digimon change and a camera turn when nothing plays. | |
| static void | runFighterList (BattleTest *task, BattleTestChildren *children) |
| Page 1: the fighter list; L1 and R1 go to the next and previous lists, and a fighter picked replaces the one of its side. | |
| static void | runCameraList (BattleTest *task, BattleTestChildren *children) |
| Page 2: the camera list; L1 and R1 go to the next and previous lists, and a camera picked of a side's fighter fades the view to it. | |
| static void | runStageList (BattleTest *task, BattleTestChildren *children) |
| Page 3: the stage list; L1 and R1 go to the next and previous lists, and a stage picked replaces the battle's. | |
| static void | runMotionList (BattleTest *task, BattleTestChildren *children) |
| Page 4: the motion list; L1 and R1 go to the next and previous lists, and a motion picked is given to the fighter of its side. | |
| static void | pickEffect (BattleTest *task, BattleTestChildren *children) |
| Page 5 once its list is open: L1 and R1 go to the next and previous lists, and an effect picked plays as a battle script of its side (0x12 as a hit effect) | |
| static void | moveDisplay (void) |
| With R2 held, the pad moves the display and START puts it back; without, sets the normal display mode. | |
| void | WFIGHTTS_battleTest (BattleTest *task, BattleTestChildren *children) |
| The battle test: sets up the battle (setUpBattle), then runs its pages. | |
| Task * | WFIGHTTS_start (void) |
| WFIGHTTS's entry point: creates the battle test, though with 0 bytes for its fields and for its children. | |
| 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 (RIGHT and LEFT pick the list, UP and DOWN the fighter, ten at a time with SQUARE held), the cursor's one blinking; CROSS sets the side and the fighter, TRIANGLE the side to -1. | |
| BattleTestList * | WFIGHTTS_createFighterList (s32 *side, s32 *pick) |
| Starts the fighter list, which sets *SIDE and *PICK. | |
| 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 pick the list, UP and DOWN the camera, ten at a time with R1 held); CROSS sets the side to 0 or 1 and the camera, TRIANGLE the side to -1. | |
| BattleTestList * | WFIGHTTS_createCameraList (s32 *side, s32 *pick) |
| Starts the camera list, which sets *SIDE and *PICK. | |
| 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 sets *result to the stage, 1-55, or to -1. | |
| BattleTestStageList * | WFIGHTTS_createStageList (s32 *result) |
| Starts the stage list, which sets *RESULT. | |
| 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 time (RIGHT and LEFT pick the list, UP and DOWN the motion, ten at a time with SQUARE held); CROSS sets the side and the motion plus 1, TRIANGLE the side to -1. | |
| BattleTestMotions * | WFIGHTTS_createMotionList (s32 *side, s32 *motion) |
| Starts the motion list, which sets *SIDE and *MOTION. | |
| static void | fillEffectLists (BattleTestEffects *task, BattleTestWindows *windows) |
| Fills both sides' lists with the effects their fighter has (only "none" without any) and creates their windows. | |
| static void | drawEffectNames (BattleTestEffects *task, BattleTestWindows *windows) |
| Draws both sides' effect names, the one under the cursor blinking. | |
| void | WFIGHTTS_effectList (BattleTestEffects *task, BattleTestWindows *windows) |
| The effect list, like the motion list: fills its lists (fillEffectLists), then CROSS sets the side and the effect, on any but a fighter's "none", while the names are drawn (drawEffectNames). | |
| BattleTestEffects * | WFIGHTTS_createEffectList (s32 *side, s32 *effect) |
| Starts the effect list, which sets *SIDE and *EFFECT. | |
Variables | |
| const char | WFIGHTTS_strings [0x9C0] |
| The strings of the tables below, as GCC emitted them: each table's last to first, and each padded to a word. | |
| RECT | WFIGHTTS_screen = { 0, 0, 320 , 240 } |
| The screen, for the layers. | |
| s16 | WFIGHTTS_fighters [][2] |
| The partner and the enemy the battle test starts with, by the mode's argument. | |
| DVECTOR | WFIGHTTS_backPoints [4] |
| the full-screen quad behind the lists, and its grey | |
| CVECTOR | WFIGHTTS_backColors [4] |
| s32 | WFIGHTTS_speedMode = 0 |
| the battle's speed (FIGHTSTG_battle.speed.mode), which SELECT cycles | |
| s32 | WFIGHTTS_fighterSide = 0 |
| the fighter list's side, and each side's cursor and scroll | |
| s32 | WFIGHTTS_fighterCursors [2] = { 0, 0 } |
| s32 | WFIGHTTS_fighterScrolls [2] = { 0, 0 } |
| s32 | WFIGHTTS_cameraSide = 0 |
| the camera list's side, and each side's camera | |
| s32 | WFIGHTTS_cameraPicks [2] = { 0, 0 } |
| char * | WFIGHTTS_partnerCameraNames [] |
| the cameras' names: the partner's 12 and the enemy's 3 | |
| char * | WFIGHTTS_enemyCameraNames [] |
| s32 | WFIGHTTS_stageCursor = 0 |
| s32 | WFIGHTTS_stageScroll = 0 |
| char * | WFIGHTTS_stageNames [] |
| char * | WFIGHTTS_motionNames [] |
| the motions' and the effects' names, for their lists | |
| char * | WFIGHTTS_effectNames [] |
| CameraView | WFIGHTTS_partnerView = { 0 } |
| the views the camera list fades to, from the partner's and the enemy's cameras | |
| s32 | WFIGHTTS_unused [3] = { 0, 0, 0 } |
| CameraView | WFIGHTTS_enemyView = { 0 } |
| s32 | WFIGHTTS_displayX = 0 |
| where R2 with the pad moves the display to | |
| s32 | WFIGHTTS_displayY = 0 |
| BattleTestCursors | WFIGHTTS_motionCursors = { { 0, 0 }, 0, { 0, 0 }, { 0, 0 } } |
| BattleTestCursors | WFIGHTTS_effectCursors = { { 0, 0 }, 0, { 0, 0 }, { 0, 0 } } |
| #define WFIGHTTS_STR | ( | offset | ) | ((char *)WFIGHTTS_strings + (offset)) |
Definition at line 1297 of file battle_test.c.
| void WFIGHTTS_initLayers | ( | void | ) |
Sets up the display and the battle test's layers.
< the battle camera's and the lights'
< the models' wireframe copies, in a Digimon change
< the HUD, the menus and the messages
< the fades, the flashes and the sprite effects over all
Definition at line 4 of file battle_test.c.
Referenced by setUpBattle().
| void WFIGHTTS_loadImages | ( | void | ) |
Loads the battle test's images into VRAM.
Definition at line 9 of file battle_test.c.
Referenced by setUpBattle().
|
inlinestatic |
Frees the files, loads the sound bank and plays the music, loads the images, then creates the battle's tasks and the mode's pair of fighters.
< BATL0000: the maps' random battles (AreaBattle, nearly all of them)
< BATL0000: the maps' random battles (AreaBattle, nearly all of them)
< the battle camera's and the lights'
< the battle camera's and the lights'
Definition at line 29 of file battle_test.c.
Referenced by WFIGHTTS_battleTest().
|
inlinestatic |
Page 0: CROSS goes back to the last list, and R1, R2 and L2 play an entrance, a Digimon change and a camera turn when nothing plays.
Definition at line 88 of file battle_test.c.
Referenced by WFIGHTTS_battleTest().
|
inlinestatic |
Page 1: the fighter list; L1 and R1 go to the next and previous lists, and a fighter picked replaces the one of its side.
Definition at line 118 of file battle_test.c.
Referenced by WFIGHTTS_battleTest().
|
inlinestatic |
Page 2: the camera list; L1 and R1 go to the next and previous lists, and a camera picked of a side's fighter fades the view to it.
Definition at line 152 of file battle_test.c.
Referenced by WFIGHTTS_battleTest().
|
inlinestatic |
Page 3: the stage list; L1 and R1 go to the next and previous lists, and a stage picked replaces the battle's.
Definition at line 205 of file battle_test.c.
Referenced by WFIGHTTS_battleTest().
|
inlinestatic |
Page 4: the motion list; L1 and R1 go to the next and previous lists, and a motion picked is given to the fighter of its side.
Definition at line 233 of file battle_test.c.
Referenced by WFIGHTTS_battleTest().
|
inlinestatic |
Page 5 once its list is open: L1 and R1 go to the next and previous lists, and an effect picked plays as a battle script of its side (0x12 as a hit effect)
Definition at line 265 of file battle_test.c.
Referenced by WFIGHTTS_battleTest().
|
inlinestatic |
With R2 held, the pad moves the display and START puts it back; without, sets the normal display mode.
Definition at line 296 of file battle_test.c.
Referenced by WFIGHTTS_battleTest().
| void WFIGHTTS_battleTest | ( | BattleTest * | task, |
| BattleTestChildren * | children | ||
| ) |
The battle test: sets up the battle (setUpBattle), then runs its pages.
Page 0 (runPlayPage) plays things on CROSS (back to the last list), R1, R2 and L2; the lists pick the fighters, the camera, the stage, a motion and an effect (runFighterList, runCameraList, runStageList, runMotionList, pickEffect). SELECT cycles WFIGHTTS_speedMode and R2 with the pad moves the display (moveDisplay)
< the HUD, the menus and the messages
Definition at line 322 of file battle_test.c.
Referenced by WFIGHTTS_start().
| Task * WFIGHTTS_start | ( | void | ) |
WFIGHTTS's entry point: creates the battle test, though with 0 bytes for its fields and for its children.
Definition at line 393 of file battle_test.c.
Referenced by FIGHTSTG_updateRoot().
| 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 (RIGHT and LEFT pick the list, UP and DOWN the fighter, ten at a time with SQUARE held), the cursor's one blinking; CROSS sets the side and the fighter, TRIANGLE the side to -1.
Match depends on the loop around the pad handling, whose breaks leave it early, and on each list having its own counter
< the HUD, the menus and the messages
< DIGNAM
< DIGNAM
Definition at line 403 of file battle_test.c.
Referenced by WFIGHTTS_createFighterList().
| BattleTestList * WFIGHTTS_createFighterList | ( | s32 * | side, |
| s32 * | pick | ||
| ) |
Starts the fighter list, which sets *SIDE and *PICK.
Definition at line 506 of file battle_test.c.
Referenced by runFighterList().
| 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 pick the list, UP and DOWN the camera, ten at a time with R1 held); CROSS sets the side to 0 or 1 and the camera, TRIANGLE the side to -1.
Match depends on the loop around the pad handling, whose breaks leave it early
< the HUD, the menus and the messages
< the HUD, the menus and the messages
Definition at line 520 of file battle_test.c.
Referenced by WFIGHTTS_createCameraList().
| BattleTestList * WFIGHTTS_createCameraList | ( | s32 * | side, |
| s32 * | pick | ||
| ) |
Starts the camera list, which sets *SIDE and *PICK.
Definition at line 605 of file battle_test.c.
Referenced by runCameraList().
| 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 sets *result to the stage, 1-55, or to -1.
< the HUD, the menus and the messages
Definition at line 616 of file battle_test.c.
Referenced by WFIGHTTS_createStageList().
| BattleTestStageList * WFIGHTTS_createStageList | ( | s32 * | result | ) |
Starts the stage list, which sets *RESULT.
Definition at line 680 of file battle_test.c.
Referenced by runStageList().
| 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 time (RIGHT and LEFT pick the list, UP and DOWN the motion, ten at a time with SQUARE held); CROSS sets the side and the motion plus 1, TRIANGLE the side to -1.
The cursors stay while the fighters do. Match depends on the loop around the pad handling, whose breaks leave it early
< the fighters'
< the HUD, the menus and the messages
Definition at line 693 of file battle_test.c.
Referenced by WFIGHTTS_createMotionList().
| BattleTestMotions * WFIGHTTS_createMotionList | ( | s32 * | side, |
| s32 * | motion | ||
| ) |
Starts the motion list, which sets *SIDE and *MOTION.
Definition at line 806 of file battle_test.c.
Referenced by runMotionList().
|
inlinestatic |
Fills both sides' lists with the effects their fighter has (only "none" without any) and creates their windows.
< the fighters'
< the HUD, the menus and the messages
Definition at line 816 of file battle_test.c.
Referenced by WFIGHTTS_effectList().
|
inlinestatic |
Draws both sides' effect names, the one under the cursor blinking.
Definition at line 868 of file battle_test.c.
Referenced by WFIGHTTS_effectList().
| void WFIGHTTS_effectList | ( | BattleTestEffects * | task, |
| BattleTestWindows * | windows | ||
| ) |
The effect list, like the motion list: fills its lists (fillEffectLists), then CROSS sets the side and the effect, on any but a fighter's "none", while the names are drawn (drawEffectNames).
Match depends on the loop around the pad handling, whose breaks leave it early
Definition at line 888 of file battle_test.c.
Referenced by WFIGHTTS_createEffectList().
| BattleTestEffects * WFIGHTTS_createEffectList | ( | s32 * | side, |
| s32 * | effect | ||
| ) |
Starts the effect list, which sets *SIDE and *EFFECT.
Definition at line 958 of file battle_test.c.
Referenced by WFIGHTTS_battleTest().
| const char WFIGHTTS_strings[0x9C0] |
The strings of the tables below, as GCC emitted them: each table's last to first, and each padded to a word.
The padding after a table's last string isn't zeros but what the assembler left there, which differs between the versions; the size leaves out the closing NUL
Definition at line 970 of file battle_test.c.
| RECT WFIGHTTS_screen = { 0, 0, 320 , 240 } |
The screen, for the layers.
The battle test's data, defined after its code.
Definition at line 1300 of file battle_test.c.
Referenced by WFIGHTTS_initLayers().
| s16 WFIGHTTS_fighters[][2] |
The partner and the enemy the battle test starts with, by the mode's argument.
Definition at line 1303 of file battle_test.c.
Referenced by setUpBattle().
| DVECTOR WFIGHTTS_backPoints[4] |
the full-screen quad behind the lists, and its grey
Definition at line 1308 of file battle_test.c.
Referenced by WFIGHTTS_battleTest().
| CVECTOR WFIGHTTS_backColors[4] |
Definition at line 1311 of file battle_test.c.
Referenced by WFIGHTTS_battleTest().
| s32 WFIGHTTS_speedMode = 0 |
the battle's speed (FIGHTSTG_battle.speed.mode), which SELECT cycles
Definition at line 1316 of file battle_test.c.
Referenced by WFIGHTTS_battleTest().
| s32 WFIGHTTS_fighterSide = 0 |
the fighter list's side, and each side's cursor and scroll
Definition at line 1318 of file battle_test.c.
Referenced by WFIGHTTS_fighterList().
| s32 WFIGHTTS_fighterCursors[2] = { 0, 0 } |
Definition at line 1319 of file battle_test.c.
Referenced by WFIGHTTS_fighterList().
| s32 WFIGHTTS_fighterScrolls[2] = { 0, 0 } |
Definition at line 1320 of file battle_test.c.
Referenced by WFIGHTTS_fighterList().
| s32 WFIGHTTS_cameraSide = 0 |
the camera list's side, and each side's camera
Definition at line 1322 of file battle_test.c.
Referenced by WFIGHTTS_cameraList().
| s32 WFIGHTTS_cameraPicks[2] = { 0, 0 } |
Definition at line 1323 of file battle_test.c.
Referenced by WFIGHTTS_cameraList().
| char* WFIGHTTS_partnerCameraNames[] |
the cameras' names: the partner's 12 and the enemy's 3
Definition at line 1325 of file battle_test.c.
Referenced by WFIGHTTS_cameraList().
| char* WFIGHTTS_enemyCameraNames[] |
Definition at line 1330 of file battle_test.c.
Referenced by WFIGHTTS_cameraList().
| s32 WFIGHTTS_stageCursor = 0 |
Definition at line 1333 of file battle_test.c.
Referenced by WFIGHTTS_stageList().
| s32 WFIGHTTS_stageScroll = 0 |
Definition at line 1334 of file battle_test.c.
Referenced by WFIGHTTS_stageList().
| char* WFIGHTTS_stageNames[] |
Definition at line 1335 of file battle_test.c.
Referenced by WFIGHTTS_stageList().
| char* WFIGHTTS_motionNames[] |
the motions' and the effects' names, for their lists
Definition at line 1352 of file battle_test.c.
Referenced by WFIGHTTS_motionList().
| char* WFIGHTTS_effectNames[] |
Definition at line 1370 of file battle_test.c.
Referenced by drawEffectNames().
| CameraView WFIGHTTS_partnerView = { 0 } |
the views the camera list fades to, from the partner's and the enemy's cameras
Definition at line 1379 of file battle_test.c.
Referenced by runCameraList().
| s32 WFIGHTTS_unused[3] = { 0, 0, 0 } |
Definition at line 1380 of file battle_test.c.
| CameraView WFIGHTTS_enemyView = { 0 } |
Definition at line 1381 of file battle_test.c.
Referenced by runCameraList().
| s32 WFIGHTTS_displayX = 0 |
where R2 with the pad moves the display to
Definition at line 1383 of file battle_test.c.
Referenced by moveDisplay().
| s32 WFIGHTTS_displayY = 0 |
Definition at line 1384 of file battle_test.c.
Referenced by moveDisplay().
| BattleTestCursors WFIGHTTS_motionCursors = { { 0, 0 }, 0, { 0, 0 }, { 0, 0 } } |
Definition at line 1385 of file battle_test.c.
Referenced by WFIGHTTS_motionList().
| BattleTestCursors WFIGHTTS_effectCursors = { { 0, 0 }, 0, { 0, 0 }, { 0, 0 } } |
Definition at line 1386 of file battle_test.c.
Referenced by drawEffectNames(), fillEffectLists(), and WFIGHTTS_effectList().