Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
tech_screen.c
Go to the documentation of this file.
1/* The eighth object of STSTATUS.PRO (see card_screen.c), the screen of
2 STSTATUS_createTechScreen: its rodata starts at 0x80082BA4 (USA). */
3
4#include "menus/field_menu.h"
5
6/* Fills the item list with the owned items of its option's list
7 (STSTATUS_itemLists) and counts them */
9 s32 i;
10
11 if (panel->list == 0) {
12 panel->count = ITEM_FUNCS.list(STSTATUS_itemLists[0], panel->bag);
13 for (i = 0; i < panel->count; i++) {
14 panel->items[i] = panel->bag[i];
15 }
16 } else {
17 panel->count = ITEM_FUNCS.list(STSTATUS_itemLists[panel->list], panel->items);
18 }
19}
20
21/* Lists the techniques of a party member that can be used here (0xB8-0xBC),
22 each once, and returns how many */
24 TechRow *row;
25 PartnerEntry *entry;
26 s16 *techs;
27 s32 partner;
28 s32 count;
29 s32 found;
30 s32 i;
31 s32 j;
32 s32 k;
33 s32 tech;
34
35 partner = GAME.funcs.getPartyMember(member);
36 GAME.funcs.getPartnerSlots(partner, screen->rows[member].slots);
37 /* count set with i, row in the loop, techs and found set with k: the
38 match depends on them, which give the registers */
39 for (i = 0, count = 0; i < 3; i++) {
40 row = &screen->rows[member];
41 if (screen->rows[member].slots[i] >= 3) {
42 entry = &row->entries[i];
43 GAME.funcs.getPartnerEntry(partner, screen->rows[member].slots[i], entry);
44 for (j = 0; j < 6; j++) {
45 tech = entry->skills[j] & SKILL_ID;
46 if (tech >= 0xB8 && tech < 0xBD) {
47 techs = row->techs;
48 for (k = 0, found = 0; k < 5; k++) {
49 if (tech == techs[k]) {
50 found = 1;
51 break;
52 }
53 }
54 if (!found) {
55 screen->rows[member].techs[count++] = tech;
56 if (count >= 5) {
57 return count;
58 }
59 }
60 }
61 }
62 }
63 }
64 return count;
65}
66
67/* The chosen technique, or 0 if its user hasn't the MP for it */
70 s16 tech = screen->rows[screen->member].techs[screen->cursor];
71
72 if (TECHS[tech - 1].mp <= stats->stats[STAT_MP]) {
73 return tech;
74 }
75 return 0;
76}
77
78/* A technique's healing: 64 times its power, plus its power times the
79 partner's wisdom over 8 */
81 PartnerTotals stats;
82 TechData *info;
83 s32 power;
84
85 GAME.funcs.computeStats(partner, &stats);
86 /* the match depends on this pointer: read straight from TECHS[tech - 1],
87 the power's address is computed in another order */
88 info = &TECHS[tech - 1];
89 power = info->effectPower;
90 return (power << 6) + power * stats.fields.battle[3] / 8;
91}
92
93/* Uses the chosen healing technique on the target or on the whole party,
94 then plays FAILSOUND and says so if no one needed it; returns whether it
95 healed anyone */
96s32 STSTATUS_useTech(TechScreen *screen, TechScreenWindows *windows, s32 failSound) {
97 /* the user's and the target's ids: the match depends on them being in
98 memory, as an array */
99 s32 ids[2];
100 PartnerStats *user;
101 PartnerStats *target;
102 s32 tech;
103 s32 power;
104 s32 healed;
105 s32 full;
106 s32 i;
107
108 tech = screen->rows[screen->member].techs[screen->cursor];
109 ids[0] = GAME.funcs.getPartyMember(screen->member);
110 user = GAME.funcs.getPartnerStats(ids[0]);
111 power = STSTATUS_getTechHealing(ids[0], tech);
112 if (TECHS[tech - 1].kind == 3) {
113 ids[1] = GAME.funcs.getPartyMember(screen->target);
114 target = GAME.funcs.getPartnerStats(ids[1]);
115 if (target->stats[STAT_HP] < target->stats[STAT_MAX_HP]) {
116 user->stats[STAT_MP] -= TECHS[tech - 1].mp;
117 target->stats[STAT_HP] += power;
118 if (target->stats[STAT_HP] > target->stats[STAT_MAX_HP]) {
119 target->stats[STAT_HP] = target->stats[STAT_MAX_HP];
120 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x52);
121 } else {
122 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x53);
123 windows->help->setNumber(windows->help, 1, power);
124 }
125 for (i = 0; i < screen->count; i++) {
126 STSTATUS_showTechPage(screen, windows, i, 1);
127 }
129 return 1;
130 }
131 } else {
132 i = 0;
133 healed = 0;
134 full = 0;
135 for (; i < screen->count; i++) {
136 ids[1] = GAME.funcs.getPartyMember(i);
137 if (ids[1] >= 0) {
138 target = GAME.funcs.getPartnerStats(ids[1]);
139 if (target->stats[STAT_HP] < target->stats[STAT_MAX_HP]) {
140 target->stats[STAT_HP] += power;
141 if (target->stats[STAT_HP] > target->stats[STAT_MAX_HP]) {
142 target->stats[STAT_HP] = target->stats[STAT_MAX_HP];
143 full++;
144 }
145 /* the match depends on this coming after full++ */
146 healed = 1;
147 } else {
148 full++;
149 }
150 }
151 }
152 if (healed) {
153 user->stats[STAT_MP] -= TECHS[tech - 1].mp;
154 for (i = 0; i < screen->count; i++) {
155 STSTATUS_showTechPage(screen, windows, i, 1);
156 }
157 if (full == screen->count) {
158 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x52);
159 } else {
160 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x53);
161 windows->help->setNumber(windows->help, 1, power);
162 }
164 return 1;
165 }
166 }
167 SOUND.playSound(failSound);
168 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x6A);
169 return 0;
170}
171
172/* Creates the technique screen's windows: the title, the party's pages, the
173 help, the MP cost and the list of techniques with its cursor */
175 s32 i;
176 s32 j;
177 WindowPos *pos;
178 WindowPos *layout;
179
180 pos = &STSTATUS_data.layout[11];
181 windows->title = createTextWindow(screen->layer, 1, pos->x, pos->y);
182 for (j = 0; j < 3; j++) {
183 pos = &STSTATUS_data.layout[0];
184 windows->pages[j].name = createTextWindow(screen->layer, 1, pos->x, pos->y + j * 46);
185 pos = &STSTATUS_data.layout[1];
186 for (i = 0; i < 5; i++, pos++) {
187 windows->pages[j].labels[i] = createTextWindow(screen->layer, 3, pos->x, pos->y + j * 46);
188 }
189 pos = &STSTATUS_data.layout[6];
190 for (i = 0; i < 5; i++, pos++) {
191 windows->pages[j].values[i] = createTextWindow(screen->layer, 3, pos->x, pos->y + j * 46);
192 }
193 }
194 layout = STSTATUS_data.layout;
195 pos = &layout[12];
196 windows->help = createTextWindow(screen->layer, 1, pos->x, pos->y);
197 windows->help->setLines(windows->help, 2);
198 windows->help2 = createTextWindow(screen->layer, 1, pos->x, pos->y + 14);
199 pos = &layout[13];
200 windows->mpLabel = createTextWindow(screen->layer, 1, pos->x, pos->y);
201 pos = &layout[14];
202 windows->mp = createTextWindow(screen->layer, 1, pos->x, pos->y);
203 windows->listTitle = createTextWindow(screen->layer, 1, 0x9C, 0x31);
204 for (i = 0; i < 5; i++) {
205 windows->techs[i] = createTextWindow(screen->layer, 1, 0xB1, 0x41 + i * 14);
206 }
207 windows->cursor = createCursor(screen->layer, screen->depth - 1, 0xA6, screen->cursor * 14 + 0x41);
208 windows->cursor->setVisible(windows->cursor, 0);
209}
210
211/* As STSTATUS_showCardPage */
212void STSTATUS_showTechPage(TechScreen *screen, TechScreenWindows *windows, s32 member, s32 show) {
213 PartnerTotals stats;
214 WindowPos *layout;
215 s32 id;
216 s32 i;
217
218 if (show) {
219 id = GAME.funcs.getPartyMember(member);
220 GAME.funcs.computeStats(id, &stats);
221 windows->pages[member].name->setString(windows->pages[member].name, GAME.funcs.getPartnerStats(id), -1);
222 layout = &STSTATUS_data.layout[1];
223 for (i = 0; i < 5; i++, layout++) {
224 windows->pages[member].labels[i]->setString(windows->pages[member].labels[i],
226 }
227 for (i = 0; i < 5; i++) {
228 windows->pages[member].values[i]->setNumber(windows->pages[member].values[i], 0, stats.stats[STSTATUS_pageStats8[i]]);
229 windows->pages[member].values[i]->setRightAlign(windows->pages[member].values[i], 1);
230 }
231 } else {
232 windows->pages[member].name->setVisible(windows->pages[member].name, 0);
233 for (i = 0; i < 5; i++) {
234 windows->pages[member].labels[i]->setVisible(windows->pages[member].labels[i], 0);
235 }
236 for (i = 0; i < 5; i++) {
237 windows->pages[member].values[i]->setVisible(windows->pages[member].values[i], 0);
238 }
239 }
240}
241
242/* Shows or hides the list of the party member's techniques */
244 s32 i;
245
246 if (show) {
248 for (i = 0; i < screen->rows[screen->member].techCount; i++) {
249 windows->techs[i]->setString(windows->techs[i], FILE_CACHE.load(TEXT_FILE(TEXT_SKILL_NAMES)),
250 screen->rows[screen->member].techs[i] & SKILL_ID);
251 }
252 } else {
253 windows->listTitle->setVisible(windows->listTitle, 0);
254 for (i = 0; i < screen->rows[screen->member].techCount; i++) {
255 windows->techs[i]->setVisible(windows->techs[i], 0);
256 }
257 }
258}
259
260/* Shows or hides the chosen technique's name and MP cost */
262 s32 tech;
263
264 if (show) {
265 tech = screen->rows[screen->member].techs[screen->cursor] & SKILL_ID;
266 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_SKILL_INFO)), tech);
267 windows->mpLabel->setString(windows->mpLabel, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 3);
268 windows->mp->setNumber(windows->mp, 0, TECHS[tech - 1].mp);
269 windows->mp->setRightAlign(windows->mp, 1);
270 } else {
271 windows->help->setVisible(windows->help, 0);
272 windows->mpLabel->setVisible(windows->mpLabel, 0);
273 windows->mp->setVisible(windows->mp, 0);
274 }
275}
276
277/* Moves the partners' portraits to their next frames every 13 frames */
278static inline void STSTATUS_animateTechPortraits(TechScreen *screen) {
279 s32 id;
280 s32 i;
281
282 if (GFX.funcs.getTime() - screen->frameTime >= 13) {
283 screen->frameTime = GFX.funcs.getTime();
284 for (i = 0; i < screen->count; i++) {
285 id = GAME.funcs.getPartyMember(i);
286 screen->frames[i]++;
287 if (STSTATUS_data.partnerAnims[id].frames[screen->frames[i]] == -1 ||
288 screen->frames[i] >= 7) {
289 screen->frames[i] = 0;
290 }
291 }
292 }
293}
294
295/* Moves the member cursor's palette on every 9 frames */
296static inline void STSTATUS_stepTechCursor(TechScreen *screen) {
297 if (GFX.funcs.getTime() - screen->cursorTime >= 9) {
298 screen->cursorTime = GFX.funcs.getTime();
299 screen->cursorFrame++;
300 if (screen->cursorFrame >= 8) {
301 screen->cursorFrame = 0;
302 }
303 }
304}
305
306/* Draws the partners' portraits and frames, the cursors and the help arrow */
308 SpriteDrawer sprite;
309 s32 id;
310 s32 i;
311
312 initSpriteDrawer(&sprite);
313 sprite.setLayerId(screen->layer, screen->depth);
315 for (i = 0; i < screen->count; i++) {
316 if (screen->pageFades[i].level != 0) {
317 ZOOM_SPRITE(sprite, screen->pageFades[i].level, 0x7C, i * 0x2E + 0x27);
318 id = GAME.funcs.getPartyMember(i);
319 sprite.setTexture(0x280, 0x100);
321 STSTATUS_data.partnerAnims[id].frames[screen->frames[i]], 0x6B,
322 i * 0x2E + 0x13);
323 }
324 }
325 sprite.setTexture(0x140, 0);
326 DRAW_PAGE_PANELS(sprite, screen, i);
327 if (screen->fades[0].level != 0) {
328 STRETCH_SPRITE(sprite, screen->fades[0].level, 0x140, 0x19);
329 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), 0x18, 0x22, 0xD);
330 }
331 if (screen->fades[1].level != 0) {
332 if (screen->blink) {
333 if (GFX.funcs.getTime() - screen->blinkTime >= 4) {
334 screen->blinkTime = GFX.funcs.getTime();
335 screen->blinkFrame++;
336 if (screen->blinkFrame >= 5) {
337 screen->blinkFrame = 0;
338 }
339 }
340 sprite.setTexture(0x140, 0);
341 sprite.setClutRow(screen->blinkFrame);
342 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), 0xA, 0x123, 0xD6);
343 sprite.setClutRow(0);
344 }
345 STRETCH_SPRITE(sprite, screen->fades[1].level, 0, 0xD3);
346 sprite.setTexture(0x280, 0x100);
347 sprite.draw(FILE_CACHE.getEntry(FILE_STATUS_SPRITES << 16), 0x20, 0, 0xC2);
348 }
350 if (screen->targetShown) {
351 initSpriteDrawer(&sprite);
352 sprite.setLayerId(screen->layer, screen->depth - 1);
353 sprite.setTexture(0x280, 0x100);
354 sprite.setClutRow(screen->cursorFrame);
355 sprite.draw(FILE_CACHE.getEntry(FILE_STATUS_SPRITES << 16), 0x1E, 0, screen->target * 0x2E + 0x11);
356 }
357 if (screen->memberShown) {
358 initSpriteDrawer(&sprite);
359 sprite.setLayerId(screen->layer, screen->depth - 1);
360 sprite.setTexture(0x280, 0x100);
361 /* the match depends on two calls, not a conditional argument */
362 if (screen->substate >= 0x1E) {
363 sprite.setClutRow(8);
364 } else {
365 sprite.setClutRow(screen->cursorFrame);
366 }
367 sprite.draw(FILE_CACHE.getEntry(FILE_STATUS_SPRITES << 16), 0x1E, 0, screen->member * 0x2E + 0x11);
368 }
369 if (screen->fade.level != 0) {
370 initSpriteDrawer(&sprite);
371 sprite.setLayerId(screen->layer, screen->depth);
372 sprite.setTexture(0x280, 0x100);
373 if (screen->fade.level != ONE) {
374 sprite.setScale(screen->fade.level, ONE, ONE);
375 sprite.setPivot(0x140, 0x63);
376 }
378 0x94, 0x2F);
379 }
380}
381
382/* Starts the fades of the first page and the title (and, with one party
383 member, of the help's panel); the next substate is the party's size */
384static inline void STSTATUS_startTechScreen(TechScreen *screen) {
385 STSTATUS_data.funcs.startFade(&screen->pageFades[0], 1);
386 STSTATUS_data.funcs.startFade(&screen->fades[0], 1);
387 if (screen->count == 1) {
388 STSTATUS_data.funcs.startFade(&screen->fades[1], 1);
389 }
390 screen->substate = screen->count;
391}
392
393/* One member: once the page and the panels are in, shows the title and the
394 page */
395static inline void STSTATUS_openTechScreenAlone(TechScreen *screen, TechScreenWindows *windows) {
397 STSTATUS_data.funcs.updateFade(&screen->fades[0]);
398 if (STSTATUS_data.funcs.updateFade(&screen->fades[1])) {
399 windows->title->setString(windows->title, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x27);
400 STSTATUS_showTechPage(screen, windows, 0, 1);
401 screen->substate = 10;
402 }
403}
404
405/* Two members: once the first page and the title are in, shows them and
406 starts the second page and the help's panel */
407static inline void STSTATUS_openFirstOfTwoTechPages(TechScreen *screen, TechScreenWindows *windows) {
409 if (STSTATUS_data.funcs.updateFade(&screen->fades[0])) {
410 STSTATUS_data.funcs.startFade(&screen->pageFades[1], 1);
411 STSTATUS_data.funcs.startFade(&screen->fades[1], 1);
412 windows->title->setString(windows->title, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x27);
413 STSTATUS_showTechPage(screen, windows, 0, 1);
414 screen->substate = 4;
415 }
416}
417
418/* Two members: once the second page and the help's panel are in, shows the
419 page */
422 if (STSTATUS_data.funcs.updateFade(&screen->fades[1])) {
423 STSTATUS_showTechPage(screen, windows, 1, 1);
424 screen->substate = 10;
425 }
426}
427
428/* Three members: once the first page and the title are in, shows them and
429 starts the second page */
432 if (STSTATUS_data.funcs.updateFade(&screen->fades[0])) {
433 STSTATUS_data.funcs.startFade(&screen->pageFades[1], 1);
434 windows->title->setString(windows->title, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x27);
435 STSTATUS_showTechPage(screen, windows, 0, 1);
436 screen->substate = 5;
437 }
438}
439
440/* Three members: once the second page is in, shows it and starts the third
441 page and the help's panel */
443 if (STSTATUS_data.funcs.updateFade(&screen->pageFades[1])) {
444 STSTATUS_data.funcs.startFade(&screen->pageFades[2], 1);
445 STSTATUS_data.funcs.startFade(&screen->fades[1], 1);
446 STSTATUS_showTechPage(screen, windows, 1, 1);
447 screen->substate++;
448 }
449}
450
451/* Three members: once the third page and the help's panel are in, shows the
452 page */
453static inline void STSTATUS_openThirdTechPage(TechScreen *screen, TechScreenWindows *windows) {
455 if (STSTATUS_data.funcs.updateFade(&screen->fades[1])) {
456 STSTATUS_showTechPage(screen, windows, 2, 1);
457 screen->substate = 10;
458 }
459}
460
461/* Shows the member cursor and the help for choosing who uses a technique */
462static inline void STSTATUS_showTechHelp(TechScreen *screen, TechScreenWindows *windows) {
463 screen->memberShown = 1;
464 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x28);
465 windows->help2->setString(windows->help2, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x15);
466 screen->substate++;
467}
468
469/* Choosing who uses a technique: up and down move the cursor, cross opens
470 the member's techniques, triangle closes the screen */
471static inline void STSTATUS_chooseTechMember(TechScreen *screen) {
472 s32 member;
473
474 member = screen->member;
476 screen->member--;
477 if (screen->member < 0) {
478 screen->member = 0;
479 }
480 } else if (PAD_PRESSED(PAD_DOWN) || PAD_REPEATED(PAD_DOWN)) {
481 screen->member++;
482 if (screen->member > screen->count - 1) {
483 screen->member = screen->count - 1;
484 }
485 }
486 if (member != screen->member) {
488 } else if (PAD_PRESSED(PAD_CROSS)) {
490 screen->substate = 15;
491 } else if (PAD_PRESSED(PAD_TRIANGLE)) {
493 screen->substate = 0x32;
494 }
495}
496
497/* Starts opening the member's technique list, or says they have none */
498static inline void STSTATUS_openTechList(TechScreen *screen, TechScreenWindows *windows) {
499 if (screen->rows[screen->member].techCount != 0) {
500 screen->fade.duration = 8;
501 STSTATUS_data.funcs.startFade(&screen->fade, 1);
502 windows->title->setString(windows->title, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x2A);
503 windows->help->setVisible(windows->help, 0);
504 windows->help2->setVisible(windows->help2, 0);
505 screen->substate = 0x1E;
506 } else {
507 screen->substate = 0x10;
508 }
509}
510
511/* Hides the member cursor and says the member has no technique to use here */
512static inline void STSTATUS_sayNoFieldTechs(TechScreen *screen, TechScreenWindows *windows) {
513 screen->memberShown = 0;
514 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x29);
515 windows->help2->setVisible(windows->help2, 0);
516 screen->blink = 1;
517 screen->substate++;
518}
519
520/* Cross takes the message away and goes back to choosing a member */
521static inline void STSTATUS_closeNoFieldTechs(TechScreen *screen, TechScreenWindows *windows) {
522 if (PAD_PRESSED(PAD_CROSS)) {
524 screen->memberShown = 1;
525 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x28);
526 windows->help2->setVisible(windows->help2, 1);
527 screen->blink = 0;
528 screen->substate = 11;
529 }
530}
531
532/* Once the list's panel is in, shows the techniques and the cursor on the
533 first one */
534static inline void STSTATUS_enterTechList(TechScreen *screen, TechScreenWindows *windows) {
535 if (STSTATUS_data.funcs.updateFade(&screen->fade)) {
536 screen->cursor = 0;
537 STSTATUS_showTechList(screen, windows, 1);
538 STSTATUS_showChosenTech(screen, windows, 1);
539 windows->cursor->setPos(windows->cursor, 0xA6, screen->cursor * 0xE + 0x41);
540 windows->cursor->setVisible(windows->cursor, 1);
541 screen->substate++;
542 }
543}
544
545/* Choosing a technique: up and down move the cursor, cross uses it (after
546 choosing whom, for one that heals one member) or says the MP is short,
547 triangle closes the list */
548static inline void STSTATUS_chooseTech(TechScreen *screen, TechScreenWindows *windows) {
549 s32 old;
550 s32 tech;
551
552 old = screen->cursor;
554 screen->cursor--;
555 if (screen->cursor < 0) {
556 screen->cursor = 0;
557 }
558 } else if (PAD_PRESSED(PAD_DOWN) || PAD_REPEATED(PAD_DOWN)) {
559 screen->cursor++;
560 if (screen->cursor > screen->rows[screen->member].techCount - 1) {
561 screen->cursor = screen->rows[screen->member].techCount - 1;
562 }
563 }
564 if (old != screen->cursor) {
565 windows->cursor->setPos(windows->cursor, 0xA6, screen->cursor * 0xE + 0x41);
566 STSTATUS_showChosenTech(screen, windows, 1);
568 } else if (PAD_PRESSED(PAD_CROSS)) {
569 tech = STSTATUS_getChosenTech(screen);
570 if (tech != 0) {
571 if (TECHS[tech - 1].kind == 3) {
573 screen->targetShown = 1;
574 windows->cursor->setPalette(windows->cursor, PALETTE_GREY);
575 windows->cursor->setStill(windows->cursor, 1);
576 windows->title->setString(windows->title, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x2B);
577 screen->substate++;
578 } else {
579 windows->cursor->setPalette(windows->cursor, PALETTE_GREY);
580 windows->cursor->setStill(windows->cursor, 1);
581 STSTATUS_showChosenTech(screen, windows, 0);
582 screen->step = screen->substate;
583 STSTATUS_useTech(screen, windows, SOUND_SELECT);
584 screen->substate = 0x24;
585 screen->blink = 1;
586 }
587 } else {
589 windows->cursor->setPalette(windows->cursor, PALETTE_GREY);
590 windows->cursor->setStill(windows->cursor, 1);
591 STSTATUS_showChosenTech(screen, windows, 0);
592 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x69);
593 screen->substate = 0x23;
594 screen->blink = 1;
595 }
596 } else if (PAD_PRESSED(PAD_TRIANGLE)) {
598 STSTATUS_data.funcs.startFade(&screen->fade, 0);
599 STSTATUS_showTechList(screen, windows, 0);
600 STSTATUS_showChosenTech(screen, windows, 0);
601 windows->cursor->setVisible(windows->cursor, 0);
602 windows->title->setString(windows->title, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x27);
603 screen->substate = 0x28;
604 }
605}
606
607/* Choosing whom the technique heals: up and down move the cursor, cross uses
608 it or says the MP is short, triangle goes back to the list */
609static inline void STSTATUS_chooseTechTarget(TechScreen *screen, TechScreenWindows *windows) {
610 s32 old;
611
612 old = screen->target;
614 screen->target--;
615 if (screen->target < 0) {
616 screen->target = 0;
617 }
618 } else if (PAD_PRESSED(PAD_DOWN) || PAD_REPEATED(PAD_DOWN)) {
619 screen->target++;
620 if (screen->target > screen->count - 1) {
621 screen->target = screen->count - 1;
622 }
623 }
624 if (old != screen->target) {
626 } else if (PAD_PRESSED(PAD_CROSS)) {
627 STSTATUS_showChosenTech(screen, windows, 0);
628 if (STSTATUS_getChosenTech(screen) != 0) {
629 screen->targetShown = 0;
630 screen->step = screen->substate;
631 STSTATUS_useTech(screen, windows, SOUND_MENU_CONFIRM);
632 screen->substate = 0x24;
633 } else {
635 screen->memberShown = 0;
636 screen->targetShown = 0;
637 windows->help->setString(windows->help, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x69);
638 screen->substate = 0x23;
639 }
640 screen->blink = 1;
641 } else if (PAD_PRESSED(PAD_TRIANGLE)) {
643 screen->substate = 0x1F;
644 screen->targetShown = 0;
645 windows->cursor->setPalette(windows->cursor, PALETTE_WHITE);
646 windows->cursor->setStill(windows->cursor, 0);
647 windows->title->setString(windows->title, FILE_CACHE.load(TEXT_FILE(TEXT_STATUS)), 0x2A);
648 }
649}
650
651/* Cross takes the short MP message away and goes back to the list */
652static inline void STSTATUS_closeShortMp(TechScreen *screen, TechScreenWindows *windows) {
653 if (PAD_PRESSED(PAD_CROSS)) {
655 STSTATUS_showChosenTech(screen, windows, 1);
656 windows->cursor->setPalette(windows->cursor, PALETTE_WHITE);
657 windows->cursor->setStill(windows->cursor, 0);
658 screen->substate = 0x1F;
659 screen->blink = 0;
660 }
661}
662
663/* Cross takes the technique's result away and goes back to where it was
664 chosen */
665static inline void STSTATUS_closeTechUsed(TechScreen *screen, TechScreenWindows *windows) {
666 if (PAD_PRESSED(PAD_CROSS)) {
668 STSTATUS_showChosenTech(screen, windows, 1);
669 screen->substate = screen->step;
670 /* the match depends on testing step, not substate */
671 if (screen->step == 0x1F) {
672 windows->cursor->setPalette(windows->cursor, PALETTE_WHITE);
673 windows->cursor->setStill(windows->cursor, 0);
674 } else {
675 screen->targetShown = 1;
676 }
677 screen->blink = 0;
678 }
679}
680
681/* Once the list's panel is closed, goes back to choosing a member */
682static inline void STSTATUS_closeTechList(TechScreen *screen) {
683 if (STSTATUS_data.funcs.updateFade(&screen->fade)) {
684 screen->setSubstate(screen, 10);
685 }
686}
687
688/* Starts closing the screen: the last page, the help's panel and, with one
689 member, the title */
690static inline void STSTATUS_closeTechScreen(TechScreen *screen, TechScreenWindows *windows) {
691 screen->memberShown = 0;
692 windows->help2->setVisible(windows->help2, 0);
693 STSTATUS_data.funcs.startFade(&screen->fades[1], 0);
694 STSTATUS_showChosenTech(screen, windows, 0);
695 STSTATUS_data.funcs.startFade(&screen->pageFades[screen->count - 1], 0);
696 STSTATUS_showTechPage(screen, windows, screen->count - 1, 0);
697 if (screen->count == 1) {
698 windows->title->setVisible(windows->title, 0);
699 STSTATUS_data.funcs.startFade(&screen->fades[0], 0);
700 }
701 screen->substate = screen->count + 0x32;
702}
703
704/* One member: ends the screen once the page and the panels are closed */
705static inline void STSTATUS_closeTechScreenAlone(TechScreen *screen) {
707 STSTATUS_data.funcs.updateFade(&screen->fades[0]);
708 if (STSTATUS_data.funcs.updateFade(&screen->fades[1])) {
709 screen->state = 3;
710 }
711}
712
713/* Two members: once the second page and the help's panel are closed, starts
714 closing the first and the title */
717 if (STSTATUS_data.funcs.updateFade(&screen->fades[1])) {
718 STSTATUS_data.funcs.startFade(&screen->pageFades[0], 0);
719 STSTATUS_showTechPage(screen, windows, 0, 0);
720 STSTATUS_data.funcs.startFade(&screen->fades[0], 0);
721 windows->title->setVisible(windows->title, 0);
722 screen->substate = 0x36;
723 }
724}
725
726/* Three members: once the third page and the help's panel are closed, starts
727 closing the second */
728static inline void STSTATUS_closeThirdTechPage(TechScreen *screen, TechScreenWindows *windows) {
730 if (STSTATUS_data.funcs.updateFade(&screen->fades[1])) {
731 STSTATUS_data.funcs.startFade(&screen->pageFades[1], 0);
732 STSTATUS_showTechPage(screen, windows, 1, 0);
733 screen->substate = 0x37;
734 }
735}
736
737/* Three members: once the second page is closed, starts closing the first
738 and the title */
740 if (STSTATUS_data.funcs.updateFade(&screen->pageFades[1])) {
741 STSTATUS_data.funcs.startFade(&screen->pageFades[0], 0);
742 STSTATUS_data.funcs.startFade(&screen->fades[0], 0);
743 windows->title->setVisible(windows->title, 0);
744 STSTATUS_showTechPage(screen, windows, 0, 0);
745 screen->substate++;
746 }
747}
748
749/* Two or three members: ends the screen once the first page and the title
750 are closed */
751static inline void STSTATUS_closeFirstTechPage(TechScreen *screen) {
753 if (STSTATUS_data.funcs.updateFade(&screen->fades[0])) {
754 screen->state = 3;
755 }
756}
757
758/* The technique screen's update: opens the pages, picks who uses a
759 technique, which one and on whom, then closes them */
761 switch (screen->substate) {
762 case 0:
763 default:
765 break;
766 case 1:
767 STSTATUS_openTechScreenAlone(screen, windows);
768 break;
769 case 2:
770 STSTATUS_openFirstOfTwoTechPages(screen, windows);
771 break;
772 case 4:
773 STSTATUS_openSecondOfTwoTechPages(screen, windows);
774 break;
775 case 3:
776 STSTATUS_openFirstOfThreeTechPages(screen, windows);
777 break;
778 case 5:
780 break;
781 case 6:
782 STSTATUS_openThirdTechPage(screen, windows);
783 break;
784 case 10:
785 STSTATUS_showTechHelp(screen, windows);
786 break;
787 case 11:
789 break;
790 case 15:
791 STSTATUS_openTechList(screen, windows);
792 break;
793 case 0x10:
794 STSTATUS_sayNoFieldTechs(screen, windows);
795 break;
796 case 0x11:
797 STSTATUS_closeNoFieldTechs(screen, windows);
798 break;
799 case 0x1E:
800 STSTATUS_enterTechList(screen, windows);
801 break;
802 case 0x1F:
803 STSTATUS_chooseTech(screen, windows);
804 break;
805 case 0x20:
806 STSTATUS_chooseTechTarget(screen, windows);
807 break;
808 case 0x23:
809 STSTATUS_closeShortMp(screen, windows);
810 break;
811 case 0x24:
812 STSTATUS_closeTechUsed(screen, windows);
813 break;
814 case 0x28:
816 break;
817 case 0x32:
818 STSTATUS_closeTechScreen(screen, windows);
819 break;
820 case 0x33:
822 break;
823 case 0x34:
824 STSTATUS_closeSecondOfTwoTechPages(screen, windows);
825 break;
826 case 0x35:
827 STSTATUS_closeThirdTechPage(screen, windows);
828 break;
829 case 0x37:
831 break;
832 case 0x36:
833 case 0x38:
835 break;
836 }
837}
838
839/* The technique screen's task: counts the party, lists each member's techniques
840 that can be used here and creates the windows, then runs and draws the screen */
842 s32 i;
843
844 switch (screen->state) {
845 case TASK_INIT:
846 default:
847 screen->nextState(screen);
848 for (i = 0; i < 3; i++) {
849 if (GAME.funcs.getPartyMember(i) >= 0) {
850 screen->count++;
851 }
852 }
853 for (i = 0; i < screen->count; i++) {
854 screen->pageFades[i].duration = 10;
855 STSTATUS_data.funcs.startFade(&screen->pageFades[i], 1);
856 }
857 for (i = 0; i < 2; i++) {
858 screen->fades[i].duration = 10;
859 STSTATUS_data.funcs.startFade(&screen->fades[i], 1);
860 }
861 for (i = 0; i < screen->count; i++) {
862 screen->rows[i].techCount = STSTATUS_listFieldTechs(screen, i);
863 }
864 STSTATUS_createTechWindows(screen, windows);
865 break;
866 case TASK_RUN:
867 STSTATUS_runTechScreen(screen, windows);
869 break;
870 case TASK_DONE:
871 case TASK_KILL:
872 break;
873 }
874}
875
876/* Creates the field menu's technique screen (task) */
879
880 screen->layer = SCREEN_LAYER;
881 screen->depth = 6;
882 screen->menu = menu;
883 return (Task *)screen;
884}
885
890/* The sprites of the technique counts, from 1 */
892 57, 56, 55, 54,
893 45,
894};
signed int s32
Definition common.h:11
signed short s16
Definition common.h:9
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
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_SKILL_NAMES
SKLNAM.
Definition file.h:223
#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_SKILL_INFO
SKLINF.
Definition file.h:222
#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_MP
Definition game_state.h:283
#define STAT_MAX_HP
Definition game_state.h:282
#define STAT_HP
Definition game_state.h:281
#define STAT_LEVEL
Indices of a partner's stats (PartnerStats.stats, computeStats, setStat)
Definition game_state.h:279
#define STAT_MAX_MP
Definition game_state.h:284
#define SKILL_ID
PartnerEntry.skills.
Definition game_state.h:255
#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
s32 STSTATUS_itemLists[]
The item lists of the first screen's options.
ItemFuncs ITEM_FUNCS
Definition items.c:890
TechData TECHS[443]
The techniques, from 1: technique n is TECHS[n - 1].
Definition items.c:906
#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_RECOVERY
RECOVERY.
Definition sound.h:46
#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(* 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
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
s32(* getPartnerEntry)()
-1 if it hasn't the Digimon
Definition game_state.h:36
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
GameFuncs funcs
Definition game_state.h:582
s32(* getTime)(void)
Definition gfx.h:31
GfxFuncs funcs
Definition gfx.h:77
s32(* list)(s32 type, s16 *out)
listItems
Definition game_state.h:673
A list of the first screen (STSTATUS_createItemList)
Definition field_menu.h:237
s16 bag[0x194]
Definition field_menu.h:247
s16 items[0x194]
Definition field_menu.h:246
s32 list
into STSTATUS_itemLists
Definition field_menu.h:242
s32 level
Definition menu.h:21
s32 duration
Definition menu.h:19
s32 frames[7]
Definition game_state.h:341
One of a partner's Digimon (getPartnerEntry, setPartnerEntry)
Definition game_state.h:247
s16 skills[6]
SKILL_ID and the flags below, 0 for none.
Definition game_state.h:251
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
s16 stats[19]
Definition game_state.h:306
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
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
A technique (TECHS, from 1: technique n is TECHS[n - 1])
Definition game_state.h:110
u16 mp
its cost
Definition game_state.h:111
u8 effectPower
the effect's strength (a boost's amount, a drain's 128ths)
Definition game_state.h:121
A party member's techniques on the tech screen.
Definition field_menu.h:377
s16 techs[5]
the ones it can use here
Definition field_menu.h:380
PartnerEntry entries[3]
Definition field_menu.h:379
s32 techCount
Definition field_menu.h:381
s16 slots[4]
getPartnerSlots
Definition field_menu.h:378
The tech screen's windows.
Definition field_menu.h:385
TextWindow * help
Definition field_menu.h:388
TextWindow * mpLabel
Definition field_menu.h:390
TextWindow * listTitle
Definition field_menu.h:392
TextWindow * title
Definition field_menu.h:386
TextWindow * help2
Definition field_menu.h:389
PartnerPage pages[3]
Definition field_menu.h:387
TextWindow * mp
the technique's cost
Definition field_menu.h:391
TextWindow * techs[5]
Definition field_menu.h:393
The tech screen (STSTATUS_createTechScreen)
Definition field_menu.h:398
void(* nextState)(struct TechScreen *task)
Definition field_menu.h:399
s32 member
who uses the technique
Definition field_menu.h:409
s32 frames[3]
of the partners' portraits
Definition field_menu.h:404
PanelAnim pageFades[3]
Definition field_menu.h:417
PanelAnim fade
Definition field_menu.h:419
s32 blink
the help arrow
Definition field_menu.h:414
s32 cursorFrame
Definition field_menu.h:406
s32 targetShown
the target's cursor
Definition field_menu.h:410
PanelAnim fades[2]
Definition field_menu.h:418
void(* setSubstate)(struct TechScreen *task, s32 substate)
Definition field_menu.h:399
s32 memberShown
the user's cursor
Definition field_menu.h:408
TechRow rows[3]
Definition field_menu.h:413
FieldMenuScreen * menu
Definition field_menu.h:400
s32 count
party members
Definition field_menu.h:403
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
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
static void STSTATUS_closeTechScreen(TechScreen *screen, TechScreenWindows *windows)
Starts closing the screen: the last page, the help's panel and, with one member, the title.
void STSTATUS_showChosenTech(TechScreen *screen, TechScreenWindows *windows, s32 show)
Shows or hides the chosen technique's name and MP cost.
static void STSTATUS_closeSecondOfThreeTechPages(TechScreen *screen, TechScreenWindows *windows)
Three members: once the second page is closed, starts closing the first and the title.
void STSTATUS_runTechScreen(TechScreen *screen, TechScreenWindows *windows)
The technique screen's update: opens the pages, picks who uses a technique, which one and on whom,...
s32 STSTATUS_useTech(TechScreen *screen, TechScreenWindows *windows, s32 failSound)
Uses the chosen healing technique on the target or on the whole party, then plays FAILSOUND and says ...
Definition tech_screen.c:96
static void STSTATUS_closeNoFieldTechs(TechScreen *screen, TechScreenWindows *windows)
Cross takes the message away and goes back to choosing a member.
s32 STSTATUS_pageStats8[]
Task * STSTATUS_createTechScreen(FieldMenuScreen *menu, s32 extra)
Creates the field menu's technique screen (task)
static void STSTATUS_enterTechList(TechScreen *screen, TechScreenWindows *windows)
Once the list's panel is in, shows the techniques and the cursor on the first one.
static void STSTATUS_closeThirdTechPage(TechScreen *screen, TechScreenWindows *windows)
Three members: once the third page and the help's panel are closed, starts closing the second.
void STSTATUS_createTechWindows(TechScreen *screen, TechScreenWindows *windows)
Creates the technique screen's windows: the title, the party's pages, the help, the MP cost and the l...
s32 STSTATUS_listFieldTechs(TechScreen *screen, s32 member)
Lists the techniques of a party member that can be used here (0xB8-0xBC), each once,...
Definition tech_screen.c:23
void STSTATUS_updateTechScreen(TechScreen *screen, TechScreenWindows *windows)
The technique screen's task: counts the party, lists each member's techniques that can be used here a...
static void STSTATUS_chooseTechTarget(TechScreen *screen, TechScreenWindows *windows)
Choosing whom the technique heals: up and down move the cursor, cross uses it or says the MP is short...
void STSTATUS_showTechList(TechScreen *screen, TechScreenWindows *windows, s32 show)
Shows or hides the list of the party member's techniques.
static void STSTATUS_closeTechScreenAlone(TechScreen *screen)
One member: ends the screen once the page and the panels are closed.
s32 STSTATUS_techSprites[]
The sprites of the technique counts, from 1.
static void STSTATUS_openTechList(TechScreen *screen, TechScreenWindows *windows)
Starts opening the member's technique list, or says they have none.
static void STSTATUS_closeTechList(TechScreen *screen)
Once the list's panel is closed, goes back to choosing a member.
static void STSTATUS_openFirstOfThreeTechPages(TechScreen *screen, TechScreenWindows *windows)
Three members: once the first page and the title are in, shows them and starts the second page.
static void STSTATUS_chooseTechMember(TechScreen *screen)
Choosing who uses a technique: up and down move the cursor, cross opens the member's techniques,...
void STSTATUS_fillItemList(ItemList *panel)
Fills the item list with the owned items of its option's list (STSTATUS_itemLists) and counts them.
Definition tech_screen.c:8
static void STSTATUS_closeShortMp(TechScreen *screen, TechScreenWindows *windows)
Cross takes the short MP message away and goes back to the list.
static void STSTATUS_closeFirstTechPage(TechScreen *screen)
Two or three members: ends the screen once the first page and the title are closed.
static void STSTATUS_openThirdTechPage(TechScreen *screen, TechScreenWindows *windows)
Three members: once the third page and the help's panel are in, shows the page.
static void STSTATUS_chooseTech(TechScreen *screen, TechScreenWindows *windows)
Choosing a technique: up and down move the cursor, cross uses it (after choosing whom,...
void STSTATUS_drawTechScreen(TechScreen *screen)
Draws the partners' portraits and frames, the cursors and the help arrow.
static void STSTATUS_showTechHelp(TechScreen *screen, TechScreenWindows *windows)
Shows the member cursor and the help for choosing who uses a technique.
s32 STSTATUS_getTechHealing(s32 partner, s32 tech)
A technique's healing: 64 times its power, plus its power times the partner's wisdom over 8.
Definition tech_screen.c:80
static void STSTATUS_openFirstOfTwoTechPages(TechScreen *screen, TechScreenWindows *windows)
Two members: once the first page and the title are in, shows them and starts the second page and the ...
static void STSTATUS_closeTechUsed(TechScreen *screen, TechScreenWindows *windows)
Cross takes the technique's result away and goes back to where it was chosen.
static void STSTATUS_startTechScreen(TechScreen *screen)
Starts the fades of the first page and the title (and, with one party member, of the help's panel); t...
static void STSTATUS_stepTechCursor(TechScreen *screen)
Moves the member cursor's palette on every 9 frames.
static void STSTATUS_openTechScreenAlone(TechScreen *screen, TechScreenWindows *windows)
One member: once the page and the panels are in, shows the title and the page.
static void STSTATUS_animateTechPortraits(TechScreen *screen)
Moves the partners' portraits to their next frames every 13 frames.
void STSTATUS_showTechPage(TechScreen *screen, TechScreenWindows *windows, s32 member, s32 show)
As STSTATUS_showCardPage.
s32 STSTATUS_getChosenTech(TechScreen *screen)
The chosen technique, or 0 if its user hasn't the MP for it.
Definition tech_screen.c:68
static void STSTATUS_openSecondOfThreeTechPages(TechScreen *screen, TechScreenWindows *windows)
Three members: once the second page is in, shows it and starts the third page and the help's panel.
static void STSTATUS_sayNoFieldTechs(TechScreen *screen, TechScreenWindows *windows)
Hides the member cursor and says the member has no technique to use here.
static void STSTATUS_openSecondOfTwoTechPages(TechScreen *screen, TechScreenWindows *windows)
Two members: once the second page and the help's panel are in, shows the page.
static void STSTATUS_closeSecondOfTwoTechPages(TechScreen *screen, TechScreenWindows *windows)
Two members: once the second page and the help's panel are closed, starts closing the first and the t...
#define PALETTE_WHITE
The text windows' palettes (TextWindow.palette, setPalette): rows of the font's CLUTs,...
Definition text.h:112
#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 battle[6]
strength (raised by weapons), defense (by armour), spirit, wisdom, speed and charisma (by all equipme...
Definition game_state.h:418
s16 stats[24]
Definition game_state.h:410
struct PartnerTotals::@10 fields