Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
entry_panel.c
Go to the documentation of this file.
1/* The second screen's entry panel: a partner's entries and its three slots,
2 where the picked entry goes */
3
4#include "menus/digimon_lab.h"
5
6/* Creates the panel's windows and cursors */
8 s32 i;
9 TextWindow **items;
10
11 for (i = 0; i < 10; i++) {
12 windows->entries[i] = createTextWindow(panel->layer, 1, (i % 2) * 0x85 + 0x27, (i / 2) * 0xE + 0x16);
13 }
14 windows->digimonName = createTextWindow(panel->layer, 1, 0x5B, 0x6A);
15 windows->levelLabel = createTextWindow(panel->layer, 1, 0xF5, 0x6A);
16 windows->values[13] = createTextWindow(panel->layer, 1, 0x12D, 0x6A);
17 for (i = 0; i < 6; i++) {
18 windows->skills[i] = createTextWindow(panel->layer, 1, 0xC2, i * 0xE + 0x8B);
19 }
20 for (i = 0; i < 6; i++) {
21 windows->values[i] = createTextWindow(panel->layer, 1, 0x7D, i * 0xE + 0x7F);
22 }
23 for (i = 0; i < 7; i++) {
24 windows->values[i + 6] = createTextWindow(panel->layer, 1, 0xA7, i * 0xE + 0x7F);
25 }
26 for (i = 0, items = panel->children; i < panel->childCount - 3; i++, items++) {
27 if (*items != NULL) {
28 (*items)->setDepth(*items, panel->depth - 1);
29 }
30 }
31 windows->cursor = createCursor(panel->layer, panel->depth - 1, 0x1A, 0x16);
32 windows->cursor->setVisible(windows->cursor, 0);
33 windows->optionCursor = createCursor(panel->layer, panel->depth - 3, 0x9A, 0x83);
34 windows->optionCursor->setVisible(windows->optionCursor, 0);
35 for (i = 0; i < 4; i++) {
36 windows->options[i] = createTextWindow(panel->layer, 1, 0xA7, i * 0xE + 0x83);
37 }
38 windows->help = createTextWindow(panel->layer, 1, 0x14, 0xC3);
39}
40
41/* Shows the page of the partner's entries, and the stats and skills of the
42 one under the cursor; or hides the panel's windows */
44 PartnerTotals totals;
45 PartnerEntry entry;
46 DigimonData *data;
47 TextWindow **items;
48 s32 id;
49 s32 value;
50 s32 i;
51 s32 j;
52 s16 *stats;
53
54 if (show) {
55 for (i = 0; i < 10; i++) {
56 id = panel->entries[panel->scroll * 2 + i];
57 if (id >= 3) {
58 windows->entries[i]->setPalette(windows->entries[i], PALETTE_WHITE);
59 for (j = 0; j < 3; j++) {
60 if (panel->slots[j] == id) {
61 windows->entries[i]->setPalette(windows->entries[i], PALETTE_GREY);
62 break;
63 }
64 }
66 GET_DIGIMON(id)->nameId);
67 } else {
68 windows->entries[i]->setVisible(windows->entries[i], 0);
69 }
70 }
71 id = panel->entries[(panel->scroll + panel->row) * 2 + panel->col];
72 if (id != 0) {
73 GAME.funcs.getPartnerEntry(panel->partner, id, &entry);
74 GAME.funcs.computeStats(panel->partner, &totals);
75 data = GET_DIGIMON(id);
78 windows->values[13]->setNumber(windows->values[13], 0, entry.level);
79 stats = totals.stats;
80 for (i = 0; i < 6; i++) {
81 value = stats[i + 6] + data->battleStats[i];
82 if (value >= 1000) {
83 value = 999;
84 }
85 windows->values[i]->setNumber(windows->values[i], 0, value);
86 }
87 if (totals.fields.lowered[0] != 0) {
88 windows->values[0]->setPalette(windows->values[0], PALETTE_PURPLE);
89 }
90 if (totals.fields.lowered[1] != 0) {
91 windows->values[1]->setPalette(windows->values[1], PALETTE_PURPLE);
92 }
93 if (totals.fields.lowered[2] != 0) {
94 windows->values[4]->setPalette(windows->values[4], PALETTE_PURPLE);
95 }
96 stats = totals.stats;
97 for (i = 0; i < 7; i++) {
98 value = stats[i + 12] + data->resistances[i];
99 if (value >= 1000) {
100 value = 999;
101 }
102 windows->values[i + 6]->setNumber(windows->values[i + 6], 0, value);
103 }
104 for (i = 0; i < 6; i++) {
105 if (entry.skills[i] != 0) {
106 windows->skills[i]->setString(windows->skills[i], FILE_CACHE.load(TEXT_FILE(TEXT_SKILL_NAMES)),
107 entry.skills[i] & SKILL_ID);
108 if (entry.skills[i] & SKILL_LAST) {
109 windows->skills[i]->setPalette(windows->skills[i], PALETTE_YELLOW);
110 } else if (entry.skills[i] & SKILL_MARKED) {
111 windows->skills[i]->setPalette(windows->skills[i], PALETTE_GREEN);
112 } else {
113 windows->skills[i]->setPalette(windows->skills[i], PALETTE_WHITE);
114 }
115 } else {
116 windows->skills[i]->setVisible(windows->skills[i], 0);
117 }
118 }
119 for (i = 0; i < 14; i++) {
120 windows->values[i]->setRightAlign(windows->values[i], 1);
121 }
122 }
123 windows->cursor->setVisible(windows->cursor, 1);
124 } else {
125 for (i = 0, items = panel->children; i < panel->childCount - 3; i++, items++) {
126 if (*items != NULL) {
127 (*items)->setVisible(*items, 0);
128 }
129 }
130 windows->cursor->setVisible(windows->cursor, 0);
131 }
132}
133
134/* Shows the panel's options (the names of its three slots, then two strings
135 of file 0x3A), or hides them */
137 s32 i;
138
139 if (show) {
140 for (i = 0; i < 3; i++) {
142 GET_DIGIMON(panel->slots[i])->nameId);
143 }
144 windows->options[3]->setString(windows->options[3], FILE_CACHE.load(TEXT_FILE(TEXT_DIGI_LAB)), 0x2C);
145 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_DIGI_LAB)), 0x2B);
146 } else {
147 for (i = 0; i < 4; i++) {
148 windows->options[i]->setVisible(windows->options[i], 0);
149 }
150 windows->help->setVisible(windows->help, 0);
151 }
152}
153
154/* Moves the cursor over the entries: the shoulder buttons scroll five rows,
155 up and down move a row (scrolling at the edges) and left and right a column,
156 skipping empty entries; 1 when it moved */
157static inline s32 moveEntryCursor(LabEntryPanel *panel) {
158 s32 scroll;
159 s32 row;
160 s32 moved;
161 s32 rows;
162 s32 n;
163
164 scroll = panel->scroll;
165 moved = 0;
166 if (panel->entryCount >= 11) {
168 panel->scroll -= 5;
169 if (panel->scroll < 0) {
170 panel->scroll = 0;
171 }
172 } else if ((!PAD_HELD(PAD_L1) && PAD_PRESSED(PAD_R1)) ||
174 rows = panel->entryCount - panel->entryCount / 2;
175 for (n = 0; n < 5; n++) {
176 panel->scroll++;
177 if (panel->scroll + 4 > rows - 1) {
178 panel->scroll = rows - 5;
179 break;
180 }
181 }
182 }
183 if (scroll != panel->scroll) {
184 moved = 1;
185 panel->row = 0;
186 }
187 }
188 if (!moved) {
189 row = panel->row;
191 panel->row--;
192 if (panel->row < 0) {
193 panel->row = 0;
194 panel->scroll--;
195 if (panel->scroll < 0) {
196 panel->scroll = 0;
197 }
198 }
199 if (row != panel->row || scroll != panel->scroll) {
200 moved = 1;
201 }
202 } else if (PAD_PRESSED(PAD_DOWN) || PAD_REPEATED(PAD_DOWN)) {
203 if (panel->entryCount >= 10) {
204 panel->row++;
205 if (panel->row >= 5) {
206 panel->row = 4;
207 panel->scroll++;
208 if (panel->scroll > panel->entryCount - panel->entryCount / 2 - 1) {
209 panel->scroll = panel->entryCount - panel->entryCount / 2 - 1;
210 }
211 }
212 } else {
213 panel->row++;
214 if (panel->row > panel->entryCount - panel->entryCount / 2 - 1) {
215 panel->row = panel->entryCount - panel->entryCount / 2 - 1;
216 }
217 }
218 if (scroll != panel->scroll || row != panel->row) {
219 if (panel->col != 0) {
220 if (panel->entries[(panel->scroll + panel->row) * 2 + panel->col] >= 3) {
221 moved = 1;
222 } else if (panel->entries[(panel->scroll + panel->row) * 2] >= 3) {
223 panel->col = 0;
224 moved = 1;
225 }
226 } else if (panel->entries[(panel->scroll + panel->row) * 2] >= 3) {
227 moved = 1;
228 }
229 if (!moved) {
230 panel->row = row;
231 panel->scroll = scroll;
232 }
233 }
234 }
236 if (panel->col != 0) {
237 panel->col = 0;
238 moved = 1;
239 }
240 } else if ((PAD_PRESSED(PAD_RIGHT) || PAD_REPEATED(PAD_RIGHT)) && panel->col == 0 &&
241 panel->entries[(panel->scroll + panel->row) * 2 + 1] >= 3) {
242 panel->col = 1;
243 moved = 1;
244 }
245 }
246 return moved;
247}
248
249/* Cross on an entry: one already in a slot is refused; otherwise it goes in
250 the slot, and the options' panel opens when the slot held the entry the
251 partner digivolves to in battle, else the panel closes */
252static inline void putPickedEntry(LabEntryPanel *panel, LabEntryPanelWindows *windows) {
253 Partner *partner;
254 s32 id;
255 s32 k;
256
257 id = panel->entries[(panel->scroll + panel->row) * 2 + panel->col];
258 for (k = 0; k < 3; k++) {
259 if (panel->slots[k] == id) {
260 id = 0;
261 break;
262 }
263 }
264 if (id == 0) {
266 } else {
268 partner = &GAME.partners[panel->partner];
269 if (panel->slots[panel->slot] == partner->battleDigivolve) {
270 panel->substate = 2;
271 } else {
272 STGDGLAB_showEntryPanel(panel, windows, 0);
274 panel->substate = 0;
275 panel->step = 1;
276 }
277 panel->slots[panel->slot] = id;
278 GAME.funcs.setPartnerSlots(panel->partner, panel->slots);
279#if VERSION_US
280 if (windows->scrollBar != NULL) {
281 windows->scrollBar->state = TASK_KILL;
282 }
283#endif
284 }
285}
286
287/* The options' panel: up and down pick the slot to digivolve to in battle, or
288 none; cross sets it as the partner's, triangle sets none */
289static inline void pickBattleDigivolve(LabEntryPanel *panel, LabEntryPanelWindows *windows) {
290 Partner *partner;
291 s32 old;
292
293 old = panel->option;
295 panel->option--;
296 if (panel->option < 0) {
297 panel->option = 0;
298 }
299 } else if (PAD_PRESSED(PAD_DOWN) || PAD_REPEATED(PAD_DOWN)) {
300 panel->option++;
301 if (panel->option >= 4) {
302 panel->option = 3;
303 }
304 }
305 if (old != panel->option) {
307 windows->optionCursor->setPos(windows->optionCursor, 0x9A, panel->option * 0xE + 0x83);
308 }
309 partner = &GAME.partners[panel->partner];
310 if (PAD_PRESSED(PAD_CROSS)) {
312 if (panel->option < 3) {
313 partner->battleDigivolve = panel->slots[panel->option];
314 } else {
315 partner->battleDigivolve = 0;
316 }
317 panel->substate++;
318 } else if (PAD_PRESSED(PAD_TRIANGLE)) {
320 partner->battleDigivolve = 0;
321 panel->substate++;
322 }
323}
324
325/* Draws the panel: the entries' marks, the blinking scroll arrows, the frames,
326 the picked entry's skill icons and, while it is shown, the options' panel */
327static inline void drawEntryPanel(LabEntryPanel *panel) {
328 SpriteDrawer sprite;
329 PartnerEntry entry;
330 s32 i;
331 s32 j;
332
333 initSpriteDrawer(&sprite);
334 sprite.setLayerId(panel->layer, panel->depth);
335 sprite.setTexture(0x280, 0x100);
336 if (panel->fades[0].level != ONE) {
337 sprite.setScale(panel->fades[0].level, ONE, ONE);
338 sprite.setPivot(0x140, 0x37);
339 } else {
340 for (j = 0; j < 10; j++) {
341 if (panel->entries[panel->scroll * 2 + j] >= 3) {
342 sprite.draw(FILE_CACHE.getEntry(FILE_LAB_SPRITES << 16), 0x3E, (j % 2) * 0x85 + 0x18,
343 (j / 2) * 0xE + 0x16);
344 }
345 }
346 }
347 if (GFX.funcs.getTime() - panel->blinkTime >= 8) {
348 panel->blinkTime = GFX.funcs.getTime();
349 panel->blink = 1 - panel->blink;
350 }
351 if (panel->fades[0].level == ONE && panel->blink) {
352 if (panel->scroll > 0) {
353 sprite.draw(FILE_CACHE.getEntry(FILE_LAB_SPRITES << 16), 0x34, 0x123, 0x13);
354 }
355 if (panel->entryCount >= 10 && panel->scroll < panel->entryCount - panel->entryCount / 2 - 5) {
356 sprite.draw(FILE_CACHE.getEntry(FILE_LAB_SPRITES << 16), 0x35, 0x123, 0x55);
357 }
358 }
359 sprite.draw(FILE_CACHE.getEntry(FILE_LAB_SPRITES << 16), 0x29, 0x12, 0xF);
360 sprite.draw(FILE_CACHE.getEntry(FILE_LAB_SPRITES << 16), 0x2A, 0x54, 0x64);
361 sprite.setTexture(0x140, 0);
362 sprite.setLayerId(panel->layer, panel->depth - 1);
363 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), 0x14, 0x5B, 0x7F);
364 GAME.funcs.getPartnerEntry(panel->partner, panel->entries[(panel->scroll + panel->row) * 2 + panel->col],
365 &entry);
366 for (i = 0; i < 6; i++) {
367 if (entry.skills[i] != 0) {
369 TECHS[(entry.skills[i] & SKILL_ID) - 1].icon + 0x37, 0xB4, i * 0xE + 0x8B);
370 }
371 }
372 if (panel->fades[1].level != 0) {
373 initSpriteDrawer(&sprite);
374 sprite.setLayerId(panel->layer, panel->depth - 2);
375 sprite.setTexture(0x280, 0x100);
376 if (panel->fades[1].level != ONE) {
377 sprite.setScale(panel->fades[1].level, ONE, ONE);
378 sprite.setPivot(0x140, 0x9D);
379 }
380 sprite.draw(FILE_CACHE.getEntry(FILE_LAB_SPRITES << 16), 0x2C, 0x95, 0x7C);
381 if (panel->fades[1].level != ONE) {
382 sprite.setPivot(0, 0xD0);
383 }
384 sprite.draw(FILE_CACHE.getEntry(FILE_LAB_SPRITES << 16), 0x2B, 0, 0xBF);
385 }
386}
387
388/* The panel's task: lists the partner's entries two by two, with the
389 shoulder buttons scrolling five rows at a time; cross puts the picked
390 entry in the slot and, when the slot held the partner's current entry,
391 asks for the new one; triangle closes it */
393 switch (panel->state) {
394 case TASK_INIT:
395 default:
396 panel->nextState(panel);
397 panel->fades[0].duration = 10;
399 GAME.funcs.getPartnerSlots(panel->partner, panel->slots);
400 panel->entryCount = GAME.funcs.listPartnerEntries(panel->partner, panel->entries);
401 STGDGLAB_createEntryPanelWindows(panel, windows);
402 panel->fades[1].duration = 10;
403 break;
404 case TASK_RUN:
405 switch (panel->substate) {
406 case 0:
407 default:
408 if (STGDGLAB_data.funcs.updateFade(panel->fades)) {
409 if (panel->step) {
410 panel->setState(panel, TASK_KILL);
411 } else {
412#if VERSION_US
413 if (panel->entryCount >= 11) {
415 windows->scrollBar->setX(windows->scrollBar, 0x122, 0xC);
416 windows->scrollBar->setRange(windows->scrollBar, 0x1B, 0x55);
417 windows->scrollBar->setCount(windows->scrollBar, 10, panel->entryCount / 2);
418 windows->scrollBar->setPos(windows->scrollBar, 0);
419 }
420#endif
421 STGDGLAB_showEntryPanel(panel, windows, 1);
422 panel->substate++;
423 }
424 }
425 break;
426 case 1:
427 if (moveEntryCursor(panel)) {
429 windows->cursor->setPos(windows->cursor, panel->col * 0x85 + 0x1A, panel->row * 0xE + 0x16);
430 STGDGLAB_showEntryPanel(panel, windows, 1);
431#if VERSION_US
432 if (windows->scrollBar != NULL) {
433 windows->scrollBar->setPos(windows->scrollBar, panel->scroll);
434 }
435#endif
436 } else if (PAD_PRESSED(PAD_CROSS)) {
437 putPickedEntry(panel, windows);
438 } else if (PAD_PRESSED(PAD_TRIANGLE)) {
440 STGDGLAB_showEntryPanel(panel, windows, 0);
442 panel->substate = 0;
443 panel->step = 1;
444#if VERSION_US
445 if (windows->scrollBar != NULL) {
446 windows->scrollBar->state = TASK_KILL;
447 }
448#endif
449 }
450 break;
451 case 2:
452 panel->fades[1].duration = 10;
453 STGDGLAB_data.funcs.startFade(&panel->fades[1], 1);
454 windows->cursor->setPalette(windows->cursor, PALETTE_GREY);
455 windows->cursor->setStill(windows->cursor, 1);
456 panel->substate++;
457 break;
458 case 3:
459 if (STGDGLAB_data.funcs.updateFade(&panel->fades[1])) {
460 STGDGLAB_showEntryPanelOptions(panel, windows, 1);
461 panel->option = 0;
462 windows->optionCursor->setPos(windows->optionCursor, 0x9A, 0x83);
463 windows->optionCursor->setVisible(windows->optionCursor, 1);
464 panel->substate++;
465 }
466 break;
467 case 4:
468 pickBattleDigivolve(panel, windows);
469 break;
470 case 5:
471 STGDGLAB_data.funcs.startFade(&panel->fades[1], 0);
472 STGDGLAB_showEntryPanelOptions(panel, windows, 0);
473 windows->optionCursor->setVisible(windows->optionCursor, 0);
474 panel->substate++;
475 break;
476 case 6:
477 if (STGDGLAB_data.funcs.updateFade(&panel->fades[1])) {
478 panel->substate = 0;
479 panel->step = 1;
480 }
481 break;
482 }
483 drawEntryPanel(panel);
484 break;
485 case TASK_DONE:
486 case TASK_KILL:
487 break;
488 }
489}
490
491/* Creates the second screen's panel (task) where one of the partner's entries
492 is picked for one of its three slots */
495
496 panel->layer = SCREEN_LAYER;
497 panel->depth = 6;
498 panel->partner = partner;
499 panel->slot = slot;
500 return panel;
501}
#define NULL
Definition common.h:17
signed int s32
Definition common.h:11
signed short s16
Definition common.h:9
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.
Definition digimon_lab.h:25
GfxState GFX
GFX: the graphics state and its methods.
Definition display.c:209
GameState GAME
The save data, the game mode and the methods.
Definition state.c:64
#define TASK_RUN
Definition task.h:35
#define TASK_KILL
Definition task.h:37
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Definition task.h:34
#define TASK_DONE
Definition task.h:36
Cursor * createCursor(s16 layerId, s32 depth, s16 x, s16 y)
A menu cursor on a layer at (x, y)
Definition cursor.c:92
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...
Definition entry_panel.c:43
void STGDGLAB_createEntryPanelWindows(LabEntryPanel *panel, LabEntryPanelWindows *windows)
Creates the panel's windows and cursors.
Definition entry_panel.c:7
#define TEXT_DIGI_LAB
DGLABO: STGDGLAB's.
Definition file.h:208
#define TEXT_SKILL_NAMES
SKLNAM.
Definition file.h:223
#define TEXT_FILE(file)
Definition file.h:190
#define TEXT_DIGIMON_NAMES
DIGNAM.
Definition file.h:211
#define FILE_MENU_SPRITES
Files the engine loads by number.
Definition file.h:188
FileCache FILE_CACHE
The file cache.
Definition file_cache.c:7
#define SKILL_MARKED
marked in the lab (STGDGLAB_updateSkillPanel)
Definition game_state.h:257
#define SKILL_LAST
the sixth skill
Definition game_state.h:258
#define SKILL_ID
PartnerEntry.skills.
Definition game_state.h:255
DigimonData *(* GET_DIGIMON)(s32 id)
getDigimon for the overlays, in the small data (.sdata) between game/items.c's and file/file_table....
Definition get_digimon.c:10
#define SCREEN_LAYER
The layer over the whole screen that most modes create first and draw their menus on (FIELDSTG and ST...
Definition gfx.h:45
TechData TECHS[443]
The techniques, from 1: technique n is TECHS[n - 1].
Definition items.c:906
LabData STGDGLAB_data
Definition lab.c:611
#define PAD_CROSS
Definition pad.h:31
#define PAD_DOWN
Definition pad.h:24
#define PAD_RIGHT
Definition pad.h:23
#define PAD_TRIANGLE
Definition pad.h:32
#define PAD_PRESSED(button)
One button of pad 1: newly pressed, auto-repeated while held, or held.
Definition pad.h:140
#define PAD_UP
Definition pad.h:22
#define PAD_L1
Definition pad.h:28
#define PAD_LEFT
Definition pad.h:25
#define PAD_HELD(button)
Definition pad.h:142
#define PAD_R1
Definition pad.h:29
#define PAD_REPEATED(button)
Definition pad.h:141
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
Definition sound.c:180
#define SOUND_SELECT
Sounds the overlays share, with SOUNDTST's names.
Definition sound.h:38
#define SOUND_MENU_CANCEL
SYSTEM01.
Definition sound.h:39
#define SOUND_CURSOR
SYSTEM02: a cursor moves.
Definition sound.h:40
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
void(* setPalette)()
Definition text.h:35
void(* setPos)()
(cursor, x, y)
Definition text.h:34
void(* setStill)()
Definition text.h:38
void(* setVisible)()
(cursor, visible)
Definition text.h:33
Digimon definition (DIGIMON_DATA, 52 of them; the first 8 are the partners)
Definition game_state.h:86
u8 nameId
string in file 0x4F
Definition game_state.h:105
u16 battleStats[6]
Definition game_state.h:88
u16 resistances[7]
Definition game_state.h:89
void *(* load)(u32 file)
Definition file.h:92
void *(* getEntry)(u32 fileAndIndex)
Definition file.h:96
s32(* getPartnerEntry)()
-1 if it hasn't the Digimon
Definition game_state.h:36
void(* computeStats)(s32 partner, union PartnerTotals *out)
Definition game_state.h:31
void(* setPartnerSlots)()
Definition game_state.h:33
s32(* getPartnerSlots)()
(partner, s16 *out): the count
Definition game_state.h:32
s32(* listPartnerEntries)()
(partner, s16 *out): the count
Definition game_state.h:34
Partner partners[PARTNER_COUNT]
Definition game_state.h:517
GameFuncs funcs
Definition game_state.h:582
s32(* getTime)(void)
Definition gfx.h:31
GfxFuncs funcs
Definition gfx.h:77
LabFuncs funcs
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.
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
PanelAnim fades[2]
s32 option
the slot to digivolve to in battle, 3 for none
s32(* updateFade)(PanelAnim *fade)
void(* startFade)(PanelAnim *fade, s32 fadeIn)
s32 level
Definition menu.h:21
s32 duration
Definition menu.h:19
One of a partner's Digimon (getPartnerEntry, setPartnerEntry)
Definition game_state.h:247
s8 level
shown in the lab; 1 when added
Definition game_state.h:249
s16 skills[6]
SKILL_ID and the flags below, 0 for none.
Definition game_state.h:251
One of the eight partner Digimon.
Definition game_state.h:345
s32 battleDigivolve
an entry id, compared with the slots': the Digimon the battle starts it as, 0 for its own
Definition game_state.h:348
void(* setCount)(struct ScrollBar *bar, s32 pageSize, s32 count)
Definition menu.h:57
void(* setPos)(struct ScrollBar *bar, s32 pos)
Definition menu.h:58
void(* setRange)(struct ScrollBar *bar, s32 top, s32 bottom)
Definition menu.h:56
s32 state
Definition menu.h:39
void(* setX)(struct ScrollBar *bar, s32 x, s32 width)
Definition menu.h:55
short(* playSound)(s32 id)
returns the voice of a key-on
Definition sound.h:187
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
Definition gfx.h:223
void(* setPivot)()
(x, y)
Definition gfx.h:250
void(* setScale)()
(x, y, z), ONE = 1.0
Definition gfx.h:248
void(* setLayerId)()
(id, depth)
Definition gfx.h:244
void(* draw)()
(sheet, frame, x, y)
Definition gfx.h:246
void(* setTexture)()
(x, y)
Definition gfx.h:242
u8 icon
a frame of the menu sprites, from 0x37
Definition game_state.h:113
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
Definition text.h:131
void(* setPalette)(struct TextWindow *obj, u8 arg)
Definition text.h:174
void(* setRightAlign)()
no prototype: callers would truncate u8 args
Definition text.h:178
void(* setNumber)()
Definition text.h:166
void(* setString)()
Definition text.h:165
void(* setVisible)(struct TextWindow *obj, u8 arg)
Definition text.h:177
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
Definition task.c:105
#define PALETTE_GREEN
Definition text.h:116
#define PALETTE_PURPLE
Definition text.h:118
#define PALETTE_WHITE
The text windows' palettes (TextWindow.palette, setPalette): rows of the font's CLUTs,...
Definition text.h:112
#define PALETTE_YELLOW
Definition text.h:115
#define PALETTE_GREY
what is unavailable
Definition text.h:119
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.
Definition game_state.h:409
s16 lowered[3]
taken from battle[0], [1] and [4]
Definition game_state.h:421
s16 stats[24]
Definition game_state.h:410
struct PartnerTotals::@10 fields