Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
session.c
Go to the documentation of this file.
1/* A training session. It begins STGTRAIN.PRO's third object (see sprite.c),
2 whose rodata starts at 0x800825E8 (USA) */
3
4#include "menus/gym.h"
5
6/* Creates the training session's text windows and cursor */
8 win->text[0] = createTextWindow(session->layerId, 1, 0xA2, 0x49);
9 win->text[1] = createTextWindow(session->layerId, 1, 0xBC, 0x14);
10 win->text[2] = createTextWindow(session->layerId, 1, 0xC0, 0x29);
11 win->intensities[0] = createTextWindow(session->layerId, 1, 0x98, 0x66);
12 win->intensities[1] = createTextWindow(session->layerId, 1, 0xC0, 0x66);
13 win->intensities[2] = createTextWindow(session->layerId, 1, 0xE6, 0x66);
14 win->notice = createTextWindow(session->layerId, 1, 0x94, 0x87);
15 win->answers[0] = createTextWindow(session->layerId, 1, 0xA2, 0x64);
16 win->answers[1] = createTextWindow(session->layerId, 1, 0xA2, 0x74);
17 win->cursor = createCursor(session->layerId, session->depth - 1, 0, 0);
18 win->cursor->setVisible(win->cursor, 0);
19}
20
21/*
22 * Draws a training session: the training's icon, its panels and the cursor
23 * over the three columns.
24 */
26 SpriteDrawer sprite;
27 s32 i;
28
29 initSpriteDrawer(&sprite);
30 sprite.setLayerId(session->layerId, session->depth);
31 sprite.setTexture(0x240, 0x100);
32 if (session->panels[2].level != 0) {
33 if (session->panels[2].level != ONE) {
34 sprite.setScale(session->panels[2].level, session->panels[2].level, ONE);
35 sprite.setPivot(0xA6, 0x26);
36 }
37 if (GFX.funcs.getTime() - session->iconTime >= 0x10) {
38 session->iconTime = GFX.funcs.getTime();
39 session->iconFrame++;
40 if (session->iconFrame >= 4) {
41 session->iconFrame = 0;
42 }
43 }
44 /* the match depends on i holding the icon too */
45 i = STGTRAIN_state.trainings[session->screen->training].icons[session->iconFrame];
46 sprite.draw(FILE_CACHE.getEntry(STGTRAIN_FILE_SPRITES << 16), i, 0x94, 0x14);
47 }
48 if (session->panels[3].level != 0) {
49 if (session->panels[3].level != ONE) {
50 sprite.setScale(session->panels[3].level, session->panels[3].level, ONE);
51 sprite.setPivot(0xCE, 0x2F);
52 }
53 sprite.draw(FILE_CACHE.getEntry(STGTRAIN_SPRITES), 0x2A, 0xBC, 0x26);
54 }
55 if (session->panels[1].level != 0) {
56 sprite.setScale(session->panels[1].level, ONE, ONE);
57 if (session->panels[1].level != ONE) {
58 sprite.setPivot(0x140, 0x26);
59 }
60 sprite.draw(FILE_CACHE.getEntry(STGTRAIN_SPRITES), 0x25, 0x8F, 0xF);
61 }
62 if (session->panels[0].level != 0) {
63 if (session->panels[0].level != ONE) {
64 sprite.setScale(session->panels[0].level, ONE, ONE);
65 sprite.setPivot(0x140, 0x4E);
66 }
67 sprite.draw(FILE_CACHE.getEntry(STGTRAIN_SPRITES), 0x26, 0x85, 0x43);
68 }
69 if (session->cursorShown != 0) {
70 if (GFX.funcs.getTime() - session->cursorTime >= 0xB) {
71 session->cursorTime = GFX.funcs.getTime();
72 session->cursorClut++;
73 if (session->cursorClut >= 4) {
74 session->cursorClut = 0;
75 }
76 }
77 sprite.setClutRow(session->cursorClut);
78 sprite.draw(FILE_CACHE.getEntry(STGTRAIN_SPRITES), 0x29, session->intensity * 40 + 0x94, 0x63);
79 sprite.setClutRow(0);
80 }
81 if (session->panels[6].level != 0) {
82 if (session->panels[6].level != ONE) {
83 sprite.setScale(session->panels[6].level, session->panels[6].level, ONE);
84 }
85 for (i = 0; i < 3; i++) {
86 if (session->panels[6].level != ONE) {
87 sprite.setPivot(i * 40 + 0xA6, 0x6C);
88 }
89 sprite.draw(FILE_CACHE.getEntry(STGTRAIN_SPRITES), 0x2A, i * 40 + 0x94, 0x63);
90 }
91 }
92 if (session->panels[5].level != 0) {
93 sprite.setScale(session->panels[5].level, ONE, ONE);
94 sprite.setPivot(0x140, 0x6C);
95 sprite.draw(FILE_CACHE.getEntry(STGTRAIN_SPRITES), 0x27, 0x82, 0x5E);
96 }
97 if (session->panels[7].level != 0) {
98 sprite.setScale(session->panels[7].level, ONE, ONE);
99 sprite.setPivot(0x140, 0x8D);
100 sprite.draw(FILE_CACHE.getEntry(STGTRAIN_SPRITES), 0x27, 0x82, 0x7F);
101 }
102 if (session->panels[4].level != 0) {
103 sprite.setScale(session->panels[4].level, ONE, ONE);
104 sprite.setPivot(0x140, 0x72);
105 sprite.draw(FILE_CACHE.getEntry(STGTRAIN_SPRITES), 0x1D, 0x82, 0x5E);
106 }
107}
108
109/* Once the title panel is open, writes the training's name in it and opens
110 the next panel */
112 s32 name;
113
114 if (STGTRAIN_state.updateFade(&session->panels[1])) {
115 name = STGTRAIN_state.trainings[session->screen->training].name;
116 win->text[1]->setString(win->text[1], FILE_CACHE.load(STGTRAIN_TEXT), name);
117 STGTRAIN_state.startFade(&session->panels[2], 1);
118 session->substate++;
119 }
120}
121
122/* Once the intensities' panel is open, writes the three intensities and
123 shows the cursor */
125 s32 i;
126
127 if (STGTRAIN_state.updateFade(&session->panels[6])) {
128 for (i = 0; i < 3; i++) {
129 win->intensities[i]->setString(win->intensities[i], FILE_CACHE.load(STGTRAIN_TEXT), i + 0xE);
130 }
131 session->cursorShown = 1;
132 session->substate++;
133 }
134}
135
136/* Moves the cursor over the three intensities, and picks one (cross) when
137 the partner has its TP, else tells it has not; or leaves (triangle) */
138static inline void STGTRAIN_pickIntensity(TrainSession *session) {
139 PartnerTotals totals;
140 s32 last;
141
142 last = session->intensity;
144 if (--session->intensity < 0) {
145 session->intensity = 0;
146 }
148 if (++session->intensity >= 3) {
149 session->intensity = 2;
150 }
151 }
152 if (last != session->intensity) {
154 } else if (PAD_PRESSED(PAD_CROSS)) {
157 if (totals.fields.tp < STGTRAIN_intensityCosts[session->intensity]) {
158 session->substate = 0xA;
159 } else {
160 session->substate = 0xF;
161 session->screen->intensity = session->intensity;
162 }
163 } else if (PAD_PRESSED(PAD_TRIANGLE)) {
165 session->substate = 0x32;
166 session->step = 1;
167 }
168}
169
170/* Once cross is pressed, hides the not-enough-points notice and closes its
171 panel */
172static inline void STGTRAIN_closeNotice(TrainSession *session, TrainSessionWindows *win) {
173 if (PAD_PRESSED(PAD_CROSS)) {
175 win->notice->setVisible(win->notice, 0);
176 STGTRAIN_state.startFade(&session->panels[7], 0);
177 session->substate++;
178 }
179}
180
181/* Hides the intensities, the cursor and the message, and closes their panels */
183 s32 j;
184
185 session->cursorShown = 0;
186 win->text[0]->setVisible(win->text[0], 0);
187 for (j = 0; j < 3; j++) {
188 win->intensities[j]->setVisible(win->intensities[j], 0);
189 }
190 session->panels[6].level = 0;
191 STGTRAIN_state.startFade(&session->panels[5], 0);
192 STGTRAIN_state.startFade(&session->panels[0], 0);
193 session->substate++;
194}
195
196/* Once the question's panels are open, asks whether to train at the picked
197 intensity, with the cursor on yes */
198static inline void STGTRAIN_askToTrain(TrainSession *session, TrainSessionWindows *win) {
199 STGTRAIN_state.updateFade(&session->panels[3]);
200 STGTRAIN_state.updateFade(&session->panels[0]);
201 if (STGTRAIN_state.updateFade(&session->panels[4])) {
202 win->text[2]->setString(win->text[2], FILE_CACHE.load(STGTRAIN_TEXT), session->intensity + 0xE);
203 win->text[0]->setString(win->text[0], FILE_CACHE.load(STGTRAIN_TEXT), 9);
204 win->answers[0]->setString(win->answers[0], FILE_CACHE.load(STGTRAIN_TEXT), 0xA);
205 win->answers[1]->setString(win->answers[1], FILE_CACHE.load(STGTRAIN_TEXT), 0xB);
206 session->choice = 0;
207 win->cursor->setPos(win->cursor, 0x94, 0x64);
208 win->cursor->setVisible(win->cursor, 1);
209 session->substate++;
210 }
211}
212
213/* Moves the cursor between yes and no; yes pays the intensity's TP and
214 starts the training, no (or triangle) goes back to the intensities */
215static inline void STGTRAIN_answerToTrain(TrainSession *session, TrainSessionWindows *win) {
216 PartnerStats *stats;
217 s32 choice;
218
219 choice = session->choice;
221 session->choice = 0;
222 } else if (PAD_PRESSED(PAD_DOWN) || PAD_REPEATED(PAD_DOWN)) {
223 session->choice = 1;
224 }
225 if (choice != session->choice) {
227 win->cursor->setPos(win->cursor, 0x94, session->choice * 16 + 0x64);
228 } else if (PAD_PRESSED(PAD_CROSS)) {
230 if (session->choice == 0) {
231 session->substate = 0x19;
233 stats->stats[STAT_TP] -= STGTRAIN_intensityCosts[session->intensity];
234 } else {
235 session->substate++;
236 }
237 } else if (PAD_PRESSED(PAD_TRIANGLE)) {
239 session->substate++;
240 }
241}
242
243/* Hides the question, its answers and the cursor, and closes their panels */
244static inline void STGTRAIN_closeQuestion(TrainSession *session, TrainSessionWindows *win) {
245 STGTRAIN_state.startFade(&session->panels[0], 0);
246 STGTRAIN_state.startFade(&session->panels[4], 0);
247 STGTRAIN_state.startFade(&session->panels[3], 0);
248 win->text[2]->setVisible(win->text[2], 0);
249 win->text[0]->setVisible(win->text[0], 0);
250 win->answers[0]->setVisible(win->answers[0], 0);
251 win->answers[1]->setVisible(win->answers[1], 0);
252 win->cursor->setVisible(win->cursor, 0);
253 session->substate++;
254}
255
256/* Starts the training: hides the question's message, answers and cursor,
257 and closes their panels */
258static inline void STGTRAIN_startTraining(TrainSession *session, TrainSessionWindows *win) {
259 STGTRAIN_state.startFade(&session->panels[0], 0);
260 win->text[0]->setVisible(win->text[0], 0);
261 STGTRAIN_state.startFade(&session->panels[4], 0);
262 win->answers[0]->setVisible(win->answers[0], 0);
263 win->answers[1]->setVisible(win->answers[1], 0);
264 win->cursor->setVisible(win->cursor, 0);
265 session->substate++;
266}
267
268/* Ends the session once the training is over: hides the titles and closes
269 their panels */
270static inline void STGTRAIN_endSession(TrainSession *session, TrainSessionWindows *win) {
271 win->text[1]->setVisible(win->text[1], 0);
272 win->text[2]->setVisible(win->text[2], 0);
273 session->panels[2].level = 0;
274 session->panels[3].level = 0;
275 STGTRAIN_state.startFade(&session->panels[1], 0);
276 session->substate++;
277}
278
279/* Starts closing the session (triangle): hides its texts and closes its
280 panels */
281static inline void STGTRAIN_startClosing(TrainSession *session, TrainSessionWindows *win) {
282 s32 k;
283
284 session->cursorShown = 0;
285 win->text[0]->setVisible(win->text[0], 0);
286 for (k = 0; k < 3; k++) {
287 win->intensities[k]->setVisible(win->intensities[k], 0);
288 }
289 win->text[1]->setVisible(win->text[1], 0);
290 STGTRAIN_state.startFade(&session->panels[1], 0);
291 STGTRAIN_state.startFade(&session->panels[2], 0);
292 STGTRAIN_state.startFade(&session->panels[0], 0);
293 STGTRAIN_state.startFade(&session->panels[6], 0);
294 STGTRAIN_state.startFade(&session->panels[5], 0);
295 session->substate++;
296}
297
298/*
299 * Runs a training session: opens its panels, picks one of three
300 * intensities (it costs STGTRAIN_intensityCosts's points of totals.fields.tp), asks to confirm
301 * and closes, leaving the intensity in the screen's. The match depends on
302 * each loop and each cursor's last value having a variable of its own (now
303 * each in its own step): shared, they take other registers.
304 */
306 switch (session->substate) {
307 case 0:
308 default:
309 STGTRAIN_state.startFade(&session->panels[1], 1);
310 session->substate++;
311 break;
312 case 1:
313 STGTRAIN_showTrainingName(session, win);
314 break;
315 case 2:
316 if (STGTRAIN_state.updateFade(&session->panels[2])) {
317 STGTRAIN_state.startFade(&session->panels[0], 1);
318 session->substate++;
319 }
320 break;
321 case 3:
322 if (STGTRAIN_state.updateFade(&session->panels[0])) {
323 win->text[0]->setString(win->text[0], FILE_CACHE.load(STGTRAIN_TEXT), 8);
324 STGTRAIN_state.startFade(&session->panels[5], 1);
325 session->substate++;
326 }
327 break;
328 case 4:
329 if (STGTRAIN_state.updateFade(&session->panels[5])) {
330 STGTRAIN_state.startFade(&session->panels[6], 1);
331 session->substate++;
332 }
333 break;
334 case 5:
335 STGTRAIN_showIntensities(session, win);
336 break;
337 case 6:
338 STGTRAIN_pickIntensity(session);
339 break;
340 case 0xA:
341 session->cursorShown = 0;
342 STGTRAIN_state.startFade(&session->panels[7], 1);
343 session->substate++;
344 break;
345 case 0xB:
346 if (STGTRAIN_state.updateFade(&session->panels[7])) {
348 session->substate++;
349 }
350 break;
351 case 0xC:
352 STGTRAIN_closeNotice(session, win);
353 break;
354 case 0xD:
355 if (STGTRAIN_state.updateFade(&session->panels[7])) {
356 session->cursorShown = 1;
357 session->substate = 6;
358 }
359 break;
360 case 0xF:
361 STGTRAIN_closeIntensities(session, win);
362 break;
363 case 0x10:
364 STGTRAIN_state.updateFade(&session->panels[5]);
365 if (STGTRAIN_state.updateFade(&session->panels[0])) {
366 STGTRAIN_state.startFade(&session->panels[0], 1);
367 STGTRAIN_state.startFade(&session->panels[4], 1);
368 STGTRAIN_state.startFade(&session->panels[3], 1);
369 session->substate++;
370 }
371 break;
372 case 0x11:
373 STGTRAIN_askToTrain(session, win);
374 break;
375 case 0x12:
376 STGTRAIN_answerToTrain(session, win);
377 break;
378 case 0x13:
379 STGTRAIN_closeQuestion(session, win);
380 break;
381 case 0x14:
382 STGTRAIN_state.updateFade(&session->panels[3]);
383 STGTRAIN_state.updateFade(&session->panels[0]);
384 if (STGTRAIN_state.updateFade(&session->panels[4])) {
385 STGTRAIN_state.startFade(&session->panels[0], 1);
386 session->substate = 3;
387 }
388 break;
389 case 0x19:
390 STGTRAIN_startTraining(session, win);
391 break;
392 case 0x1A:
393 STGTRAIN_state.updateFade(&session->panels[0]);
394 if (STGTRAIN_state.updateFade(&session->panels[4])) {
395 session->substate = 0x23;
396 }
397 break;
398 case 0x1E:
399 STGTRAIN_endSession(session, win);
400 break;
401 case 0x1F:
402 if (STGTRAIN_state.updateFade(&session->panels[1])) {
403 session->state = TASK_KILL;
404 }
405 break;
406 case 0x23: /* a step that does nothing: its table entry leaves the switch */
407 break;
408 case 0x32:
409 STGTRAIN_startClosing(session, win);
410 break;
411 case 0x33:
412 STGTRAIN_state.updateFade(&session->panels[1]);
413 STGTRAIN_state.updateFade(&session->panels[2]);
414 STGTRAIN_state.updateFade(&session->panels[0]);
415 STGTRAIN_state.updateFade(&session->panels[6]);
416 if (STGTRAIN_state.updateFade(&session->panels[5]) && session->step != 0) {
417 session->state = TASK_DONE;
418 }
419 break;
420 }
421}
422
423/* A training session */
425 switch (session->state) {
426 case TASK_INIT:
427 default:
428 session->nextState(session);
429 STGTRAIN_createSessionWindows(session, win);
430 session->panels[6].duration = 8;
431 session->panels[5].duration = 10;
432 session->panels[4].duration = 10;
433 session->panels[0].duration = 10;
434 session->panels[1].duration = 10;
435 session->panels[3].duration = 6;
436 session->panels[2].duration = 6;
437 session->panels[7].duration = 10;
438 session->intensity = session->screen->intensity;
439 break;
440 case TASK_RUN:
441 STGTRAIN_runSession(session, win);
442 /* fallthrough */
443 case TASK_DONE:
444 STGTRAIN_drawSession(session);
445 case TASK_KILL:
446 break;
447 }
448}
449
450/* Makes the session close (its substate 0x1E) */
452 session->substate = 0x1E;
453}
454
455/* Creates a training session */
458
460 session->layerId = SCREEN_LAYER;
461 session->depth = 6;
462 session->screen = screen;
463 return session;
464}
signed int s32
Definition common.h:11
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
FileCache FILE_CACHE
The file cache.
Definition file_cache.c:7
s32 STGTRAIN_intensityCosts[]
the points each intensity of a training costs
Definition files.c:245
TrainState STGTRAIN_state
Definition files.c:422
#define STAT_TP
what the training's intensities cost
Definition game_state.h:280
#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
STGTRAIN.PRO: the gyms, where the partners train their stats.
#define STGTRAIN_FILE_SPRITES
Definition gym.h:20
#define STGTRAIN_SPRITES
its sprite bank
Definition gym.h:23
#define STGTRAIN_TEXT
The overlay's files: the discs number them differently.
Definition gym.h:19
#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_LEFT
Definition pad.h:25
#define PAD_REPEATED(button)
Definition pad.h:141
void STGTRAIN_finishSession(TrainSession *session)
Makes the session close (its substate 0x1E)
Definition session.c:451
static void STGTRAIN_askToTrain(TrainSession *session, TrainSessionWindows *win)
Once the question's panels are open, asks whether to train at the picked intensity,...
Definition session.c:198
static void STGTRAIN_closeNotice(TrainSession *session, TrainSessionWindows *win)
Once cross is pressed, hides the not-enough-points notice and closes its panel.
Definition session.c:172
void STGTRAIN_drawSession(TrainSession *session)
Draws a training session: the training's icon, its panels and the cursor over the three columns.
Definition session.c:25
static void STGTRAIN_showIntensities(TrainSession *session, TrainSessionWindows *win)
Once the intensities' panel is open, writes the three intensities and shows the cursor.
Definition session.c:124
void STGTRAIN_createSessionWindows(TrainSession *session, TrainSessionWindows *win)
Creates the training session's text windows and cursor.
Definition session.c:7
static void STGTRAIN_closeQuestion(TrainSession *session, TrainSessionWindows *win)
Hides the question, its answers and the cursor, and closes their panels.
Definition session.c:244
TrainSession * STGTRAIN_createSession(TrainScreen *screen)
Creates a training session.
Definition session.c:456
static void STGTRAIN_answerToTrain(TrainSession *session, TrainSessionWindows *win)
Moves the cursor between yes and no; yes pays the intensity's TP and starts the training,...
Definition session.c:215
void STGTRAIN_runSession(TrainSession *session, TrainSessionWindows *win)
Runs a training session: opens its panels, picks one of three intensities (it costs STGTRAIN_intensit...
Definition session.c:305
static void STGTRAIN_startClosing(TrainSession *session, TrainSessionWindows *win)
Starts closing the session (triangle): hides its texts and closes its panels.
Definition session.c:281
void STGTRAIN_updateSession(TrainSession *session, TrainSessionWindows *win)
A training session.
Definition session.c:424
static void STGTRAIN_endSession(TrainSession *session, TrainSessionWindows *win)
Ends the session once the training is over: hides the titles and closes their panels.
Definition session.c:270
static void STGTRAIN_showTrainingName(TrainSession *session, TrainSessionWindows *win)
Once the title panel is open, writes the training's name in it and opens the next panel.
Definition session.c:111
static void STGTRAIN_closeIntensities(TrainSession *session, TrainSessionWindows *win)
Hides the intensities, the cursor and the message, and closes their panels.
Definition session.c:182
static void STGTRAIN_pickIntensity(TrainSession *session)
Moves the cursor over the three intensities, and picks one (cross) when the partner has its TP,...
Definition session.c:138
static void STGTRAIN_startTraining(TrainSession *session, TrainSessionWindows *win)
Starts the training: hides the question's message, answers and cursor, and closes their panels.
Definition session.c:258
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(* setPos)()
(cursor, x, y)
Definition text.h:34
void(* setVisible)()
(cursor, visible)
Definition text.h:33
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
GameFuncs funcs
Definition game_state.h:582
s32(* getTime)(void)
Definition gfx.h:31
GfxFuncs funcs
Definition gfx.h:77
s32 level
Definition menu.h:21
s32 duration
Definition menu.h:19
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
void(* setString)()
Definition text.h:165
void(* setVisible)(struct TextWindow *obj, u8 arg)
Definition text.h:177
s32 icons[4]
frames of STGTRAIN_FILE_SPRITES
Definition gym.h:336
s32 name
strings of the text file
Definition gym.h:334
The training screen's main task (STGTRAIN_createScreen)
Definition gym.h:106
s32 training
the one picked in the menu, 0 for none
Definition gym.h:118
s32 partner
the one selected
Definition gym.h:114
s32 intensity
the last one picked
Definition gym.h:119
The children of a training session.
Definition gym.h:190
TextWindow * answers[2]
yes, no
Definition gym.h:194
TextWindow * notice
not enough points
Definition gym.h:193
TextWindow * text[3]
the message, the training and the intensity
Definition gym.h:191
Cursor * cursor
Definition gym.h:195
TextWindow * intensities[3]
Definition gym.h:192
A training session (STGTRAIN_createSession)
Definition gym.h:173
s32 iconFrame
Definition gym.h:183
s32 choice
yes (0) or no
Definition gym.h:182
PanelAnim panels[8]
Definition gym.h:185
s32 cursorClut
Definition gym.h:179
TrainScreen * screen
Definition gym.h:175
s32 cursorShown
Definition gym.h:181
void(* finish)(struct TrainSession *session)
Definition gym.h:186
s32 cursorTime
Definition gym.h:180
s32 layerId
Definition gym.h:176
void(* nextState)(struct TrainSession *task)
Definition gym.h:174
s32 step
Definition gym.h:174
s32 depth
Definition gym.h:177
s32 substate
Definition gym.h:174
s32 iconTime
Definition gym.h:184
s32 state
Definition gym.h:174
s32 intensity
the cursor's column, the training's intensity; from the screen's
Definition gym.h:178
s32(* updateFade)(PanelAnim *fade)
Definition gym.h:348
void(* startFade)(PanelAnim *fade, s32 fadeIn)
Definition gym.h:347
TrainInfo * trainings
STGTRAIN_trainings.
Definition gym.h:345
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
Definition task.c:105
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 tp
what the training's intensities cost
Definition game_state.h:413
struct PartnerTotals::@10 fields