15 drawer.
draw(sheet, 0x2B, 0xA7, 0x8F);
16 if (task->
tech != 0) {
17 drawer.
draw(sheet, 2, 0xA7, 0xB8);
18 drawer.
draw(sheet, 0x29, 0xA3, 0x21);
26 for (i = 0; i < 4; i++) {
34 for (i = 0; i < 4; i++) {
45 for (i = 0; i < task->
count; i++) {
52 for (i = 0; i < 4; i++) {
82 if (task->
tech != 0) {
91 }
else if (active->
hp <= 0 || other->
hp <= 0) {
104 for (i = 0; i < 5; i++) {
109 for (i = 0; i < 4; i++) {
119 { 4, 168, 147, 19, 36, 167, 146, 19 },
120 { 2, 168, 166, 19, 34, 167, 165, 19 },
124 0xAC, 0xD8, 0xD9, 0xFB,
138 for (i = 0; i < 3; i++) {
139 if (task->
slots[i] >= 3) {
234 switch (task->
state) {
244 switch (task->
step) {
272 if (pressed & (1 <<
PAD_R1)) {
273 if (++task->
page == 3) {
279 if (pressed & (1 <<
PAD_L1)) {
280 if (--task->
page < 0) {
293 switch (task->
step) {
318 if (pressed & (1 <<
PAD_R1)) {
319 if (++task->
page == 3) {
325 if (pressed & (1 <<
PAD_L1)) {
326 if (--task->
page < 0) {
Battle FIGHTSTG_battle
the battle: its fighters, speed and drawing functions
#define FIGHTER_NO_SWITCH
can't switch out or run away (TECH_EFFECT_NO_SWITCH)
#define FIGHTER_NO_DIGIVOLVE
can't digivolve or use a switch-in technique (TECH_EFFECT_NO_DIGIVOLVE)
#define FIGHTER_ASLEEP
can't act or run away; a hit may wake it up
MenuCursor * FIGHTSTG_createCursor(CursorLayout *layout)
Creates a menu cursor laid out by layout.
#define BATTLE_LAYER_MENUS
the HUD, the menus and the messages
FIGHTSTG.PRO: the battle.
DigimonData DIGIMON_DATA[55]
55 entries: the 52 Digimon, then three placeholders (0x1D4-0x1D6)
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...
#define TEXT_BATTLE_MENU
MFIGHT: WFIGHTMN's.
#define TEXT_DIGIMON_NAMES
DIGNAM.
#define FILE_BATTLE_MENU
The battle menu's files (WFIGHTMN, WFIGHTTS): FILE_BATTLE_IMAGES is an archive whose entries go throu...
FileCache FILE_CACHE
The file cache.
DigimonData *(* GET_DIGIMON)(s32 id)
getDigimon for the overlays, in the small data (.sdata) between game/items.c's and file/file_table....
TechData TECHS[443]
The techniques, from 1: technique n is TECHS[n - 1].
PadState PAD
Controller input: cleared by initPad, then the methods.
PartnerInfo * FIGHTSTG_createPartnerInfo(s32 partner, s32 page, s32 slot)
Shows page page about the partner in slot (0 for itself)
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define SOUND_MENU_CONFIRM
SYSTEM07.
#define SOUND_MENU_CANCEL
SYSTEM01.
#define SOUND_MENU_MOVE
SYSTEM06.
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
One of the battle's fighters, three on each side (WFIGHTMN's BattleUnit): a partner's HP and MP go ba...
u8 temporary
id is a temporary Digimon
s16 id
the Digimon (DIGIMON_DATA)
s32 active[2]
each side's fighter
BattleFighter fighters[2][3]
A menu cursor's layout, which FIGHTSTG_createCursor copies into its task: a highlight bar over count ...
Digimon definition (DIGIMON_DATA, 52 of them; the first 8 are the partners)
u8 nameId
string in file 0x4F
u8 pairPartner
the Digimon (from 1) it does pairTech with, 0 for none
u16 pairTech
its pair technique, with pairPartner
void *(* getEntry)(u32 fileAndIndex)
s32(* getPartyMember)(u32 index)
s32(* getPartnerSlots)()
(partner, s16 *out): the count
s32(* getPressed)(s32 pad)
void(* setState)(struct PartnerInfo *task, s32 state)
short(* playSound)(s32 id)
returns the voice of a key-on
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
void(* setLayerId)()
(id, depth)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
void(* setPalette)(struct TextWindow *obj, u8 arg)
void(* setRightAlign)()
no prototype: callers would truncate u8 args
void(* setVisible)(struct TextWindow *obj, u8 arg)
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
#define PALETTE_WHITE
The text windows' palettes (TextWindow.palette, setPalette): rows of the font's CLUTs,...
#define PALETTE_GREY
what is unavailable
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)