19 if (index < task->count) {
24 drawer.
draw(sheet,
TECHS[tech - 1].icon + 0x37, 0x1D, 0x45 + i * 0xE);
31 drawer.
draw(sheet, 0x1F, 0x10, 0x9F);
34 drawer.
draw(sheet, 0x20, 0x90, 0x9F);
37 drawer.
draw(sheet, 0x2A, 8, 0x3E);
38 drawer.
draw(sheet, 0x29, 0xA3, 0x21);
39 drawer.
draw(sheet, 0x31, 0xB, 0xBC);
60 if (fighter->
mp < 100) {
62 }
else if (fighter->
mp < 1000) {
94 if (task->
count != 0) {
97 if (index > task->
count - 1) {
100 tech = task->
techs[index];
111 }
else if (fighter->
mp < mp) {
113 }
else if (tech & 0x8000) {
127 children[14].window->setPalette(children[14].window,
PALETTE_GREY);
128 children[15].window->setNumber(children[15].window, 0, mp);
129 children[15].window->setRightAlign(children[15].window, 1);
130 children[15].window->setPalette(children[15].window,
PALETTE_GREY);
134 children[15].window->setNumber(children[15].window, 0, mp);
135 children[15].window->setRightAlign(children[15].window, 1);
137 children[14].window->setPalette(children[14].window,
PALETTE_GREEN);
138 children[15].window->setPalette(children[15].window,
PALETTE_GREEN);
140 children[14].window->setPalette(children[14].window,
PALETTE_WHITE);
141 children[15].window->setPalette(children[15].window,
PALETTE_WHITE);
164 for (i = 0; i < slots; i++) {
167 for (j = 0; j < 6; j++) {
177 for (j = 0; j < task->
count; j++) {
189 for (j = 0; j < 10; j++) {
193 for (i = 0; i < slots; i++) {
195 for (j = 0; j < 6; j++) {
202 for (j = 0; j < count; j++) {
204 for (i = 0; i < task->
count; i++) {
218 if (task->
count != 0) {
225 if (task->
count != 0) {
232#if VERSION_EU || VERSION_JP
267 switch (task->
state) {
293 if (pressed & (1 <<
PAD_L1)) {
294 if (--task->
page < 0) {
297 }
else if (pressed & (1 <<
PAD_R1)) {
303 if (page != task->
page) {
309 if (task->
count != 0) {
319 if (active->
mp >= mp) {
Battle FIGHTSTG_battle
the battle: its fighters, speed and drawing functions
BattleFuncs FIGHTSTG_battleFuncs
the battle's stats and the functions that compute with them
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 TEXT_SKILL_NAMES
SKLNAM.
#define FILE_BATTLE_MENU
The battle menu's files (WFIGHTMN, WFIGHTTS): FILE_BATTLE_IMAGES is an archive whose entries go throu...
#define TEXT_SKILL_INFO
SKLINF.
#define FILE_MENU_SPRITES
Files the engine loads by number.
FileCache FILE_CACHE
The file cache.
#define SKILL_MARKED
marked in the lab (STGDGLAB_updateSkillPanel)
#define SKILL_ID
PartnerEntry.skills.
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.
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(* getTechCost)(u8 side, s32 id)
s32 active[2]
each side's fighter
BattleFighter fighters[2][3]
Digimon definition (DIGIMON_DATA, 52 of them; the first 8 are the partners)
u16 skills[7]
[1]-[6] are learnt at skillLevels
void *(* getEntry)(u32 fileAndIndex)
s32(* getPartnerEntry)()
-1 if it hasn't the Digimon
s32(* getPartyMember)(u32 index)
s32(* getPartnerSlots)()
(partner, s16 *out): the count
s32(* getPressed)(s32 pad)
s16 skills[6]
SKILL_ID and the flags below, 0 for none.
s16 id
FIRST_ENTRY_ID and up.
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_DARK_BLUE
#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)