Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
status_screen.c
Go to the documentation of this file.
1/* The fifth object of STSTATUS.PRO (see card_screen.c), the fifth screen
2 (STSTATUS_createStatusScreen): its rodata starts at 0x800828B0 (USA). */
3
4#include "menus/field_menu.h"
5
6/* Creates the windows of the fifth screen */
8 WindowPos *pos;
9 s32 i;
10 s32 j;
11
12 pos = &STSTATUS_data.layout[11];
13 windows->title = createTextWindow(screen->layer, 1, pos->x, pos->y);
14 for (j = 0; j < 3; j++) {
15 pos = &STSTATUS_data.layout[0];
16 windows->pages[j].name = createTextWindow(screen->layer, 1, pos->x, pos->y + j * 46);
17 pos = &STSTATUS_data.layout[1];
18 for (i = 0; i < 5; i++, pos++) {
19 windows->pages[j].labels[i] = createTextWindow(screen->layer, 3, pos->x, pos->y + j * 46);
20 }
21 pos = &STSTATUS_data.layout[6];
22 for (i = 0; i < 5; i++, pos++) {
23 windows->pages[j].values[i] = createTextWindow(screen->layer, 3, pos->x, pos->y + j * 46);
24 }
25 }
26 pos = &STSTATUS_data.layout[12];
27 windows->help = createTextWindow(screen->layer, 1, pos->x, pos->y);
28 windows->help->setLines(windows->help, 2);
29 windows->help2 = createTextWindow(screen->layer, 1, pos->x, pos->y + 14);
30 for (i = 0; i < 2; i++) {
31 windows->options[i] = createTextWindow(screen->layer, 1, 0xAC, 0x13 + i * 14);
32 }
33 windows->cursor = createCursor(screen->layer, screen->depth - 1, 0x98, screen->option * 14 + 0x13);
34 windows->cursor->setVisible(windows->cursor, 0);
35 windows->exp = createTextWindow(screen->layer, 3, 0x42, 0x45);
36 windows->expLabel = createTextWindow(screen->layer, 3, 0x46, 0x45);
37 windows->slotTitle = createTextWindow(screen->layer, 1, 0xA7, 0x37);
38 for (i = 0; i < 3; i++) {
39 windows->slots[i] = createTextWindow(screen->layer, 1, 0xB2, 0x47 + i * 14);
40 }
41 windows->equipTitle = createTextWindow(screen->layer, 1, 0xA7, 0x79);
42 for (i = 0; i < 6; i++) {
43 windows->equip[i] = createTextWindow(screen->layer, 1, 0xC0, 0x89 + i * 14);
44 }
45 for (i = 0; i < 6; i++) {
46 windows->values[i] = createTextWindow(screen->layer, 1, 0x32, 0x5B + i * 14);
47 }
48 for (i = 0; i < 7; i++) {
49 windows->values[6 + i] = createTextWindow(screen->layer, 1, 0x5B, 0x5B + i * 14);
50 }
51 windows->tpLabel = createTextWindow(screen->layer, 1, 0x10, 0xCB);
52 windows->tpLabel->setDepth(windows->tpLabel, screen->depth - 1);
53 windows->tp = createTextWindow(screen->layer, 1, 0x2D, 0xCB);
54 windows->tp->setDepth(windows->tp, screen->depth - 1);
55}
56
57/* As STSTATUS_showCardPage */
58void STSTATUS_showStatusPage(StatsScreen *screen, StatsScreenWindows *windows, s32 member, s32 show) {
59 PartnerTotals stats;
60 WindowPos *layout;
61 s32 id;
62 s32 i;
63
64 if (show) {
65 id = GAME.funcs.getPartyMember(member);
66 GAME.funcs.computeStats(id, &stats);
67 windows->pages[member].name->setString(windows->pages[member].name, GAME.funcs.getPartnerStats(id), -1);
68 layout = &STSTATUS_data.layout[1];
69 for (i = 0; i < 5; i++, layout++) {
70 windows->pages[member].labels[i]->setString(windows->pages[member].labels[i],
72 }
73 for (i = 0; i < 5; i++) {
74 windows->pages[member].values[i]->setNumber(windows->pages[member].values[i], 0, stats.stats[STSTATUS_pageStats4[i]]);
75 windows->pages[member].values[i]->setRightAlign(windows->pages[member].values[i], 1);
76 }
77 } else {
78 windows->pages[member].name->setVisible(windows->pages[member].name, 0);
79 for (i = 0; i < 5; i++) {
80 windows->pages[member].labels[i]->setVisible(windows->pages[member].labels[i], 0);
81 }
82 for (i = 0; i < 5; i++) {
83 windows->pages[member].values[i]->setVisible(windows->pages[member].values[i], 0);
84 }
85 }
86}
87
88/* As STSTATUS_showStatusPage, on the first page */
89void STSTATUS_showChosenPage(StatsScreen *screen, StatsScreenWindows *windows, s32 member, s32 show) {
90 PartnerTotals stats;
91 WindowPos *layout;
92 PartnerStats *partner;
93 s32 id;
94 s32 i;
95
96 if (show) {
97 id = GAME.funcs.getPartyMember(member);
98 partner = GAME.funcs.getPartnerStats(id);
99 GAME.funcs.computeStats(id, &stats);
100 windows->pages[0].name->setString(windows->pages[0].name, partner, -1);
101 layout = &STSTATUS_data.layout[1];
102 for (i = 0; i < 5; i++, layout++) {
103 windows->pages[0].labels[i]->setString(windows->pages[0].labels[i], FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)),
104 layout->string);
105 }
106 for (i = 0; i < 5; i++) {
107 windows->pages[0].values[i]->setNumber(windows->pages[0].values[i], 0, stats.stats[STSTATUS_pageStats4[i]]);
108 windows->pages[0].values[i]->setRightAlign(windows->pages[0].values[i], 1);
109 }
110 } else {
111 windows->pages[0].name->setVisible(windows->pages[0].name, 0);
112 for (i = 0; i < 5; i++) {
113 windows->pages[0].labels[i]->setVisible(windows->pages[0].labels[i], 0);
114 }
115 for (i = 0; i < 5; i++) {
116 windows->pages[0].values[i]->setVisible(windows->pages[0].values[i], 0);
117 }
118 }
119}
120
121/* Shows or hides the fifth screen's two options: the digivolution panel and the
122 equipment panel */
124 s32 i;
125
126 if (show != 0) {
127 for (i = 0; i < 2; i++) {
128 windows->options[i]->setString(windows->options[i], FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), i + 0x2D);
129 }
130 } else {
131 for (i = 0; i < 2; i++) {
132 windows->options[i]->setVisible(windows->options[i], 0);
133 }
134 }
135}
136
137/* The partner's slots: the entries in it (getPartnerSlots), the one it starts
138 battles as (battleDigivolve) in palette 1, or hides them */
140 s16 slots[4];
141 Partner *partner;
142 DigimonData *entry;
143 s32 id;
144 s32 i;
145
146 if (show) {
147 id = GAME.funcs.getPartyMember(screen->member);
148 GAME.funcs.getPartnerSlots(id, slots);
149 partner = &GAME.partners[id];
150 windows->slotTitle->setString(windows->slotTitle, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x34);
151 for (i = 0; i < 3; i++) {
152 if (slots[i] >= 4) {
153 entry = GET_DIGIMON(slots[i]);
154 windows->slots[i]->setString(windows->slots[i], FILE_CACHE.load(TEXT_FILE(TEXT_DIGIMON_NAMES)), entry->nameId);
155 if (partner->battleDigivolve == slots[i]) {
156 windows->slots[i]->setPalette(windows->slots[i], PALETTE_BLUE);
157 } else {
158 windows->slots[i]->setPalette(windows->slots[i], PALETTE_WHITE);
159 }
160 } else {
161 windows->slots[i]->setVisible(windows->slots[i], 0);
162 }
163 }
164 } else {
165 windows->slotTitle->setVisible(windows->slotTitle, 0);
166 for (i = 0; i < 3; i++) {
167 windows->slots[i]->setVisible(windows->slots[i], 0);
168 }
169 }
170}
171
172/* The party member's equipment, or the slots' names where it has none */
174 PartnerStats *stats;
175 s16 item;
176 s32 i;
177
178 if (show) {
181 for (i = 0; i < 6; i++) {
182 item = stats->equip[i];
183 if (item != 0) {
184 windows->equip[i]->setString(windows->equip[i], FILE_CACHE.load(TEXT_FILE(TEXT_ITEM_NAMES)), item);
185 } else {
187 }
188 }
189 } else {
190 windows->equipTitle->setVisible(windows->equipTitle, 0);
191 for (i = 0; i < 6; i++) {
192 windows->equip[i]->setVisible(windows->equip[i], 0);
193 }
194 }
195}
196
197/* Shows the party member's stats, in another palette the ones that are raised */
199 PartnerTotals totals;
200 s32 value;
201 s32 i;
202
203 if (show) {
205 for (i = 0; i < 6; i++) {
206 value = totals.stats[STSTATUS_equipStats[i]];
207 if (value >= 1000) {
208 value = 999;
209 }
210 windows->values[i]->setNumber(windows->values[i], 0, value);
211 }
212 for (i = 0; i < 7; i++) {
213 value = totals.stats[STSTATUS_equipStats[i + 6]];
214 if (value >= 1000) {
215 value = 999;
216 }
217 windows->values[i + 6]->setNumber(windows->values[i + 6], 0, value);
218 }
219 for (i = 0; i < 13; i++) {
220 windows->values[i]->setRightAlign(windows->values[i], 1);
221 windows->values[i]->setPalette(windows->values[i], PALETTE_WHITE);
222 }
223 windows->tpLabel->setString(windows->tpLabel, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x4E);
224 windows->tp->setNumber(windows->tp, 0, totals.fields.tp);
225 windows->tp->setRightAlign(windows->tp, 1);
226 if (totals.fields.lowered[0]) {
227 windows->values[0]->setPalette(windows->values[0], PALETTE_PURPLE);
228 }
229 if (totals.fields.lowered[1]) {
230 windows->values[1]->setPalette(windows->values[1], PALETTE_PURPLE);
231 }
232 if (totals.fields.lowered[2]) {
233 windows->values[4]->setPalette(windows->values[4], PALETTE_PURPLE);
234 }
235 } else {
236 for (i = 0; i < 13; i++) {
237 windows->values[i]->setVisible(windows->values[i], 0);
238 }
239 windows->tpLabel->setVisible(windows->tpLabel, 0);
240 windows->tp->setVisible(windows->tp, 0);
241 }
242}
243
244/* Shows the party member's stats as they would be with the item in the
245 slot, in another palette the ones it changes (slot -1: as they are) */
246void STSTATUS_previewStats(StatsScreen *screen, s32 slot, s32 item) {
247 StatsScreenWindows *windows = screen->children;
248 PartnerTotals now;
249 PartnerTotals then;
250 PartnerEquip saved;
251 PartnerStats *stats;
252 s16 *equip;
253 s16 *hand;
254 ItemData *data;
255 s32 id;
256 s32 group;
257 s32 i;
258 s32 j;
259 s32 before;
260 s32 after;
261
262 if (slot == -1) {
263 STSTATUS_showPartnerStats(screen, windows, 1);
264 return;
265 }
266 id = GAME.funcs.getPartyMember(screen->member);
267 stats = GAME.funcs.getPartnerStats(id);
268 GAME.funcs.computeStats(id, &now);
269 /* the six slots are saved and restored as one struct copy;
270 PartnerStats.equip is a plain array */
271 saved = *(PartnerEquip *)stats->equip;
272 if (*(stats->equip + slot) != 0) {
273 data = ITEM_FUNCS.get(*(stats->equip + slot))->data.record;
274 if (data->weapon.kind == EQUIP_KIND_BOTH_HANDS) {
275 stats->equip[2] = 0;
276 stats->equip[3] = 0;
277 } else {
278 *(stats->equip + slot) = 0;
279 }
280 }
281 if (item > 0) {
282 data = ITEM_FUNCS.get(item)->data.record;
283 if (data->weapon.kind == EQUIP_KIND_BOTH_HANDS) {
284 hand = &stats->equip[2];
285 if (*hand == 0) {
286 hand = NULL;
287 if (stats->equip[3] != 0) {
288 hand = &stats->equip[3];
289 }
290 }
291 if (hand != NULL) {
292 *hand = 0;
293 }
294 } else if (data->weapon.kind == EQUIP_KIND_GROUP_ACCESSORY) {
295 group = data->weapon.group;
296 for (j = 0; j < 2; j++) {
297 equip = &stats->equip[j + 4];
298 if (*equip != 0) {
299 data = ITEM_FUNCS.get(*equip)->data.record;
300 if (data->weapon.group == group) {
301 *equip = 0;
302 }
303 }
304 }
305 }
306 data = ITEM_FUNCS.get(item)->data.record;
307 if (data->weapon.kind == EQUIP_KIND_BOTH_HANDS) {
308 stats->equip[2] = item;
309 stats->equip[3] = item;
310 } else {
311 *(stats->equip + slot) = item;
312 }
313 }
314 GAME.funcs.computeStats(id, &then);
315 *(PartnerEquip *)stats->equip = saved;
316 for (i = 0; i < 6; i++) {
317 /* sums and not then.stats[...]: the match depends on them, which put
318 the index first in the addu */
319 after = *(then.stats + STSTATUS_equipStats[i]);
320 before = *(now.stats + STSTATUS_equipStats[i]);
321 if (after >= 1000) {
322 windows->values[i]->setNumber(windows->values[i], 0, 999);
323 } else {
324 windows->values[i]->setNumber(windows->values[i], 0, after);
325 }
326 if (before < after) {
327 windows->values[i]->setPalette(windows->values[i], PALETTE_BLUE);
328 } else if (after < before) {
329 windows->values[i]->setPalette(windows->values[i], PALETTE_RED);
330 } else {
331 windows->values[i]->setPalette(windows->values[i], PALETTE_WHITE);
332 if (i == 0) {
333 if (now.fields.lowered[0]) {
334 windows->values[0]->setPalette(windows->values[0], PALETTE_PURPLE);
335 }
336 } else if (i == 1) {
337 if (now.fields.lowered[1]) {
338 windows->values[1]->setPalette(windows->values[1], PALETTE_PURPLE);
339 }
340 } else if (i == 4 && now.fields.lowered[2]) {
341 windows->values[4]->setPalette(windows->values[4], PALETTE_PURPLE);
342 }
343 }
344 }
345 for (i = 0; i < 7; i++) {
346 after = *(then.stats + STSTATUS_equipStats[i + 6]);
347 before = *(now.stats + STSTATUS_equipStats[i + 6]);
348 if (after >= 1000) {
349 windows->values[i + 6]->setNumber(windows->values[i + 6], 0, 999);
350 } else {
351 windows->values[i + 6]->setNumber(windows->values[i + 6], 0, after);
352 }
353 if (before < after) {
354 windows->values[i + 6]->setPalette(windows->values[i + 6], PALETTE_BLUE);
355 } else if (after < before) {
356 windows->values[i + 6]->setPalette(windows->values[i + 6], PALETTE_RED);
357 } else {
358 windows->values[i + 6]->setPalette(windows->values[i + 6], PALETTE_WHITE);
359 }
360 }
361 for (i = 0; i < 13; i++) {
362 windows->values[i]->setRightAlign(windows->values[i], 1);
363 }
364}
365
366/* Moves the member cursor's palette on every 9 frames */
367static inline void STSTATUS_stepStatusCursor(StatsScreen *screen) {
368 if (GFX.funcs.getTime() - screen->cursorTime >= 9) {
369 screen->cursorTime = GFX.funcs.getTime();
370 screen->cursorFrame++;
371 if (screen->cursorFrame >= 8) {
372 screen->cursorFrame = 0;
373 }
374 }
375}
376
377/* Draws the partners' portraits and frames, the chosen one's, its equipment
378 and the panels' frames */
380 SpriteDrawer sprite;
381 PartnerStats *stats;
382 s32 item;
383 s32 id;
384 s32 i;
385
386 initSpriteDrawer(&sprite);
387 sprite.setLayerId(screen->layer, screen->depth);
388 if (GFX.funcs.getTime() - screen->frameTime >= 13) {
389 screen->frameTime = GFX.funcs.getTime();
390 for (i = 0; i < screen->count; i++) {
391 id = GAME.funcs.getPartyMember(i);
392 screen->frames[i]++;
393 if (STSTATUS_data.partnerAnims[id].frames[screen->frames[i]] == -1 ||
394 screen->frames[i] >= 7) {
395 screen->frames[i] = 0;
396 }
397 }
398 }
399 sprite.setTexture(0x280, 0x100);
400 for (i = 0; i < screen->count; i++) {
401 if (screen->pageFades[i].level != 0) {
402 ZOOM_SPRITE(sprite, screen->pageFades[i].level, 0x7C, i * 0x2E + 0x27);
403 id = GAME.funcs.getPartyMember(i);
405 STSTATUS_data.partnerAnims[id].frames[screen->frames[i]], 0x6B,
406 i * 0x2E + 0x13);
407 }
408 }
409 sprite.setTexture(0x140, 0);
410 DRAW_PAGE_PANELS(sprite, screen, i);
411 if (screen->panelFades[0].level != 0) {
412 sprite.setTexture(0x280, 0x100);
413 ZOOM_SPRITE(sprite, screen->panelFades[0].level, 0x7C, 0x27);
414 id = GAME.funcs.getPartyMember(screen->member);
416 STSTATUS_data.partnerAnims[id].frames[screen->frames[screen->member]], 0x6B, 0x13);
417 sprite.setTexture(0x140, 0);
418 if (screen->panelFades[0].level != ONE) {
419 sprite.setScale(screen->panelFades[0].level, ONE, ONE);
420 sprite.setPivot(0, 0x25);
421 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), 0x15, 0, 0x11);
422 sprite.setScale(screen->panelFades[0].level, screen->panelFades[0].level, ONE);
423 sprite.setPivot(0x7C, 0x27);
424 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), 0x16, 0x67, 0x13);
425 sprite.setScale(screen->panelFades[0].level, ONE, ONE);
426 sprite.setPivot(0, 0x25);
427 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), 0x17, 0, 0x11);
428 } else {
429 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), 0x15, 0, 0x11);
430 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), 0x16, 0x67, 0x13);
431 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), 0x17, 0, 0x11);
432 }
433 }
434 if (screen->fades[0].level != 0) {
435 STRETCH_SPRITE(sprite, screen->fades[0].level, 0x140, 0x19);
436 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), 0x18, 0x22, 0xD);
437 }
438 if (screen->panelFades[5].level != 0) {
439 STRETCH_SPRITE(sprite, screen->panelFades[5].level, 0, 0x47);
440 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), 0x1A, 0, 0x3D);
441 }
442 sprite.setTexture(0x280, 0x100);
443 if (screen->fades[1].level != 0) {
444 STRETCH_SPRITE(sprite, screen->fades[1].level, 0, 0xD3);
445 sprite.draw(FILE_CACHE.getEntry(FILE_STATUS_SPRITES << 16), 0x20, 0, 0xC2);
446 }
447 if (screen->panelFades[2].level != 0) {
448 STRETCH_SPRITE(sprite, screen->panelFades[2].level, 0, 0x88);
449 sprite.setTexture(0x140, 0);
450 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), 0xF, 0, 0x57);
451 sprite.setTexture(0x280, 0x100);
452 sprite.draw(FILE_CACHE.getEntry(FILE_STATUS_SPRITES << 16), 0x21, 0, 0x54);
453 if (screen->panelFades[2].level != ONE) {
454 sprite.setPivot(0, 0xD0);
455 }
456 sprite.draw(FILE_CACHE.getEntry(FILE_STATUS_SPRITES << 16), 0x3C, 0, 0xC4);
457 }
458 if (screen->panelFades[3].level != 0) {
459 STRETCH_SPRITE(sprite, screen->panelFades[3].level, 0x140, 0x55);
460 sprite.draw(FILE_CACHE.getEntry(FILE_STATUS_SPRITES << 16), 0x22, 0xA0, 0x35);
461 }
462 if (screen->panelFades[4].level != 0) {
463 if (screen->panelFades[4].level != ONE) {
464 sprite.setScale(screen->panelFades[4].level, ONE, ONE);
465 sprite.setPivot(0x140, 0xAC);
466 } else {
467 sprite.setScale(ONE, ONE, ONE);
469 for (i = 0; i < 6; i++) {
470 item = stats->equip[i];
471 if (item > 0) {
472 sprite.setTexture(0x140, 0);
474 i * 14 + 0x89);
475 }
476 }
477 }
478 sprite.setTexture(0x280, 0x100);
479 sprite.draw(FILE_CACHE.getEntry(FILE_STATUS_SPRITES << 16), 0x23, 0xA0, 0x77);
480 }
481 if (screen->panelFades[1].level != 0) {
482 STRETCH_SPRITE(sprite, screen->panelFades[1].level, 0x140, 0x20);
483 sprite.draw(FILE_CACHE.getEntry(FILE_STATUS_SPRITES << 16), 0x1F, 0x14, 0xD);
484 }
485 if (screen->cursorShown) {
487 initSpriteDrawer(&sprite);
488 sprite.setLayerId(screen->layer, screen->depth - 1);
489 sprite.setTexture(0x280, 0x100);
490 sprite.setClutRow(screen->cursorFrame);
491 sprite.draw(FILE_CACHE.getEntry(FILE_STATUS_SPRITES << 16), 0x1E, 0, screen->member * 0x2E + 0x11);
492 }
493}
494
495/* Runs the fifth screen's question: the panels come in, the cursor picks
496 one of the two options and the panels go out */
498 s32 option;
499 s16 unused[4]; /* unused, but it is in the original stack frame */
500
501 switch (screen->step) {
502 case 0:
503 default:
504 if (screen->counter == 0) {
505 STSTATUS_data.funcs.startFade(&screen->panelFades[0], 1);
506 }
507 STSTATUS_data.funcs.startFade(&screen->panelFades[1], 1);
508 screen->step++;
509 break;
510 case 1:
511 if (screen->counter == 0) {
513 }
514 if (STSTATUS_data.funcs.updateFade(&screen->panelFades[1])) {
515 if (screen->panelFades[5].level == 0) {
516 STSTATUS_data.funcs.startFade(&screen->panelFades[5], 1);
517 }
518 STSTATUS_data.funcs.startFade(&screen->panelFades[3], 1);
519 STSTATUS_showChosenPage(screen, windows, screen->member, 1);
520 STSTATUS_showStatusChoices(screen, windows, 1);
521 screen->step++;
522 }
523 break;
524 case 2:
526 if (STSTATUS_data.funcs.updateFade(&screen->panelFades[3])) {
527 if (screen->panelFades[2].level == 0) {
528 STSTATUS_data.funcs.startFade(&screen->panelFades[2], 1);
529 }
530 STSTATUS_data.funcs.startFade(&screen->panelFades[4], 1);
531 STSTATUS_showPartnerSlots(screen, windows, 1);
532 windows->exp->setNumber(windows->exp, 0,
534 windows->exp->setRightAlign(windows->exp, 1);
535 windows->expLabel->setString(windows->expLabel, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x35);
536 windows->cursor->setPos(windows->cursor, 0x98, screen->option * 14 + 0x13);
537 windows->cursor->setVisible(windows->cursor, 1);
538 screen->step++;
539 }
540 break;
541 case 3:
543 if (STSTATUS_data.funcs.updateFade(&screen->panelFades[4])) {
544 STSTATUS_showPartnerEquipment(screen, windows, 1);
545 STSTATUS_showPartnerStats(screen, windows, 1);
546 screen->step = 5;
547 }
548 break;
549 case 5:
550 option = screen->option;
552 screen->option = 0;
553 } else if (PAD_PRESSED(PAD_DOWN) || PAD_REPEATED(PAD_DOWN)) {
554 screen->option = 1;
555 }
556 if (option != screen->option) {
558 windows->cursor->setPos(windows->cursor, 0x98, screen->option * 14 + 0x13);
559 } else if (PAD_PRESSED(PAD_CROSS)) {
561 screen->step = 10;
562 screen->counter = 0;
563 } else if (PAD_PRESSED(PAD_TRIANGLE)) {
565 screen->step = 10;
566 screen->option = 0;
567 screen->counter = 1;
568 }
569 break;
570 case 10:
571 if (screen->counter) {
572 STSTATUS_data.funcs.startFade(&screen->panelFades[0], 0);
573 STSTATUS_showChosenPage(screen, windows, 0, 0);
574 }
575 STSTATUS_data.funcs.startFade(&screen->panelFades[1], 0);
576 STSTATUS_data.funcs.startFade(&screen->panelFades[3], 0);
577 STSTATUS_data.funcs.startFade(&screen->panelFades[4], 0);
578 STSTATUS_showStatusChoices(screen, windows, 0);
579 STSTATUS_showPartnerSlots(screen, windows, 0);
580 STSTATUS_showPartnerEquipment(screen, windows, 0);
581 if (screen->option == 0) {
582 STSTATUS_data.funcs.startFade(&screen->panelFades[5], 0);
583 STSTATUS_data.funcs.startFade(&screen->panelFades[2], 0);
584 STSTATUS_showPartnerStats(screen, windows, 0);
585 windows->exp->setVisible(windows->exp, 0);
586 windows->expLabel->setVisible(windows->expLabel, 0);
587 }
588 windows->cursor->setVisible(windows->cursor, 0);
589 screen->step++;
590 break;
591 case 11:
592 if (screen->counter) {
594 }
597 if (screen->option == 0) {
600 }
601 if (STSTATUS_data.funcs.updateFade(&screen->panelFades[4])) {
602 screen->step++;
603 }
604 break;
605 case 12:
606 if (screen->counter) {
607 screen->setSubstate(screen, 0);
608 } else {
609 screen->setSubstate(screen, 0x14);
610 }
611 break;
612 }
613}
614
615/* Starts the fades of the first page and the title (and, with one party
616 member, of the help's panel); the next substate is the party's size */
617static inline void STSTATUS_startStatusScreen(StatsScreen *screen) {
618 STSTATUS_data.funcs.startFade(&screen->pageFades[0], 1);
619 STSTATUS_data.funcs.startFade(&screen->fades[0], 1);
620 if (screen->count == 1) {
621 STSTATUS_data.funcs.startFade(&screen->fades[1], 1);
622 }
623 screen->substate = screen->count;
624}
625
626/* One member: once the page and the panels are in, shows the page, the title
627 and the help */
628static inline void STSTATUS_openStatusScreenAlone(StatsScreen *screen, StatsScreenWindows *windows) {
630 STSTATUS_data.funcs.updateFade(&screen->fades[0]);
631 if (STSTATUS_data.funcs.updateFade(&screen->fades[1])) {
632 STSTATUS_showStatusPage(screen, windows, 0, 1);
633 windows->title->setString(windows->title, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x27);
634 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x30);
635 windows->help2->setString(windows->help2, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x15);
636 screen->substate = 10;
637 }
638}
639
640/* Two members: once the first page and the title are in, shows them and
641 starts the second page and the help's panel */
644 if (STSTATUS_data.funcs.updateFade(&screen->fades[0])) {
645 STSTATUS_data.funcs.startFade(&screen->pageFades[1], 1);
646 STSTATUS_data.funcs.startFade(&screen->fades[1], 1);
647 STSTATUS_showStatusPage(screen, windows, 0, 1);
648 windows->title->setString(windows->title, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x27);
649 screen->substate = 4;
650 }
651}
652
653/* Two members: once the second page and the help's panel are in, shows the
654 page and the help */
657 if (STSTATUS_data.funcs.updateFade(&screen->fades[1])) {
658 STSTATUS_showStatusPage(screen, windows, 1, 1);
659 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x30);
660 windows->help2->setString(windows->help2, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x15);
661 screen->substate = 10;
662 }
663}
664
665/* Three members: once the first page and the title are in, shows them and
666 starts the second page */
669 if (STSTATUS_data.funcs.updateFade(&screen->fades[0])) {
670 STSTATUS_data.funcs.startFade(&screen->pageFades[1], 1);
671 STSTATUS_showStatusPage(screen, windows, 0, 1);
672 windows->title->setString(windows->title, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x27);
673 screen->substate = 5;
674 }
675}
676
677/* Three members: once the second page is in, shows it and starts the third
678 page and the help's panel */
680 if (STSTATUS_data.funcs.updateFade(&screen->pageFades[1])) {
681 STSTATUS_data.funcs.startFade(&screen->pageFades[2], 1);
682 STSTATUS_data.funcs.startFade(&screen->fades[1], 1);
683 STSTATUS_showStatusPage(screen, windows, 1, 1);
684 screen->substate++;
685 }
686}
687
688/* Three members: once the third page and the help's panel are in, shows the
689 page and the help */
690static inline void STSTATUS_openThirdStatusPage(StatsScreen *screen, StatsScreenWindows *windows) {
692 if (STSTATUS_data.funcs.updateFade(&screen->fades[1])) {
693 STSTATUS_showStatusPage(screen, windows, 2, 1);
694 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x30);
695 windows->help2->setString(windows->help2, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x15);
696 screen->substate = 10;
697 }
698}
699
700/* Choosing a party member: up and down move the cursor, cross closes the
701 pages for the member's question, triangle closes the screen */
702static inline void STSTATUS_chooseStatusMember(StatsScreen *screen) {
703 s32 member;
704
705 member = screen->member;
707 screen->member--;
708 if (screen->member < 0) {
709 screen->member = 0;
710 }
711 } else if (PAD_PRESSED(PAD_DOWN) || PAD_REPEATED(PAD_DOWN)) {
712 screen->member++;
713 if (screen->member > screen->count - 1) {
714 screen->member = screen->count - 1;
715 }
716 }
717 if (member != screen->member) {
719 } else if (PAD_PRESSED(PAD_CROSS)) {
721 screen->cursorShown = 0;
722 screen->option = 0;
723 screen->setSubstate(screen, 0x32);
724 screen->step = 1;
725 } else if (PAD_PRESSED(PAD_TRIANGLE)) {
727 screen->cursorShown = 0;
728 screen->setSubstate(screen, 0x32);
729 }
730}
731
732/* Creates the chosen option's panel: the digivolution panel or the
733 equipment panel */
734static inline void STSTATUS_openStatusPanel(StatsScreen *screen, StatsScreenWindows *windows) {
735 if (screen->option == 0) {
736 if (windows->panel == NULL) {
737 windows->panel = STSTATUS_createDigivolvePanel(screen);
738 }
739 } else if (windows->panel == NULL) {
740 windows->panel = STSTATUS_createEquipPanel(screen);
741 }
742 screen->substate++;
743}
744
745/* Once the panel is gone, goes back to the question */
746static inline void STSTATUS_waitStatusPanel(StatsScreen *screen, StatsScreenWindows *windows) {
747 if (windows->panel == NULL) {
748 screen->setSubstate(screen, 15);
749 screen->counter = 1;
750 }
751}
752
753/* Starts closing the pages: the last page, the help's panel and, with one
754 member, the title */
755static inline void STSTATUS_closeStatusScreen(StatsScreen *screen, StatsScreenWindows *windows) {
756 STSTATUS_data.funcs.startFade(&screen->pageFades[screen->count - 1], 0);
757 STSTATUS_showStatusPage(screen, windows, screen->count - 1, 0);
758 STSTATUS_data.funcs.startFade(&screen->fades[1], 0);
759 windows->help->setVisible(windows->help, 0);
760 windows->help2->setVisible(windows->help2, 0);
761 if (screen->count == 1) {
762 STSTATUS_data.funcs.startFade(&screen->fades[0], 0);
763 windows->title->setVisible(windows->title, 0);
764 }
765 screen->substate = screen->count + 0x32;
766}
767
768/* One member: once the page and the panels are closed, goes on to the end */
769static inline void STSTATUS_closeStatusScreenAlone(StatsScreen *screen) {
771 STSTATUS_data.funcs.updateFade(&screen->fades[0]);
772 if (STSTATUS_data.funcs.updateFade(&screen->fades[1])) {
773 screen->substate = 0x39;
774 }
775}
776
777/* Two members: once the second page and the help's panel are closed, starts
778 closing the first and the title */
781 if (STSTATUS_data.funcs.updateFade(&screen->fades[1])) {
782 STSTATUS_data.funcs.startFade(&screen->pageFades[0], 0);
783 STSTATUS_data.funcs.startFade(&screen->fades[0], 0);
784 STSTATUS_showStatusPage(screen, windows, 0, 0);
785 windows->title->setVisible(windows->title, 0);
786 screen->substate = 0x36;
787 }
788}
789
790/* Three members: once the third page and the help's panel are closed, starts
791 closing the second */
792static inline void STSTATUS_closeThirdStatusPage(StatsScreen *screen, StatsScreenWindows *windows) {
794 if (STSTATUS_data.funcs.updateFade(&screen->fades[1])) {
795 STSTATUS_data.funcs.startFade(&screen->pageFades[1], 0);
796 STSTATUS_showStatusPage(screen, windows, 1, 0);
797 screen->substate = 0x37;
798 }
799}
800
801/* Three members: once the second page is closed, starts closing the first
802 and the title */
804 if (STSTATUS_data.funcs.updateFade(&screen->pageFades[1])) {
805 STSTATUS_data.funcs.startFade(&screen->pageFades[0], 0);
806 STSTATUS_data.funcs.startFade(&screen->fades[0], 0);
807 STSTATUS_showStatusPage(screen, windows, 0, 0);
808 windows->title->setVisible(windows->title, 0);
809 screen->substate++;
810 }
811}
812
813/* Two or three members: once the first page and the title are closed, goes
814 on to the end */
815static inline void STSTATUS_closeFirstStatusPage(StatsScreen *screen) {
817 if (STSTATUS_data.funcs.updateFade(&screen->fades[0])) {
818 screen->substate = 0x39;
819 }
820}
821
822/* With the pages closed: the chosen member's question, or the screen's end */
823static inline void STSTATUS_endStatusPages(StatsScreen *screen) {
824 if (screen->step) {
825 screen->setSubstate(screen, 15);
826 } else {
827 screen->state = 3;
828 }
829}
830
831/* The fifth screen's steps: the pages fade in, a party member is chosen and
832 its panel opens, then the pages fade out */
834 switch (screen->substate) {
835 case 0:
836 default:
838 break;
839 case 1:
840 STSTATUS_openStatusScreenAlone(screen, windows);
841 break;
842 case 2:
843 STSTATUS_openFirstOfTwoStatusPages(screen, windows);
844 break;
845 case 4:
847 break;
848 case 3:
850 break;
851 case 5:
853 break;
854 case 6:
855 STSTATUS_openThirdStatusPage(screen, windows);
856 break;
857 case 10:
858 screen->cursorShown = 1;
859 screen->substate++;
860 break;
861 case 11:
863 break;
864 case 15:
865 STSTATUS_runStatusChoice(screen, windows);
866 break;
867 case 0x14:
868 STSTATUS_openStatusPanel(screen, windows);
869 break;
870 case 0x15:
871 STSTATUS_waitStatusPanel(screen, windows);
872 break;
873 case 0x32:
874 STSTATUS_closeStatusScreen(screen, windows);
875 break;
876 case 0x33:
878 break;
879 case 0x34:
881 break;
882 case 0x35:
883 STSTATUS_closeThirdStatusPage(screen, windows);
884 break;
885 case 0x37:
887 break;
888 case 0x36:
889 case 0x38:
891 break;
892 case 0x39:
894 break;
895 }
896}
897
898/* The fifth screen's task: counts the party, starts the pages' fades and creates
899 the windows, then runs and draws the screen */
901 s32 i;
902
903 switch (screen->state) {
904 case TASK_INIT:
905 default:
906 screen->nextState(screen);
907 for (i = 0; i < 3; i++) {
908 if (GAME.funcs.getPartyMember(i) >= 0) {
909 screen->count++;
910 }
911 }
912 for (i = 0; i < screen->count; i++) {
913 screen->pageFades[i].duration = 10;
914 STSTATUS_data.funcs.startFade(&screen->pageFades[i], 1);
915 }
916 for (i = 0; i < 2; i++) {
917 screen->fades[i].duration = 10;
918 STSTATUS_data.funcs.startFade(&screen->fades[i], 1);
919 }
920 screen->panelFades[0].duration = 10;
921 screen->panelFades[1].duration = 10;
922 screen->panelFades[2].duration = 10;
923 screen->panelFades[4].duration = 10;
924 screen->panelFades[3].duration = 10;
925 screen->panelFades[5].duration = 10;
926 screen->fade.duration = 8;
927 STSTATUS_createStatusWindows(screen, windows);
928 break;
929 case TASK_RUN:
930 STSTATUS_runStatusScreen(screen, windows);
932 break;
933 case TASK_DONE:
934 case TASK_KILL:
935 break;
936 }
937}
938
939/* Creates the field menu's fifth screen (task), the party's stats, slots and
940 equipment */
943
945 screen->layer = SCREEN_LAYER;
946 screen->depth = 6;
947 screen->menu = menu;
948 return (Task *)screen;
949}
950
955/* The stats screen 4 shows, as STSTATUS_panelStats */
962/* The strings of the empty equipment slots, as STSTATUS_slotStrings */
964 65, 66, 67, 77,
965 68, 68,
966};
#define NULL
Definition common.h:17
signed int s32
Definition common.h:11
signed short s16
Definition common.h:9
DigivolvePanel * STSTATUS_createDigivolvePanel(StatsScreen *screen)
Creates the fifth screen's digivolution panel (task) for its chosen party member.
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
EquipPanel * STSTATUS_createEquipPanel(StatsScreen *screen)
Creates the fifth screen's equipment panel (task) for its chosen party member.
STSTATUS.PRO: the field menu's screens.
#define DRAW_PAGE_PANELS(sprite, screen, i)
Draws the panels of the party's pages (parts 0x15 to 0x17 of the menu's sprites), each stretched acro...
Definition field_menu.h:455
#define FILE_STATUS_SPRITES
The menu's sprite sheet; the next file is its texture archive.
Definition field_menu.h:20
#define TEXT_FILE(file)
Definition file.h:190
#define TEXT_STATUS
STATUS: the field menu's and STSTATUS's.
Definition file.h:225
#define TEXT_DIGIMON_NAMES
DIGNAM.
Definition file.h:211
#define TEXT_ITEM_NAMES
ITMNAM.
Definition file.h:215
#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 STAT_STRENGTH
the six battle stats
Definition game_state.h:286
#define STAT_MP
Definition game_state.h:283
#define STAT_SPIRIT
Definition game_state.h:288
#define STAT_MAX_HP
Definition game_state.h:282
#define STAT_HP
Definition game_state.h:281
#define EQUIP_KIND_GROUP_ACCESSORY
one of its group at a time
Definition game_state.h:141
#define STAT_SPEED
Definition game_state.h:290
#define STAT_LEVEL
Indices of a partner's stats (PartnerStats.stats, computeStats, setStat)
Definition game_state.h:279
#define STAT_DEFENSE
Definition game_state.h:287
#define STAT_CHARISMA
Definition game_state.h:291
#define STAT_MAX_MP
Definition game_state.h:284
#define STAT_RESISTS
the first of the seven resistances
Definition game_state.h:292
#define STAT_WISDOM
Definition game_state.h:289
#define EQUIP_KIND_BOTH_HANDS
takes slots 2 and 3
Definition game_state.h:140
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 STRETCH_SPRITE(sprite, level, x, y)
Definition gfx.h:273
#define ZOOM_SPRITE(sprite, level, x, y)
Definition gfx.h:275
#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
StatusData STSTATUS_data
Definition helpers.c:356
ItemFuncs ITEM_FUNCS
Definition items.c:890
#define PAD_CROSS
Definition pad.h:31
#define PAD_DOWN
Definition pad.h:24
#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_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_MENU_CONFIRM
SYSTEM07.
Definition sound.h:44
#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_MENU_MOVE
SYSTEM06.
Definition sound.h:43
#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 STSTATUS_updateStatusScreen(StatsScreen *screen, StatsScreenWindows *windows)
The fifth screen's task: counts the party, starts the pages' fades and creates the windows,...
void STSTATUS_drawStatusScreen(StatsScreen *screen)
Draws the partners' portraits and frames, the chosen one's, its equipment and the panels' frames.
void STSTATUS_showPartnerStats(StatsScreen *screen, StatsScreenWindows *windows, s32 show)
Shows the party member's stats, in another palette the ones that are raised.
static void STSTATUS_closeSecondOfThreeStatusPages(StatsScreen *screen, StatsScreenWindows *windows)
Three members: once the second page is closed, starts closing the first and the title.
void STSTATUS_createStatusWindows(StatsScreen *screen, StatsScreenWindows *windows)
Creates the windows of the fifth screen.
void STSTATUS_showStatusPage(StatsScreen *screen, StatsScreenWindows *windows, s32 member, s32 show)
As STSTATUS_showCardPage.
void STSTATUS_showPartnerEquipment(StatsScreen *screen, StatsScreenWindows *windows, s32 show)
The party member's equipment, or the slots' names where it has none.
static void STSTATUS_openFirstOfTwoStatusPages(StatsScreen *screen, StatsScreenWindows *windows)
Two members: once the first page and the title are in, shows them and starts the second page and the ...
static void STSTATUS_startStatusScreen(StatsScreen *screen)
Starts the fades of the first page and the title (and, with one party member, of the help's panel); t...
void STSTATUS_showChosenPage(StatsScreen *screen, StatsScreenWindows *windows, s32 member, s32 show)
As STSTATUS_showStatusPage, on the first page.
Task * STSTATUS_createStatusScreen(FieldMenuScreen *menu, s32 extra)
Creates the field menu's fifth screen (task), the party's stats, slots and equipment.
static void STSTATUS_waitStatusPanel(StatsScreen *screen, StatsScreenWindows *windows)
Once the panel is gone, goes back to the question.
static void STSTATUS_openStatusScreenAlone(StatsScreen *screen, StatsScreenWindows *windows)
One member: once the page and the panels are in, shows the page, the title and the help.
s32 STSTATUS_equipStats[]
The stats screen 4 shows, as STSTATUS_panelStats.
s32 STSTATUS_pageStats4[]
static void STSTATUS_closeStatusScreenAlone(StatsScreen *screen)
One member: once the page and the panels are closed, goes on to the end.
void STSTATUS_previewStats(StatsScreen *screen, s32 slot, s32 item)
Shows the party member's stats as they would be with the item in the slot, in another palette the one...
static void STSTATUS_endStatusPages(StatsScreen *screen)
With the pages closed: the chosen member's question, or the screen's end.
void STSTATUS_runStatusChoice(StatsScreen *screen, StatsScreenWindows *windows)
Runs the fifth screen's question: the panels come in, the cursor picks one of the two options and the...
static void STSTATUS_stepStatusCursor(StatsScreen *screen)
Moves the member cursor's palette on every 9 frames.
static void STSTATUS_closeStatusScreen(StatsScreen *screen, StatsScreenWindows *windows)
Starts closing the pages: the last page, the help's panel and, with one member, the title.
void STSTATUS_showStatusChoices(StatsScreen *screen, StatsScreenWindows *windows, s32 show)
Shows or hides the fifth screen's two options: the digivolution panel and the equipment panel.
static void STSTATUS_openThirdStatusPage(StatsScreen *screen, StatsScreenWindows *windows)
Three members: once the third page and the help's panel are in, shows the page and the help.
static void STSTATUS_closeThirdStatusPage(StatsScreen *screen, StatsScreenWindows *windows)
Three members: once the third page and the help's panel are closed, starts closing the second.
void STSTATUS_runStatusScreen(StatsScreen *screen, StatsScreenWindows *windows)
The fifth screen's steps: the pages fade in, a party member is chosen and its panel opens,...
static void STSTATUS_openSecondOfThreeStatusPages(StatsScreen *screen, StatsScreenWindows *windows)
Three members: once the second page is in, shows it and starts the third page and the help's panel.
static void STSTATUS_closeFirstStatusPage(StatsScreen *screen)
Two or three members: once the first page and the title are closed, goes on to the end.
s32 STSTATUS_equipStrings[]
The strings of the empty equipment slots, as STSTATUS_slotStrings.
static void STSTATUS_openStatusPanel(StatsScreen *screen, StatsScreenWindows *windows)
Creates the chosen option's panel: the digivolution panel or the equipment panel.
static void STSTATUS_openSecondOfTwoStatusPages(StatsScreen *screen, StatsScreenWindows *windows)
Two members: once the second page and the help's panel are in, shows the page and the help.
static void STSTATUS_openFirstOfThreeStatusPages(StatsScreen *screen, StatsScreenWindows *windows)
Three members: once the first page and the title are in, shows them and starts the second page.
static void STSTATUS_chooseStatusMember(StatsScreen *screen)
Choosing a party member: up and down move the cursor, cross closes the pages for the member's questio...
static void STSTATUS_closeSecondOfTwoStatusPages(StatsScreen *screen, StatsScreenWindows *windows)
Two members: once the second page and the help's panel are closed, starts closing the first and the t...
void STSTATUS_showPartnerSlots(StatsScreen *screen, StatsScreenWindows *windows, s32 show)
The partner's slots: the entries in it (getPartnerSlots), the one it starts battles as (battleDigivol...
void(* setPos)()
(cursor, x, y)
Definition text.h:34
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
The mode's main task (STSTATUS_createMenu)
Definition field_menu.h:25
void *(* load)(u32 file)
Definition file.h:92
void *(* getEntry)(u32 fileAndIndex)
Definition file.h:96
struct PartnerStats *(* getPartnerStats)(s32 partner)
Definition game_state.h:38
void(* computeStats)(s32 partner, union PartnerTotals *out)
Definition game_state.h:31
s32(* getPartyMember)(u32 index)
Definition game_state.h:24
s32(* getPartnerSlots)()
(partner, s16 *out): the count
Definition game_state.h:32
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
s32(* getCategory)(s32 item)
getItemCategory
Definition game_state.h:671
struct ItemInfo *(* get)(s32 item)
getItem
Definition game_state.h:670
ItemRecord data
the type's record, or the usable items' effect
Definition game_state.h:226
s32 level
Definition menu.h:21
s32 duration
Definition menu.h:19
s32 frames[7]
Definition game_state.h:341
PartnerStats.equip as a whole: STSTATUS and STITSHOP save it with a struct copy before they equip an ...
Definition game_state.h:318
TextWindow * values[5]
Definition menu.h:88
TextWindow * labels[5]
Definition menu.h:87
TextWindow * name
Definition menu.h:86
A partner Digimon from its name on (Partner.info), as getPartnerStats gives it.
Definition game_state.h:303
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
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(* setClutRow)()
(row)
Definition gfx.h:247
void(* draw)()
(sheet, frame, x, y)
Definition gfx.h:246
void(* setTexture)()
(x, y)
Definition gfx.h:242
TextWindow * slotTitle
Definition field_menu.h:147
TextWindow * exp
Definition field_menu.h:145
TextWindow * title
Definition field_menu.h:139
TextWindow * tpLabel
Definition field_menu.h:153
PartnerPage pages[3]
Definition field_menu.h:140
TextWindow * values[13]
the stats of STSTATUS_equipStats
Definition field_menu.h:151
TextWindow * options[2]
Definition field_menu.h:143
void * panel
STSTATUS_createDigivolvePanel's or STSTATUS_createEquipPanel's, while open.
Definition field_menu.h:154
TextWindow * slots[3]
the partner's getPartnerSlots entries
Definition field_menu.h:148
TextWindow * help2
Definition field_menu.h:142
TextWindow * expLabel
Definition field_menu.h:146
TextWindow * equipTitle
Definition field_menu.h:149
TextWindow * equip[6]
Definition field_menu.h:150
TextWindow * tp
Definition field_menu.h:152
TextWindow * help
Definition field_menu.h:141
The field menu's fifth screen (STSTATUS_createStatusScreen)
Definition field_menu.h:117
void(* previewStats)(struct StatsScreen *screen, s32 slot, s32 item)
Definition field_menu.h:135
PanelAnim panelFades[6]
Definition field_menu.h:133
s32 member
in the party
Definition field_menu.h:128
s32 option
the options' cursor
Definition field_menu.h:126
PanelAnim fades[2]
Definition field_menu.h:132
PanelAnim pageFades[3]
Definition field_menu.h:131
FieldMenuScreen * menu
Definition field_menu.h:119
s32 frames[3]
of the partners' portraits
Definition field_menu.h:123
s32 count
party members
Definition field_menu.h:122
void(* nextState)(struct StatsScreen *task)
Definition field_menu.h:118
void(* setSubstate)(struct StatsScreen *task, s32 substate)
Definition field_menu.h:118
void * children
Definition field_menu.h:118
PanelAnim fade
Definition field_menu.h:134
WindowPos * layout
where the windows go, and their strings
Definition field_menu.h:438
PartnerAnim * partnerAnims
the partners' portraits
Definition field_menu.h:437
StatusFuncs funcs
Definition field_menu.h:445
s32(* updateFade)(PanelAnim *fade)
Definition field_menu.h:276
void(* startFade)(PanelAnim *fade, s32 fadeIn)
Definition field_menu.h:275
Any task, seen through its header.
Definition task.h:62
void(* setPalette)(struct TextWindow *obj, u8 arg)
Definition text.h:174
void(* setDepth)()
Definition text.h:183
void(* setRightAlign)()
no prototype: callers would truncate u8 args
Definition text.h:178
void(* setLines)()
no prototype: callers would truncate u8 args
Definition text.h:184
void(* setNumber)()
Definition text.h:166
void(* setString)()
Definition text.h:165
void(* setVisible)(struct TextWindow *obj, u8 arg)
Definition text.h:177
u8 kind
EQUIP_KIND_*.
Definition game_state.h:146
Where a window goes, and the string it shows.
Definition menu.h:102
s16 y
Definition menu.h:106
s32 string
Definition menu.h:103
s16 x
Definition menu.h:104
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
Definition task.c:105
#define PALETTE_BLUE
a light blue: what is highlighted or current
Definition text.h:113
#define PALETTE_PURPLE
Definition text.h:118
#define PALETTE_RED
Definition text.h:117
#define PALETTE_WHITE
The text windows' palettes (TextWindow.palette, setPalette): rows of the font's CLUTs,...
Definition text.h:112
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)
ItemInfo.data's record, by ItemInfo.type.
Definition game_state.h:188
WeaponData weapon
Definition game_state.h:189
ItemData * record
Definition game_state.h:210
computeStats' result: the stats with the equipment added, by STAT_* or by name.
Definition game_state.h:409
s16 tp
what the training's intensities cost
Definition game_state.h:413
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