11 for (i = 0; i < 10; i++) {
17 for (i = 0; i < 6; i++) {
20 for (i = 0; i < 6; i++) {
23 for (i = 0; i < 7; i++) {
28 (*items)->setDepth(*items, panel->
depth - 1);
35 for (i = 0; i < 4; i++) {
55 for (i = 0; i < 10; i++) {
59 for (j = 0; j < 3; j++) {
60 if (panel->
slots[j] ==
id) {
80 for (i = 0; i < 6; i++) {
97 for (i = 0; i < 7; i++) {
104 for (i = 0; i < 6; i++) {
105 if (entry.
skills[i] != 0) {
119 for (i = 0; i < 14; i++) {
126 if (*items !=
NULL) {
127 (*items)->setVisible(*items, 0);
140 for (i = 0; i < 3; i++) {
147 for (i = 0; i < 4; i++) {
175 for (n = 0; n < 5; n++) {
177 if (panel->
scroll + 4 > rows - 1) {
183 if (scroll != panel->
scroll) {
192 if (panel->
row < 0) {
199 if (row != panel->
row || scroll != panel->
scroll) {
205 if (panel->
row >= 5) {
218 if (scroll != panel->
scroll || row != panel->
row) {
219 if (panel->
col != 0) {
236 if (panel->
col != 0) {
258 for (k = 0; k < 3; k++) {
259 if (panel->
slots[k] ==
id) {
305 if (old != panel->
option) {
340 for (j = 0; j < 10; j++) {
343 (j / 2) * 0xE + 0x16);
366 for (i = 0; i < 6; i++) {
367 if (entry.
skills[i] != 0) {
393 switch (panel->
state) {
STGDGLAB.PRO: the Digimon Lab (MODE_DIGI_LAB; "デジモンラボ" in STAGSLCT's list of scenes),...
ScrollBar * STGDGLAB_createScrollBar(void)
#define FILE_LAB_SPRITES
The lab's sprite sheet; the next file is its texture archive.
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)
LabEntryPanel * STGDGLAB_createEntryPanel(s32 partner, s32 slot)
Creates the second screen's panel (task) where one of the partner's entries is picked for one of its ...
void STGDGLAB_showEntryPanelOptions(LabEntryPanel *panel, LabEntryPanelWindows *windows, s32 show)
Shows the panel's options (the names of its three slots, then two strings of file 0x3A),...
static void putPickedEntry(LabEntryPanel *panel, LabEntryPanelWindows *windows)
Cross on an entry: one already in a slot is refused; otherwise it goes in the slot,...
static void drawEntryPanel(LabEntryPanel *panel)
Draws the panel: the entries' marks, the blinking scroll arrows, the frames, the picked entry's skill...
static void pickBattleDigivolve(LabEntryPanel *panel, LabEntryPanelWindows *windows)
The options' panel: up and down pick the slot to digivolve to in battle, or none; cross sets it as th...
void STGDGLAB_updateEntryPanel(LabEntryPanel *panel, LabEntryPanelWindows *windows)
The panel's task: lists the partner's entries two by two, with the shoulder buttons scrolling five ro...
static s32 moveEntryCursor(LabEntryPanel *panel)
Moves the cursor over the entries: the shoulder buttons scroll five rows, up and down move a row (scr...
void STGDGLAB_showEntryPanel(LabEntryPanel *panel, LabEntryPanelWindows *windows, s32 show)
Shows the page of the partner's entries, and the stats and skills of the one under the cursor; or hid...
void STGDGLAB_createEntryPanelWindows(LabEntryPanel *panel, LabEntryPanelWindows *windows)
Creates the panel's windows and cursors.
#define TEXT_DIGI_LAB
DGLABO: STGDGLAB's.
#define TEXT_SKILL_NAMES
SKLNAM.
#define TEXT_DIGIMON_NAMES
DIGNAM.
#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_LAST
the sixth skill
#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 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_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
void *(* getEntry)(u32 fileAndIndex)
s32(* getPartnerEntry)()
-1 if it hasn't the Digimon
void(* computeStats)(s32 partner, union PartnerTotals *out)
void(* setPartnerSlots)()
s32(* getPartnerSlots)()
(partner, s16 *out): the count
s32(* listPartnerEntries)()
(partner, s16 *out): the count
Partner partners[PARTNER_COUNT]
ScrollBar * scrollBar
USA only.
TextWindow * values[14]
the battle stats, the resistances, the level
TextWindow * levelLabel
"Skill LV", left of values[13]
A panel of the second screen (STGDGLAB_createEntryPanel): a partner's entries and its three slots.
void(* setState)(struct LabEntryPanel *task, s32 state)
s16 entries[47]
listPartnerEntries
s32 slot
the one the picked entry goes in
void(* nextState)(struct LabEntryPanel *task)
s16 slots[3]
getPartnerSlots
s32 option
the slot to digivolve to in battle, 3 for none
s32(* updateFade)(PanelAnim *fade)
void(* startFade)(PanelAnim *fade, s32 fadeIn)
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(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
u8 icon
a frame of the menu sprites, from 0x37
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
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)
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