Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
digimon_lab.h
Go to the documentation of this file.
1#ifndef STGDGLAB_H
2#define STGDGLAB_H
3
4/* STGDGLAB.PRO: the Digimon Lab (MODE_DIGI_LAB; "デジモンラボ" in STAGSLCT's list
5 of scenes), where the partners' digivolutions are set. Its main menu
6 (STGDGLAB_createMenu) opens one of three screens (STGDGLAB_screens,
7 TEXT_DIGI_LAB strings 2-4): "Switch Digimon" swaps a party member with
8 another partner, "Digivolve" sets a partner's three slots
9 (setPartnerSlots) and loads its techniques, and "Digivolve Chart" checks
10 the recipes of STGDGLAB_data (how many of a few ids are needed) against
11 the entries a partner has (listPartnerEntries). On the way in it packs the
12 party (STGDGLAB_packParty) so that the members come first. Its strings are
13 in TEXT_DIGI_LAB, TEXT_DIGIMON_NAMES, TEXT_DIGIMON_INFO, TEXT_SKILL_NAMES
14 and TEXT_SKILL_INFO. */
15
16#include "engine/game.h"
17
18/* The name of this overlay's copy of a function of src/shared/ */
19#define OVL_NAME(name) STGDGLAB_##name
20
21/* The lab's sprite sheet; the next file is its texture archive */
22#if VERSION_US || VERSION_JP
23#define FILE_LAB_SPRITES 0x2B6
24#elif VERSION_EU
25#define FILE_LAB_SPRITES 0x2C5
26#endif
27
28/* The lab's main menu (STGDGLAB_createMenu) */
29typedef struct LabMenu {
31 /* 0x050 */ struct Lab *lab;
32 /* 0x054 */ s32 picked;
33 /* 0x058 */ s32 layer;
34 /* 0x05C */ s32 depth;
35 /* 0x060 */ s32 choice; /* into STGDGLAB_screens */
36 /* 0x064 */ PanelAnim panels[9];
37 /* 0x0F4 */ s32 animTime;
38 /* 0x0F8 */ s32 blinkTime;
39 /* 0x0FC */ s32 frames[5]; /* the party's animations, the picked partner's,
40 then the blinking frame's CLUT row */
41 /* 0x110 */ s32 memberCount; /* the members left and right go through */
42 /* 0x114 */ void (*open)(struct LabMenu *menu);
43 /* 0x118 */ void (*close)(struct LabMenu *menu);
44} LabMenu;
45
46typedef struct LabMenuWindows {
47 /* 0x00 */ TextWindow *title;
48 /* 0x04 */ TextWindow *options[3]; /* the three screens */
49 /* 0x10 */ TextWindow *label;
50 /* 0x14 */ TextWindow *statLabels[5];
51 /* 0x28 */ TextWindow *statValues[5]; /* STGDGLAB_menuStats */
52 /* 0x3C */ TextWindow *name;
53 /* 0x40 */ TextWindow *entriesHint; /* circle shows the entries (grey
54 without a partner) */
55 /* 0x44 */ Cursor *cursor;
56 /* 0x48 */ struct LabEntryList *panel;
58
59/* A recipe of STGDGLAB_data's tables */
60typedef struct LabRecipe {
61 /* 0x0 */ s16 needed; /* how many of the ids the partner must have */
62 /* 0x2 */ s16 ids[5]; /* 0: none */
63} LabRecipe;
64
65/* Where a window of the menu or the first screen goes, and its string */
66typedef struct LabWindowPos {
67 /* 0x0 */ s32 string; /* of TEXT_DIGI_LAB, -1: none */
68 /* 0x4 */ s32 x;
69 /* 0x8 */ s32 y;
71
72/* The main menu's first screen (STGDGLAB_createPartyScreen) */
73typedef struct LabPartyScreen {
75 /* 0x050 */ struct Lab *lab;
76 /* 0x054 */ s32 layer;
77 /* 0x058 */ s32 depth;
78 /* 0x05C */ s32 pageRow; /* 1: the page is 0x7A lower, 0 (at the top)
79 while the entry list is open */
80 /* 0x060 */ s32 pick; /* into partners */
81 /* 0x064 */ PanelAnim panels[5];
82 /* 0x0B4 */ u8 pad[0xC4 - 0xB4]; /* never read or written */
83 /* 0x0C4 */ s32 animTime;
84 /* 0x0C8 */ s32 blinkTime;
85 /* 0x0CC */ s32 frames[3]; /* the party's animation frames */
86 /* 0x0D8 */ s32 frame; /* the picked partner's */
87 /* 0x0DC */ s32 clut;
88 /* 0x0E0 */ s32 clut2;
89 /* 0x0E4 */ s32 partners[PARTNER_COUNT]; /* the unlocked partners outside the party, -1 for none */
90 /* 0x104 */ s32 count;
92
93typedef struct LabPartyScreenWindows {
94 /* 0x00 */ TextWindow *title;
95 /* 0x04 */ TextWindow *labels[5];
96 /* 0x18 */ TextWindow *values[5];
97 /* 0x2C */ TextWindow *name;
98 /* 0x30 */ TextWindow *entriesHint; /* as LabMenuWindows' */
99 /* 0x34 */ struct LabEntryList *panel;
101
102/* The main menu's second screen (STGDGLAB_createSlotScreen) */
103typedef struct LabSlotScreen {
105 /* 0x050 */ struct Lab *lab;
106 /* 0x054 */ PanelAnim panels[6];
107 /* 0x0B4 */ s32 layer;
108 /* 0x0B8 */ s32 depth;
109 /* 0x0BC */ s32 choice;
110 /* 0x0C0 */ u8 pad[0xC8 - 0xC0]; /* never read or written */
111 /* 0x0C8 */ s32 picked; /* the list's cursor when an entry was picked */
112 /* 0x0CC */ s16 slots[3]; /* getPartnerSlots */
113 /* 0x0D2 */ s16 entries[45]; /* listPartnerEntries */
114 /* 0x12C */ s32 entryCount;
116
117typedef struct LabSlotScreenWindows {
118 /* 0x00 */ TextWindow *title;
119 /* 0x04 */ TextWindow *list[13]; /* two columns: 6, then 7 */
120 /* 0x38 */ TextWindow *slotNames[3]; /* the slots' Digimon */
121 /* 0x44 */ TextWindow *options[2];
122 /* 0x4C */ TextWindow *message;
123 /* 0x50 */ Cursor *cursor;
124 /* 0x54 */ struct LabEntryList *entryList;
125 /* 0x58 */ struct LabEntryPanel *entryPanel;
126 /* 0x5C */ struct LabSkillPanel *skillsPanel;
128
129/* The main menu's third screen (STGDGLAB_createRecipeScreen) */
130typedef struct LabRecipeScreen {
132 /* 0x050 */ struct Lab *lab;
133 /* 0x054 */ s32 layer;
134 /* 0x058 */ s32 depth;
135 /* 0x05C */ s32 pad5C; /* never read or written */
136 /* 0x060 */ s16 owned[44];
137 /* 0x0B8 */ s32 ownedCount;
138 /* 0x0BC */ s32 table; /* into STGDGLAB_data.recipes */
139 /* 0x0C0 */ s32 row;
140 /* 0x0C4 */ s32 rowCount;
141 /* 0x0C8 */ s32 nextRow; /* L1 and R1 move to it */
142 /* 0x0CC */ s32 slots; /* how many of found[row] are in use */
143 /* 0x0D0 */ s32 found[4][4][5]; /* the owned ids of each recipe */
144 /* 0x210 */ s32 complete[4]; /* 0: a recipe of the row lacks ids */
145 /* 0x220 */ s32 foundCount[4];
146 /* 0x230 */ PanelAnim panels[5];
147 /* 0x280 */ s32 arrowLeft;
148 /* 0x284 */ s32 arrowRight;
149 /* 0x288 */ s32 time;
150 /* 0x28C */ s32 clutRow;
151 /* 0x290 */ s32 col;
152 /* 0x294 */ s32 slot;
153 /* 0x298 */ s32 pad298; /* never read or written: createTask allocates 0x29C bytes */
155
157 /* 0x00 */ TextWindow *title; /* with the partner's name */
159 /* 0x08 */ TextWindow *rowLabel;
160 /* 0x0C */ TextWindow *prev; /* by the arrows */
161 /* 0x10 */ TextWindow *next;
162 /* 0x14 */ TextWindow *name; /* the picked id's */
163 /* 0x18 */ TextWindow *desc;
165
166/* A panel of the second screen (STGDGLAB_createEntryPanel): a partner's entries and
167 its three slots */
168typedef struct LabEntryPanel {
170 /* 0x50 */ s32 layer;
171 /* 0x54 */ s32 depth;
172 /* 0x58 */ s32 partner;
173 /* 0x5C */ s32 slot; /* the one the picked entry goes in */
174 /* 0x60 */ s32 col;
175 /* 0x64 */ s32 row;
176 /* 0x68 */ s32 scroll;
177 /* 0x6C */ s32 blinkTime;
178 /* 0x70 */ s32 blink;
179 /* 0x74 */ s16 slots[3]; /* getPartnerSlots */
180 /* 0x7A */ s16 entries[47]; /* listPartnerEntries */
181 /* 0xD8 */ s32 entryCount;
182 /* 0xDC */ PanelAnim fades[2];
183 /* 0xFC */ s32 option; /* the slot to digivolve to in battle, 3 for none */
185
186typedef struct LabEntryPanelWindows {
187 /* 0x00 */ TextWindow *entries[10];
189 /* 0x2C */ TextWindow *levelLabel; /* "Skill LV", left of values[13] */
190 /* 0x30 */ TextWindow *skills[6];
191 /* 0x48 */ TextWindow *values[14]; /* the battle stats, the resistances, the level */
192 /* 0x80 */ TextWindow *help;
193 /* 0x84 */ TextWindow *options[4];
194 /* 0x94 */ Cursor *optionCursor;
195 /* 0x98 */ Cursor *cursor;
196 /* 0x9C */ ScrollBar *scrollBar; /* USA only */
198
199/* A panel of the second screen (STGDGLAB_createSkillPanel) */
200typedef struct LabSkillPanel {
202 /* 0x50 */ PanelAnim fade;
203 /* 0x60 */ PanelAnim confirm;
204 /* 0x70 */ s32 layer;
205 /* 0x74 */ s32 depth;
206 /* 0x78 */ s32 member;
207 /* 0x7C */ s32 slot;
208 /* 0x80 */ s16 slots[4];
209 /* 0x88 */ PartnerEntry entry;
210 /* 0x9C */ s32 learned;
211 /* 0xA0 */ s32 choice;
212 /* 0xA4 */ s32 cursor;
213 /* 0xA8 */ s32 skillCount;
215
216typedef struct LabSkillPanelWindows {
219 /* 0x08 */ TextWindow *learned; /* how many skills are marked */
220 /* 0x0C */ TextWindow *left[6];
221 /* 0x24 */ TextWindow *right[6];
222 /* 0x3C */ TextWindow *message;
223 /* 0x40 */ TextWindow *yes;
224 /* 0x44 */ TextWindow *no;
225 /* 0x48 */ TextWindow *help;
226 /* 0x4C */ TextWindow *mpLabel;
227 /* 0x50 */ TextWindow *mp; /* the picked skill's */
228 /* 0x54 */ Cursor *optionCursor;
229 /* 0x58 */ Cursor *cursor;
231
232/* A panel of the main menu (STGDGLAB_createEntryList) */
233typedef struct LabEntryList {
235 /* 0x050 */ s32 allEntries; /* list the other entries after the slots */
236 /* 0x054 */ s32 partner;
237 /* 0x058 */ s32 layer;
238 /* 0x05C */ s32 depth;
239 /* 0x060 */ PanelAnim titlePanel; /* their levels follow fade's */
240 /* 0x070 */ PanelAnim listPanel;
241 /* 0x080 */ PanelAnim fade;
242 /* 0x090 */ s32 ids[50]; /* the partner's slots, then (allEntries) its other entries */
243 /* 0x158 */ s32 scroll;
244 /* 0x15C */ s32 count;
245 /* 0x160 */ s32 cursor;
246 /* 0x164 */ s32 blinkTime;
247 /* 0x168 */ s32 blink; /* the scroll arrows */
248 /* 0x16C */ s32 closable; /* triangle closes it */
249 /* 0x170 */ void (*close)(struct LabEntryList *panel);
251
252typedef struct LabEntryListWindows {
253 /* 0x00 */ TextWindow *title;
254 /* 0x04 */ TextWindow *options[3];
256 /* 0x14 */ TextWindow *levelLabel; /* "Skill LV", left of values[13] */
257 /* 0x18 */ TextWindow *skills[6];
258 /* 0x30 */ TextWindow *values[14]; /* the battle stats, the resistances, the level */
259 /* 0x68 */ Cursor *cursor;
260 /* 0x6C */ ScrollBar *scrollBar;
262
263/* The mode's main task (STGDGLAB_createLab) */
264typedef struct Lab {
266 /* 0x50 */ s32 layer;
267 /* 0x54 */ s32 bgScroll;
268 /* 0x58 */ s32 bgTick;
269 /* 0x5C */ s32 partySize; /* the party's slots: PARTY_SIZE */
270 /* 0x60 */ s32 partyCount;
271 /* 0x64 */ s32 member; /* the party member the screens show */
272 /* 0x68 */ s32 (*openMenu)(struct Lab *lab);
273 /* 0x6C */ s32 (*closeMenu)(struct Lab *lab);
274 /* 0x70 */ s32 (*menuOpen)(struct Lab *lab);
275 /* 0x74 */ void (*packParty)(struct Lab *lab);
276 /* 0x78 */ void (*fadeOut)(struct Lab *lab);
277} Lab;
278
279typedef struct LabChildren {
280 /* 0x0 */ LabMenu *menu;
281 /* 0x4 */ Task *screen;
282 /* 0x8 */ ScreenFade *fade;
284
285/* An entry of STGDGLAB_entries: a Digimon of the recipes (GET_DIGIMON) */
286typedef struct LabEntry {
287 /* 0x0 */ s16 id;
288 /* 0x2 */ s16 sprite;
289 /* 0x4 */ s16 b; /* 0x100-0x135, one per Digimon; only STGDGLAB_getItemB
290 reads it, and nothing in src/ calls that (LabFuncs.getB) */
291} LabEntry;
292
293/* The lab's helpers (STGDGLAB_data.funcs) */
294typedef struct LabFuncs {
295 /* 0x00 */ void (*loadFiles)(void);
296 /* 0x04 */ s32 (*filesLoading)(void);
297 /* 0x08 */ void (*startFade)(PanelAnim *fade, s32 fadeIn);
298 /* 0x0C */ s32 (*updateFade)(PanelAnim *fade);
299 /* 0x10 */ void (*startLerp)(MenuLerp *lerp, s32 from, s32 to, s32 frames);
300 /* 0x14 */ s32 (*updateLerp)(MenuLerp *lerp);
301 /* 0x18 */ s32 (*getSprite)(s32 id);
302 /* 0x1C */ s32 (*getB)(s32 id);
303} LabFuncs;
304
305/* The overlay's tables and helpers */
306typedef struct LabData {
307 /* 0x00 */ PartnerAnim *anim; /* STGDGLAB_partnerAnims, by partner */
308 /* 0x04 */ LabWindowPos *layout; /* STGDGLAB_layout */
309 /* 0x08 */ LabRecipe *recipes[8]; /* [row * 4 + col] */
310 /* 0x28 */ LabFuncs funcs;
311} LabData;
312
313/* scene.c */
314void STGDGLAB_updateScene(Task *task, Lab **child);
315void STGDGLAB_startFader(ScreenFade *task, s32 fadeIn, s32 duration);
319
320/* recipe_screen.c */
321s32 STGDGLAB_findRecipe(LabRecipeScreen *screen, s32 row, u32 col, s32 slot);
329
330/* entry_panel.c */
336
337/* slot_screen.c */
341void STGDGLAB_drawSlotScreen(LabSlotScreen *screen, void *children);
342void STGDGLAB_updateSlotScreen(LabSlotScreen *screen, void *children);
344
345/* menu.c */
346void STGDGLAB_openMenu(LabMenu *menu);
347void STGDGLAB_closeMenu(LabMenu *menu);
348void STGDGLAB_showMenuPage(LabMenu *menu, LabMenuWindows *windows);
349void STGDGLAB_runMenu(LabMenu *menu, LabMenuWindows *windows);
350void STGDGLAB_drawMenu(LabMenu *menu, void *children);
351void STGDGLAB_updateMenu(LabMenu *menu, void *children);
353
354/* scroll_bar.c */
357void STGDGLAB_setScrollBarCount(ScrollBar *bar, s32 pageSize, s32 count);
361
362/* party_screen.c */
365void STGDGLAB_drawPartyScreen(LabPartyScreen *screen, void *children);
367void STGDGLAB_updatePartyScreen(LabPartyScreen *screen, void *children);
369
370/* skill_panel.c */
375
376/* entry_list.c */
383LabEntryList *STGDGLAB_createEntryList(s32 partner, s32 allEntries, s32 closable);
384
385/* lab.c */
386void STGDGLAB_runLab(Lab *lab, LabChildren *children);
387void STGDGLAB_packParty(Lab *lab);
388void STGDGLAB_updateLab(Lab *lab, LabChildren *children);
392void STGDGLAB_fadeOutLab(Lab *lab);
394void STGDGLAB_loadFiles(void);
396void STGDGLAB_startFade(PanelAnim *fade, s32 fadeIn);
398void STGDGLAB_startLerp(MenuLerp *lerp, s32 from, s32 to, s32 frames);
402
403/* STGDGLAB's data, in its order: the recipe screen's, the menu's, the party
404 screen's and the lab's */
405extern s32 STGDGLAB_tableItems[]; /* the item each table's screen shows */
406extern s32 STGDGLAB_menuStats[]; /* the stats the menu's page shows */
407extern s32 STGDGLAB_pageStats[]; /* the stats the first screen's page shows */
408extern Task *(*STGDGLAB_screens[])(Lab *lab);
411extern LabEntry STGDGLAB_entries[]; /* the items of the recipes */
412extern LabRecipe STGDGLAB_recipes0[]; /* to STGDGLAB_recipes7, by table */
421
422#endif /* STGDGLAB_H */
signed int s32
Definition common.h:11
unsigned int u32
Definition common.h:12
signed short s16
Definition common.h:9
unsigned char u8
Definition common.h:8
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_hideWindows(LabPartyScreen *screen)
Hides the first screen's text windows: all its children but the last, the entry list.
LabEntry STGDGLAB_entries[]
the items of the recipes
Definition lab.c:264
void STGDGLAB_drawEntryList(LabEntryList *panel, LabEntryListWindows *windows)
Draws the panel's frames, its scroll arrows and the icons of the skills of the id under the cursor.
Definition entry_list.c:241
void STGDGLAB_setScrollBarX(ScrollBar *bar, s32 x, s32 width)
scroll_bar.c
s32 STGDGLAB_openLabMenu(Lab *lab)
Lab.openMenu: opens the main menu's page again; 1 if the menu was running.
Definition lab.c:112
s32 STGDGLAB_filesLoading(void)
Whether the lab's strings are still loading.
Definition lab.c:187
void STGDGLAB_showEntryList(LabEntryList *panel, LabEntryListWindows *windows, s32 show)
Shows the list of ids and the stats and skills of the one under the cursor; or hides the panel's wind...
Definition entry_list.c:36
void STGDGLAB_runPartyScreen(LabPartyScreen *screen, LabPartyScreenWindows *windows)
The first screen's states: fades its panels in, picks a partner with left and right,...
void STGDGLAB_loadFiles(void)
Loads the lab's textures and requests its strings: the lab's and the Digimon's and skills' names and ...
Definition lab.c:169
PartnerAnim STGDGLAB_partnerAnims[]
The partners' animation frames, -1 ends.
Definition lab.c:238
ScrollBar * STGDGLAB_createScrollBar(void)
void STGDGLAB_closeEntryList(LabEntryList *panel)
The entry list's close: fades it out and hides its windows and cursor.
Definition entry_list.c:134
void STGDGLAB_drawFader(ScreenFade *task)
LabRecipe STGDGLAB_recipes1[]
Definition lab.c:484
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),...
void STGDGLAB_showSlotScreen(LabSlotScreen *screen, LabSlotScreenWindows *windows, s32 show)
Shows the party member's slots and stats, or hides the screen's windows.
Definition slot_screen.c:34
void STGDGLAB_updateSlotScreen(LabSlotScreen *screen, void *children)
The second screen's task: creates its windows, then runs and draws it.
void STGDGLAB_resetRecipeCursor(LabRecipeScreen *screen)
Puts the third screen's cursor on the row's first recipe, at its first id found (the last one when no...
LabEntryList * STGDGLAB_createEntryList(s32 partner, s32 allEntries, s32 closable)
Creates the list of a partner's entries (task): only its slots unless ALLENTRIES; CLOSABLE lets trian...
Definition entry_list.c:339
Task *(* STGDGLAB_screens[])(Lab *lab)
The main menu's screens.
Definition lab.c:234
void STGDGLAB_updateFader(ScreenFade *task)
void STGDGLAB_updateScene(Task *task, Lab **child)
scene.c
void STGDGLAB_setScrollBarPos(ScrollBar *bar, s32 pos)
void STGDGLAB_updateEntryList(LabEntryList *panel, LabEntryListWindows *windows)
The entry list's task: lists the partner's slots and, with allEntries, its other entries,...
Definition entry_list.c:293
void STGDGLAB_createSlotScreenWindows(LabSlotScreen *screen, LabSlotScreenWindows *windows)
slot_screen.c
Definition slot_screen.c:7
void STGDGLAB_updateLab(Lab *lab, LabChildren *children)
The mode's main task: loads the files and packs the party, then runs the lab (STGDGLAB_runLab) and dr...
Definition lab.c:68
void STGDGLAB_setScrollBarCount(ScrollBar *bar, s32 pageSize, s32 count)
void STGDGLAB_drawSlotScreen(LabSlotScreen *screen, void *children)
Draws the second screen's frames.
s32 STGDGLAB_getItemSprite(s32 id)
The sprite of a recipe's id (STGDGLAB_entries), 0 for an id not there.
Definition lab.c:209
void STGDGLAB_runEntryList(LabEntryList *panel, LabEntryListWindows *windows)
The panel's states: fades in, moves the cursor through the ids and scrolls the list; triangle closes ...
Definition entry_list.c:145
Task * STGDGLAB_createRecipeScreen(Lab *lab)
Creates the main menu's third screen (task), the recipes, and fades the menu's page out.
LabRecipe STGDGLAB_recipes6[]
Definition lab.c:574
void STGDGLAB_drawPartyScreen(LabPartyScreen *screen, void *children)
Draws the first screen's frames and the party's animations.
s32 STGDGLAB_updateFade(PanelAnim *fade)
void STGDGLAB_updateRecipeScreen(LabRecipeScreen *screen, LabRecipeScreenWindows *win)
The third screen: a row of recipes at a time, the picked id's name and description on cross.
LabSkillPanel * STGDGLAB_createSkillPanel(s32 member, s32 slot)
Creates the second screen's skill panel (task) for a slot of a partner (the MEMBER parameter is a par...
Task * STGDGLAB_createPartyScreen(Lab *lab)
Creates the main menu's first screen (task), where a partner joins the party in the member's place.
Task * STGDGLAB_createSlotScreen(Lab *lab)
Creates the main menu's second screen (task), the party member's three slots.
void STGDGLAB_openMenu(LabMenu *menu)
menu.c
Definition menu.c:7
void STGDGLAB_setScrollBarRange(ScrollBar *bar, s32 top, s32 bottom)
s32 STGDGLAB_closeLabMenu(Lab *lab)
Lab.closeMenu: closes the main menu's page; 1 if the menu was running.
Definition lab.c:124
void STGDGLAB_updatePartyScreen(LabPartyScreen *screen, void *children)
The first screen's task: lists the unlocked partners outside the party, plus an empty pick to take th...
LabRecipe STGDGLAB_recipes3[]
Definition lab.c:520
void STGDGLAB_drawMenu(LabMenu *menu, void *children)
Draws the main menu's frames and the party's animations.
Definition menu.c:425
void STGDGLAB_showPartyPage(LabPartyScreen *screen, LabPartyScreenWindows *windows)
party_screen.c
Definition party_screen.c:8
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...
LabMenu * STGDGLAB_createMenu(Lab *lab)
Creates the lab's main menu (task)
Definition menu.c:580
LabRecipe STGDGLAB_recipes4[]
Definition lab.c:538
s32 STGDGLAB_tableItems[]
STGDGLAB's data, in its order: the recipe screen's, the menu's, the party screen's and the lab's.
void STGDGLAB_fadeOutLab(Lab *lab)
Lab.fadeOut: fades the screen out in 0x1E frames, as the lab is left.
Definition lab.c:147
s32 STGDGLAB_countRowIds(LabRecipeScreen *screen, u32 row)
How many of the row's four recipes the third screen shows: those whose first id the partner has (STGD...
LabWindowPos STGDGLAB_layout[]
Where the windows go: the five stats' labels, their values and the name.
Definition lab.c:249
s32 STGDGLAB_moveRecipeCursor(LabRecipeScreen *screen, s32 step)
Moves the third screen's cursor by step slots, to the first column with an id; whether it moved.
s32 STGDGLAB_labMenuRunning(Lab *lab)
Lab.menuOpen: 1 when the main menu's task is running (its page not fading)
Definition lab.c:136
void STGDGLAB_updateMenu(LabMenu *menu, void *children)
The main menu's task: runs and draws the menu; while its page fades (TASK_DONE, from STGDGLAB_openMen...
Definition menu.c:546
void STGDGLAB_showSkillPanel(LabSkillPanel *panel, LabSkillPanelWindows *windows, s32 show)
Shows the slot's Digimon's skills, each marked or not and in the palette of marked,...
Definition skill_panel.c:40
void STGDGLAB_runSlotScreen(LabSlotScreen *screen, LabSlotScreenWindows *windows)
The second screen's states: picks between the entries and the skills, opens the list of the member's ...
LabRecipe STGDGLAB_recipes5[]
Definition lab.c:556
void STGDGLAB_startFader(ScreenFade *task, s32 fadeIn, s32 duration)
void STGDGLAB_showMenuPage(LabMenu *menu, LabMenuWindows *windows)
Shows the main menu's page: the name and five stats (STGDGLAB_menuStats) of the lab's party member,...
Definition menu.c:41
s32 STGDGLAB_updateLerp(MenuLerp *lerp)
void STGDGLAB_runMenu(LabMenu *menu, LabMenuWindows *windows)
The main menu's states: fades its panels in, picks one of the three screens with up and down,...
Definition menu.c:313
void STGDGLAB_createSkillPanelWindows(LabSkillPanel *panel, LabSkillPanelWindows *windows)
skill_panel.c
Definition skill_panel.c:6
s32 STGDGLAB_pageStats[]
the stats the first screen's page shows
s32 STGDGLAB_menuStats[]
the stats the menu's page shows
Definition menu.c:592
ScreenFade * STGDGLAB_createFader(void)
void STGDGLAB_closeMenu(LabMenu *menu)
The main menu's close: fades its page out and hides its stats and name, while a screen is open over i...
Definition menu.c:15
void STGDGLAB_runLab(Lab *lab, LabChildren *children)
lab.c
Definition lab.c:8
LabData STGDGLAB_data
Definition lab.c:611
LabRecipe STGDGLAB_recipes7[]
Definition lab.c:592
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...
Definition entry_panel.c:43
s32 STGDGLAB_getItemB(s32 id)
The third value (b) of a recipe's id in STGDGLAB_entries, 0 for an id not there; LabFuncs....
Definition lab.c:222
void STGDGLAB_updateScrollBar(ScrollBar *bar)
void STGDGLAB_createEntryListWindows(LabEntryList *panel, LabEntryListWindows *windows)
entry_list.c
Definition entry_list.c:7
void STGDGLAB_updateSkillPanel(LabSkillPanel *panel, LabSkillPanelWindows *windows)
The panel of a partner's Digimon's skills: up and down pick one, cross marks it to pass on or unmarks...
void STGDGLAB_createEntryPanelWindows(LabEntryPanel *panel, LabEntryPanelWindows *windows)
entry_panel.c
Definition entry_panel.c:7
void STGDGLAB_startLerp(MenuLerp *lerp, s32 from, s32 to, s32 frames)
LabRecipe STGDGLAB_recipes2[]
Definition lab.c:502
s32 STGDGLAB_hasRecipeId(LabRecipeScreen *screen, s32 row, u32 col)
Whether the partner has the first id of the recipe (row, col); 0 for a column past the recipes.
void STGDGLAB_startFade(PanelAnim *fade, s32 fadeIn)
LabRecipe STGDGLAB_recipes0[]
to STGDGLAB_recipes7, by table
Definition lab.c:466
s32 STGDGLAB_findRecipe(LabRecipeScreen *screen, s32 row, u32 col, s32 slot)
recipe_screen.c
void STGDGLAB_drawRecipeScreen(LabRecipeScreen *screen, LabRecipeScreenWindows *win)
Draws the third screen: the picked id, the frames, the recipes of the row (the ids found,...
void STGDGLAB_packParty(Lab *lab)
Counts the party and moves its members to the first places of GAME.party.
Definition lab.c:42
Lab * STGDGLAB_createLab(void)
Creates the mode's main task, the lab.
Definition lab.c:155
#define TASK_HEADER(Type)
Definition task.h:39
@ PARTNER_COUNT
Definition game_state.h:472
A menu cursor: a text window showing one of the CURSOR_FRAMES glyphs.
Definition text.h:19
LabMenu * menu
ScreenFade * fade
Task * screen
The overlay's tables and helpers.
LabFuncs funcs
LabRecipe * recipes[8]
[row * 4 + col]
PartnerAnim * anim
STGDGLAB_partnerAnims, by partner.
LabWindowPos * layout
STGDGLAB_layout.
TextWindow * levelLabel
"Skill LV", left of values[13]
TextWindow * skills[6]
TextWindow * values[14]
the battle stats, the resistances, the level
TextWindow * options[3]
ScrollBar * scrollBar
TextWindow * digimonName
TextWindow * title
A panel of the main menu (STGDGLAB_createEntryList)
void(* close)(struct LabEntryList *panel)
PanelAnim titlePanel
their levels follow fade's
PanelAnim listPanel
s32 ids[50]
the partner's slots, then (allEntries) its other entries
s32 allEntries
list the other entries after the slots
s32 closable
triangle closes it
s32 blink
the scroll arrows
PanelAnim fade
TextWindow * entries[10]
ScrollBar * scrollBar
USA only.
TextWindow * skills[6]
TextWindow * values[14]
the battle stats, the resistances, the level
TextWindow * levelLabel
"Skill LV", left of values[13]
TextWindow * options[4]
TextWindow * digimonName
A panel of the second screen (STGDGLAB_createEntryPanel): a partner's entries and its three slots.
s16 entries[47]
listPartnerEntries
s32 slot
the one the picked entry goes in
s16 slots[3]
getPartnerSlots
PanelAnim fades[2]
s32 option
the slot to digivolve to in battle, 3 for none
An entry of STGDGLAB_entries: a Digimon of the recipes (GET_DIGIMON)
s16 b
0x100-0x135, one per Digimon; only STGDGLAB_getItemB reads it, and nothing in src/ calls that (LabFun...
The lab's helpers (STGDGLAB_data.funcs)
s32(* updateFade)(PanelAnim *fade)
void(* startLerp)(MenuLerp *lerp, s32 from, s32 to, s32 frames)
s32(* filesLoading)(void)
void(* startFade)(PanelAnim *fade, s32 fadeIn)
void(* loadFiles)(void)
s32(* updateLerp)(MenuLerp *lerp)
s32(* getB)(s32 id)
s32(* getSprite)(s32 id)
TextWindow * statValues[5]
STGDGLAB_menuStats.
Definition digimon_lab.h:51
TextWindow * name
Definition digimon_lab.h:52
TextWindow * label
Definition digimon_lab.h:49
Cursor * cursor
Definition digimon_lab.h:55
TextWindow * title
Definition digimon_lab.h:47
TextWindow * options[3]
the three screens
Definition digimon_lab.h:48
struct LabEntryList * panel
Definition digimon_lab.h:56
TextWindow * statLabels[5]
Definition digimon_lab.h:50
TextWindow * entriesHint
circle shows the entries (grey without a partner)
Definition digimon_lab.h:53
The lab's main menu (STGDGLAB_createMenu)
Definition digimon_lab.h:29
s32 blinkTime
Definition digimon_lab.h:38
PanelAnim panels[9]
Definition digimon_lab.h:36
s32 choice
into STGDGLAB_screens
Definition digimon_lab.h:35
void(* close)(struct LabMenu *menu)
Definition digimon_lab.h:43
s32 memberCount
the members left and right go through
Definition digimon_lab.h:41
s32 frames[5]
the party's animations, the picked partner's, then the blinking frame's CLUT row
Definition digimon_lab.h:39
s32 animTime
Definition digimon_lab.h:37
s32 layer
Definition digimon_lab.h:33
struct Lab * lab
Definition digimon_lab.h:31
s32 depth
Definition digimon_lab.h:34
void(* open)(struct LabMenu *menu)
Definition digimon_lab.h:42
s32 picked
Definition digimon_lab.h:32
struct LabEntryList * panel
Definition digimon_lab.h:99
TextWindow * labels[5]
Definition digimon_lab.h:95
TextWindow * entriesHint
as LabMenuWindows'
Definition digimon_lab.h:98
TextWindow * values[5]
Definition digimon_lab.h:96
The main menu's first screen (STGDGLAB_createPartyScreen)
Definition digimon_lab.h:73
struct Lab * lab
Definition digimon_lab.h:75
s32 pick
into partners
Definition digimon_lab.h:80
s32 frames[3]
the party's animation frames
Definition digimon_lab.h:85
PanelAnim panels[5]
Definition digimon_lab.h:81
s32 partners[PARTNER_COUNT]
the unlocked partners outside the party, -1 for none
Definition digimon_lab.h:89
s32 pageRow
1: the page is 0x7A lower, 0 (at the top) while the entry list is open
Definition digimon_lab.h:78
s32 frame
the picked partner's
Definition digimon_lab.h:86
u8 pad[0xC4 - 0xB4]
never read or written
Definition digimon_lab.h:82
TextWindow * prev
by the arrows
TextWindow * name
the picked id's
TextWindow * title
with the partner's name
The main menu's third screen (STGDGLAB_createRecipeScreen)
PanelAnim panels[5]
s32 complete[4]
0: a recipe of the row lacks ids
s32 table
into STGDGLAB_data.recipes
s32 pad5C
never read or written
struct Lab * lab
s32 slots
how many of found[row] are in use
s32 pad298
never read or written: createTask allocates 0x29C bytes
s32 nextRow
L1 and R1 move to it.
s32 found[4][4][5]
the owned ids of each recipe
A recipe of STGDGLAB_data's tables.
Definition digimon_lab.h:60
s16 ids[5]
0: none
Definition digimon_lab.h:62
s16 needed
how many of the ids the partner must have
Definition digimon_lab.h:61
TextWindow * message
TextWindow * learned
how many skills are marked
TextWindow * mpLabel
TextWindow * learnedLabel
TextWindow * mp
the picked skill's
TextWindow * left[6]
TextWindow * right[6]
TextWindow * digimonName
A panel of the second screen (STGDGLAB_createSkillPanel)
PanelAnim confirm
PanelAnim fade
PartnerEntry entry
TextWindow * list[13]
two columns: 6, then 7
TextWindow * options[2]
struct LabSkillPanel * skillsPanel
struct LabEntryList * entryList
TextWindow * slotNames[3]
the slots' Digimon
TextWindow * message
struct LabEntryPanel * entryPanel
The main menu's second screen (STGDGLAB_createSlotScreen)
struct Lab * lab
s16 slots[3]
getPartnerSlots
u8 pad[0xC8 - 0xC0]
never read or written
PanelAnim panels[6]
s16 entries[45]
listPartnerEntries
s32 picked
the list's cursor when an entry was picked
Where a window of the menu or the first screen goes, and its string.
Definition digimon_lab.h:66
s32 string
of TEXT_DIGI_LAB, -1: none
Definition digimon_lab.h:67
The mode's main task (STGDGLAB_createLab)
s32 partySize
the party's slots: PARTY_SIZE
s32 partyCount
s32 bgScroll
s32 bgTick
void(* packParty)(struct Lab *lab)
s32(* openMenu)(struct Lab *lab)
void(* fadeOut)(struct Lab *lab)
s32(* closeMenu)(struct Lab *lab)
s32 layer
s32 member
the party member the screens show
s32(* menuOpen)(struct Lab *lab)
Moves a value towards a target in fixed point, as the menu overlays' startLerp and updateLerp do.
Definition menu.h:27
Opens or closes a menu panel: level goes 0 -> ONE in duration frames (or back at twice the speed),...
Definition menu.h:18
A partner Digimon's animation in a menu: up to seven sprite ids, -1 ending it early (the sprites are ...
Definition game_state.h:340
One of a partner's Digimon (getPartnerEntry, setPartnerEntry)
Definition game_state.h:247
Fades the whole screen to black and back with a subtractive rectangle.
Definition gfx.h:361
A vertical scroll bar, as the menu overlays (STSTATUS, STGDGLAB) draw one.
Definition menu.h:38
Any task, seen through its header.
Definition task.h:62
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
Definition text.h:131