20 if (count <= 0 || next == 0) {
23 for (i = 0; i < count; i++) {
42 for (i = 0; i < task->
count; i++) {
43 if (task->
pairs[i] != 0) {
44 drawer.
draw(sheet, 0x30, 0x5A, 0x45 + i * 0x1F);
56 for (i = 0; i < task->
count; i++) {
79 for (i = 0; i < task->
count; i++) {
90 if (fighter->
hp == 0) {
112 switch (task->
state) {
118 for (i = 0; i < 3; i++) {
121 if (task->
canCancel != 0 && temporary == 0) {
127 if (task->
count > 0) {
155 if (fighter->
hp != 0) {
Battle FIGHTSTG_battle
the battle: its fighters, speed and drawing functions
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)
GfxState GFX
GFX: the graphics state and its methods.
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 FILE_BATTLE_MENU
The battle menu's files (WFIGHTMN, WFIGHTTS): FILE_BATTLE_IMAGES is an archive whose entries go throu...
#define FILE_MENU_SPRITES
Files the engine loads by number.
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....
PadState PAD
Controller input: cleared by initPad, then the methods.
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.
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]
u8 pairPartner
the Digimon (from 1) it does pairTech with, 0 for none
void *(* getEntry)(u32 fileAndIndex)
struct PartnerStats *(* getPartnerStats)(s32 partner)
s32(* getPartyMember)(u32 index)
s32(* getPartnerSlots)()
(partner, s16 *out): the count
s32(* getPressed)(s32 pad)
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(* setClutRow)()
(row)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
void(* setPalette)(struct TextWindow *obj, u8 arg)
s32(* isVisible)()
s32: callers don't truncate the result to a byte
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)