13 for (i = 0; i < 3; i++) {
20 for (i = 0; i < 2; i++) {
28 for (i = 0; i < 6; i++) {
31 for (i = 0; i < 7; i++) {
34 for (i = 0; i < 6; i++) {
60 for (i = 0; i < 3; i++) {
61 if (panel->
slots[i] > 0) {
76 for (i = 0; i < 3; i++) {
102 for (i = 0; i < 2; i++) {
131 for (i = 0; i < 6; i++) {
149 for (i = 0; i < 7; i++) {
156 for (i = 0; i < 13; i++) {
159 for (i = 0; i < 6; i++) {
181 for (i = 0; i < 6; i++) {
199 for (i = 0; i < 7; i++) {
206 for (i = 0; i < 13; i++) {
209 for (i = 0; i < 6; i++) {
210 if (data->
skills[i + 1] != 0) {
223 for (i = 0; i < 13; i++) {
226 for (i = 0; i < 6; i++) {
242 for (i = 0; i < 6; i++) {
245 for (i = 0; i < 7; i++) {
248 for (i = 0; i < 6; i++) {
320 for (i = 0; i < 6; i++) {
329 for (i = 0; i < 6; i++) {
330 tech = data->
skills[i + 1];
411 if (panel->
slot < 0) {
420 if (slot != panel->
slot) {
484 if (option != panel->
option) {
843 for (i = 0; i < 6; i++) {
846 if (panel->
tech == -1) {
871 if (panel->
tech < 0) {
879 if (panel->
tech >= 6) {
885 if (old != panel->
tech) {
947 switch (panel->
state) {
953 for (i = 0; i < 3; i++) {
954 if (panel->
slots[i] >= 4) {
DigimonData DIGIMON_DATA[55]
55 entries: the 52 Digimon, then three placeholders (0x1D4-0x1D6)
static void STSTATUS_closeDigivolvePanel(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Starts closing the panel: the title, the slots and the stats.
static void STSTATUS_chooseDigivolveSlot(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Choosing the partner or a slot: right and left move between them, up and down between the slots,...
void STSTATUS_updateDigivolvePanel(DigivolvePanel *panel, DigivolvePanelWindows *windows)
The digivolution panel's task: creates its windows and counts the partner's filled slots,...
static void STSTATUS_enterQuestionAgain(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Once the question's panel is in, shows the question and its cursor again.
static void STSTATUS_closeDigivolveQuestion(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Starts closing the question's panel, back to the slots.
static void STSTATUS_openEntryTechs(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Scrolls the stats; once up, starts the info panel.
static void STSTATUS_closeSlotsForQuestion(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Starts closing the slots' panel for the question about the slot.
static void STSTATUS_waitBattleMessage(DigivolvePanel *panel)
Cross takes the message away.
void STSTATUS_scrollTechList(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Moves the list to the panel's scroll position.
void STSTATUS_showTechCost(DigivolvePanel *panel, DigivolvePanelWindows *windows, s32 show)
Shows the cost of the technique under the list's cursor.
static void STSTATUS_openDigivolveTitle(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Once the title's panel is in, shows the title and starts the slots' panel.
void STSTATUS_showDigivolveChoices(DigivolvePanel *panel, DigivolvePanelWindows *windows, s32 show)
Shows or hides the question about the chosen slot: its Digimon's name, then to start battles as it (o...
static void STSTATUS_scrollUpForTechs(DigivolvePanel *panel)
Once the question's panel is closed, starts scrolling the stats up.
void STSTATUS_runDigivolvePanel(DigivolvePanel *panel, DigivolvePanelWindows *windows)
The panel's update: picks a slot, then shows its entry's techniques or makes the battle start as it.
static void STSTATUS_showBattleMessage(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Once the info panel is in, says whether the partner now digivolves in battle.
static void STSTATUS_openBattleMessage(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Scrolls the stats; once up, starts the info panel.
static void STSTATUS_answerDigivolveQuestion(DigivolvePanel *panel, DigivolvePanelWindows *windows)
The question: up and down move the cursor, cross makes the slot's entry the partner's battle digivolu...
static void STSTATUS_closeSlotsForPartnerTech(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Starts closing the slots' panel for the partner's own technique.
void STSTATUS_createDigivolveWindows(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Creates the digivolution panel's windows: the three slots, the question about a slot,...
static void STSTATUS_closeQuestionForTechs(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Starts closing the question's panel for the entry's techniques.
static void STSTATUS_enterSlotsAgain(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Once the slots' panel is in, shows the slots and the cursor, back to choosing a slot.
static void STSTATUS_endBattleMessage(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Once the stats' panel is closed, scrolls the stats back and starts the panel again.
void STSTATUS_drawDigivolvePanel(DigivolvePanel *panel)
Draws the panel's frames, the technique icons and the help arrow.
static void STSTATUS_showPartnerTech(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Once the info panel is in, puts the cursor on the partner's own technique (its seventh skill) and sho...
static void STSTATUS_reopenSlotsAfterTech(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Scrolls the stats back; once the info panel is closed, starts the slots' panel.
static void STSTATUS_closeQuestionForBattle(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Starts closing the title's and the question's panels for the battle digivolution's message.
static void STSTATUS_waitPartnerTech(DigivolvePanel *panel)
Cross or triangle go back.
static void STSTATUS_reopenDigivolveQuestion(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Scrolls the stats back; once the info panel is closed, starts the question's panel.
static void STSTATUS_closeEntryTechs(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Starts closing the info panel and scrolling the stats back.
void STSTATUS_showDigivolveStats(DigivolvePanel *panel, DigivolvePanelWindows *windows, s32 show)
The stats and techniques of the slot's entry (or of the partner itself), or hides them.
static void STSTATUS_closePartnerTech(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Starts closing the info panel and scrolling the stats back.
static void STSTATUS_reopenDigivolveSlots(DigivolvePanel *panel)
Once the question's panel is closed, starts the slots' panel.
static void STSTATUS_endDigivolvePanel(DigivolvePanel *panel)
Ends the panel once its panels are closed.
void STSTATUS_showDigivolveSlots(DigivolvePanel *panel, DigivolvePanelWindows *windows, s32 show)
The Digimon in the partner's three slots, the one it is highlighted, and the partner's own name.
static void STSTATUS_scrollUpForBattle(DigivolvePanel *panel)
Once the question's panel is closed, starts scrolling the stats up.
s32 STSTATUS_panelStats[]
The stats the fifth screen's panel shows: six battle stats, then the resistances.
static void STSTATUS_enterDigivolveQuestion(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Once the question's panel is in, shows the question and its cursor.
static void STSTATUS_openDigivolveStats(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Once the stats' panel is in, shows the partner's stats and the cursor on it.
static void STSTATUS_openDigivolveQuestion(DigivolvePanel *panel)
Once the slots' panel is closed, starts the question's panel.
static void STSTATUS_closeBattleMessage(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Starts closing the info panel and the stats' panel.
static void STSTATUS_openDigivolveSlots(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Once the slots' panel is in, shows the slots and starts the stats' panel.
static void STSTATUS_openPartnerTech(DigivolvePanel *panel, DigivolvePanelWindows *windows)
Scrolls the stats; once up, starts the info panel.
DigivolvePanel * STSTATUS_createDigivolvePanel(StatsScreen *screen)
Creates the fifth screen's digivolution panel (task) for its chosen party member.
static void STSTATUS_scrollUpForPartnerTech(DigivolvePanel *panel)
Once the slots' panel is closed, starts scrolling the stats up.
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...
Cursor * createCursor(s16 layerId, s32 depth, s16 x, s16 y)
A menu cursor on a layer at (x, y)
#define TEXT_SKILL_NAMES
SKLNAM.
#define TEXT_STATUS
STATUS: the field menu's and STSTATUS's.
#define TEXT_DIGIMON_NAMES
DIGNAM.
#define TEXT_SKILL_INFO
SKLINF.
#define FILE_MENU_SPRITES
Files the engine loads by number.
FileCache FILE_CACHE
The file cache.
#define STAT_STRENGTH
the six battle stats
#define SKILL_MARKED
marked in the lab (STGDGLAB_updateSkillPanel)
#define SKILL_LAST
the sixth skill
#define STAT_RESISTS
the first of the seven resistances
#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....
#define STRETCH_SPRITE(sprite, level, x, y)
#define SCREEN_LAYER
The layer over the whole screen that most modes create first and draw their menus on (FIELDSTG and ST...
TechData TECHS[443]
The techniques, from 1: technique n is TECHS[n - 1].
#define PAD_PRESSED(button)
One button of pad 1: newly pressed, auto-repeated while held, or held.
#define PAD_REPEATED(button)
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_SELECT
Sounds the overlays share, with SOUNDTST's names.
#define SOUND_MENU_CANCEL
SYSTEM01.
#define SOUND_CURSOR
SYSTEM02: a cursor moves.
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
void(* setPos)()
(cursor, x, y)
void(* setVisible)()
(cursor, visible)
Digimon definition (DIGIMON_DATA, 52 of them; the first 8 are the partners)
u8 nameId
string in file 0x4F
u16 skills[7]
[1]-[6] are learnt at skillLevels
TextWindow * list[13]
two columns: 6 and 7
A panel of the fifth screen (STSTATUS_createDigivolvePanel)
void(* nextState)(struct DigivolvePanel *task)
s32 slotCount
the slots holding an entry (4 on)
s32 slot
the cursors' rows
s32 fromEntry
the list shows the slot's techniques, not the partner's
s32 techCount
the entry's techniques
s16 slots[4]
getPartnerSlots
MenuLerp scroll
its value is added to the list's y
void *(* getEntry)(u32 fileAndIndex)
s32(* getPartnerEntry)()
-1 if it hasn't the Digimon
void(* computeStats)(s32 partner, union PartnerTotals *out)
s32(* getPartyMember)(u32 index)
s32(* getPartnerSlots)()
(partner, s16 *out): the count
Partner partners[PARTNER_COUNT]
One of a partner's Digimon (getPartnerEntry, setPartnerEntry)
s8 level
shown in the lab; 1 when added
s16 skills[6]
SKILL_ID and the flags below, 0 for none.
One of the eight partner Digimon.
s32 battleDigivolve
an entry id, compared with the slots': the Digimon the battle starts it as, 0 for its own
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(* setScale)()
(x, y, z), ONE = 1.0
void(* setLayerId)()
(id, depth)
void(* setClutRow)()
(row)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
The field menu's fifth screen (STSTATUS_createStatusScreen)
WindowPos * layout
where the windows go, and their strings
s32(* updateFade)(PanelAnim *fade)
s32(* updateLerp)(MenuLerp *lerp)
void(* startLerp)(MenuLerp *lerp, s32 from, s32 to, s32 frames)
void(* startFade)(PanelAnim *fade, s32 fadeIn)
u8 icon
a frame of the menu sprites, from 0x37
void(* setPalette)(struct TextWindow *obj, u8 arg)
void(* setRightAlign)()
no prototype: callers would truncate u8 args
void(* setPos)(struct TextWindow *obj, s16 x, s16 y)
void(* setVisible)(struct TextWindow *obj, u8 arg)
Where a window goes, and the string it shows.
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
#define PALETTE_BLUE
a light blue: what is highlighted or current
#define PALETTE_WHITE
The text windows' palettes (TextWindow.palette, setPalette): rows of the font's CLUTs,...
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)
computeStats' result: the stats with the equipment added, by STAT_* or by name.
s16 lowered[3]
taken from battle[0], [1] and [4]
struct PartnerTotals::@10 fields