Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
gym.h
Go to the documentation of this file.
1#ifndef STGTRAIN_H
2#define STGTRAIN_H
3
4/* STGTRAIN.PRO: the gyms, where the partners train their stats. The mode
5 it was entered from (the gym's stage) picks the gym's sign; the screen
6 shows the party, the selected partner's stats and the training menu. */
7
8#include "engine/game.h"
9
10/* The name of this overlay's copy of a function of src/shared/ */
11#define OVL_NAME(name) STGTRAIN_##name
12
13/* The overlay's files: the discs number them differently */
14#if VERSION_US || VERSION_JP
15#define STGTRAIN_TEXT TEXT_FILE(TEXT_TRAINING) /* its strings */
16#define STGTRAIN_FILE_SPRITES 0x27D
17#define STGTRAIN_FILE_IMAGES 0x27E /* a TIM archive */
18#elif VERSION_EU
19#define STGTRAIN_TEXT TEXT_FILE(TEXT_TRAINING)
20#define STGTRAIN_FILE_SPRITES 0x28C
21#define STGTRAIN_FILE_IMAGES 0x28D
22#endif
23#define STGTRAIN_SPRITES (STGTRAIN_FILE_SPRITES << 16 | 3) /* its sprite bank */
24
25/* A frame of a sprite animation */
26typedef struct TrainAnimFrame {
27 /* 0x0 */ s16 sprite; /* into the sprite bank */
28 /* 0x2 */ u8 duration; /* in ticks of GFX.funcs.getTime */
29 /* 0x4 */ s16 x;
30 /* 0x6 */ s16 y;
32
33/* A sprite animation: its frames follow the header */
34typedef struct TrainAnim {
35 /* 0x0 */ s16 unk0; /* 0x124 in every animation; nothing reads it */
36 /* 0x2 */ s16 frameCount;
37 /* 0x4 */ TrainAnimFrame frames[1];
38} TrainAnim;
39
40/* A part of a sprite: a rectangle of a texture page. A sprite is a count
41 and its parts, and the bank's sprites follow each other. */
42typedef struct TrainSpritePart {
43 /* 0x00 */ u8 u;
44 /* 0x01 */ u8 v;
45 /* 0x02 */ u8 x;
46 /* 0x03 */ u8 y;
47 /* 0x04 */ u16 clut; /* bits 6-14: the CLUT's row; bit 15: semi-transparent */
48 /* 0x06 */ u16 tpage; /* bits 0-4: the page's column, 64 pixels each; 5-8: getTPage's abr and tp */
49 /* 0x08 */ u16 w;
50 /* 0x0A */ u16 h;
51 /* 0x0C */ u8 unkC[8]; /* nothing reads it: in the files, four s16: 0, flags
52 (bits 0, 14 and 15), 0x1000 and 0x1000 */
54
55/* A sprite bank's header, as the animated sprite reads it: its sprites
56 start bankOffset bytes from it (TrainImageSet) */
57typedef struct TrainSpriteBank {
58 /* 0x0 */ s16 unk0; /* 801 in every bank; nothing reads it */
59 /* 0x2 */ u16 unk2; /* 0 in every bank */
60 /* 0x4 */ u16 spriteCount;
62
63/* Draws an animated sprite, maybe rotated and scaled (STGTRAIN_createSprite) */
64typedef struct TrainSprite {
66 /* 0x050 */ Layer *layer;
67 /* 0x054 */ u_long *ot;
68 /* 0x058 */ s32 layerId;
69 /* 0x05C */ s32 depth;
70 /* 0x060 */ s32 x;
71 /* 0x064 */ s32 y;
72 /* 0x068 */ s32 imageX;
73 /* 0x06C */ s32 imageY;
74 /* 0x070 */ s32 clutX;
75 /* 0x074 */ s32 clutY;
76 /* 0x078 */ s32 flags; /* bit 31: paused; the rest, ended */
77 /* 0x07C */ s32 pad; /* never read or written */
78 /* 0x080 */ TrainSpriteBank *bank;
79 /* 0x084 */ u16 unk84; /* the bank's unk2 and spriteCount: nothing reads them */
80 /* 0x086 */ u16 spriteCount;
81 /* 0x088 */ s32 bankOffset;
82 /* 0x08C */ TrainAnim *anim;
83 /* 0x090 */ s32 frame;
84 /* 0x094 */ s32 frameCount;
85 /* 0x098 */ s32 frameTime;
86 /* 0x09C */ s32 transformed;
87 /* 0x0A0 */ s32 pivotX;
88 /* 0x0A4 */ s32 pivotY;
89 /* 0x0A8 */ VECTOR scale;
90 /* 0x0B8 */ SVECTOR rotation;
91 /* 0x0C0 */ MATRIX matrix;
92 /* 0x0E0 */ void (*setBank)(struct TrainSprite *sprite, TrainSpriteBank *bank, s32 offset);
93 /* 0x0E4 */ void (*setAnim)(struct TrainSprite *sprite, TrainAnim *anim);
94 /* 0x0E8 */ void (*setPos)(struct TrainSprite *sprite, s32 x, s32 y);
95 /* 0x0EC */ void (*setImagePos)(struct TrainSprite *sprite, s32 x, s32 y);
96 /* 0x0F0 */ void (*setLayer)(struct TrainSprite *sprite, s32 layerId, s32 depth);
97 /* 0x0F4 */ void (*setClutPos)(struct TrainSprite *sprite, s32 x, s32 y);
98 /* 0x0F8 */ void (*setScale)(struct TrainSprite *sprite, s32 x, s32 y, s32 z);
99 /* 0x0FC */ void (*setPivot)(struct TrainSprite *sprite, s32 x, s32 y);
100 /* 0x100 */ void (*setRotation)(struct TrainSprite *sprite, s16 x, s16 y, s16 z);
101 /* 0x104 */ s32 (*getFlags)(struct TrainSprite *sprite);
102 /* 0x108 */ void (*setPaused)(struct TrainSprite *sprite, s32 paused);
104
105/* The training screen's main task (STGTRAIN_createScreen) */
106typedef struct TrainScreen {
108 /* 0x050 */ s32 layerId;
109 /* 0x054 */ s32 depth;
110 /* 0x058 */ s32 bgSprite; /* the gym's sign, by the mode it came from */
111 /* 0x05C */ s32 bgScroll;
112 /* 0x060 */ s32 bgTick;
113 /* 0x064 */ s32 partyCount;
114 /* 0x068 */ s32 partner; /* the one selected */
115 /* 0x06C */ s32 cursorShown;
116 /* 0x070 */ s32 cursorClut;
117 /* 0x074 */ s32 cursorTime;
118 /* 0x078 */ s32 training; /* the one picked in the menu, 0 for none */
119 /* 0x07C */ s32 intensity; /* the last one picked */
120 /* 0x080 */ struct {
123 } anims[3]; /* the party's sprites */
124 /* 0x098 */ s32 frame; /* the selected partner's sprite */
125 /* 0x09C */ s32 time;
126 /* 0x0A0 */ PanelAnim panels[7];
127 /* 0x110 */ void (*showStats)(struct TrainScreen *screen, PartnerTotals *before);
129
130/* The children of the training screen */
131typedef struct TrainScreenWindows {
132 /* 0x00 */ TextWindow *name;
133 /* 0x04 */ TextWindow *level[2];
134 /* 0x0C */ TextWindow *hp[3];
135 /* 0x18 */ TextWindow *mp[3];
136 /* 0x24 */ TextWindow *slashes[2];
137 /* 0x2C */ TextWindow *stats[6];
138 /* 0x44 */ TextWindow *resistances[7];
139 /* 0x60 */ TextWindow *tp[2];
140 /* 0x68 */ TextWindow *help; /* triangle stops training (string 5) */
141 /* 0x6C */ TextWindow *prompt; /* "Train which Digimon?" (string 6) */
142 /* 0x70 */ struct TrainMenu *menu;
143 /* 0x74 */ struct TrainSession *session;
144 /* 0x78 */ struct TrainResult *result;
145 /* 0x7C */ ScreenFade *fade;
147
148/* The training menu (STGTRAIN_createMenu) */
149typedef struct TrainMenu {
151 /* 0x050 */ TrainScreen *screen;
152 /* 0x054 */ s32 layerId;
153 /* 0x058 */ s32 depth;
154 /* 0x05C */ s32 cursorShown;
155 /* 0x060 */ s32 cursorClut;
156 /* 0x064 */ s32 cursorTime;
157 /* 0x068 */ s32 col; /* the cursor's */
158 /* 0x06C */ s32 row;
159 /* 0x070 */ s32 page;
160 /* 0x074 */ s32 arrowShown; /* to the other page */
161 /* 0x078 */ s32 arrowClut;
162 /* 0x07C */ s32 arrowTime;
163 /* 0x080 */ s32 iconFrame; /* the selected training's icon */
164 /* 0x084 */ s32 iconTime;
165 /* 0x088 */ s32 trainings[2][8]; /* [page][row * 4 + col], -1: none */
166 /* 0x0C8 */ PanelAnim panels[4];
167 /* 0x108 */ void (*open)(struct TrainMenu *menu);
168 /* 0x10C */ void (*close)(struct TrainMenu *menu);
169 /* 0x110 */ void (*showInfo)(struct TrainMenu *menu);
170} TrainMenu;
171
172/* A training session (STGTRAIN_createSession) */
173typedef struct TrainSession {
175 /* 0x050 */ TrainScreen *screen;
176 /* 0x054 */ s32 layerId;
177 /* 0x058 */ s32 depth;
178 /* 0x05C */ s32 intensity; /* the cursor's column, the training's intensity; from the screen's */
179 /* 0x060 */ s32 cursorClut;
180 /* 0x064 */ s32 cursorTime;
181 /* 0x068 */ s32 cursorShown;
182 /* 0x06C */ s32 choice; /* yes (0) or no */
183 /* 0x070 */ s32 iconFrame;
184 /* 0x074 */ s32 iconTime;
185 /* 0x078 */ PanelAnim panels[8];
186 /* 0x0F8 */ void (*finish)(struct TrainSession *session);
188
189/* The children of a training session */
190typedef struct TrainSessionWindows {
191 /* 0x00 */ TextWindow *text[3]; /* the message, the training and the intensity */
192 /* 0x0C */ TextWindow *intensities[3];
193 /* 0x18 */ TextWindow *notice; /* not enough points */
194 /* 0x1C */ TextWindow *answers[2]; /* yes, no */
195 /* 0x24 */ Cursor *cursor;
197
198/* A task the overlay creates (STGTRAIN_createIdle) that does nothing */
199typedef struct TrainIdle {
201 /* 0x50 */ TrainScreen *screen;
202 /* 0x54 */ s32 layerId;
203 /* 0x58 */ s32 depth;
204 /* 0x5C */ u8 pad[0x10]; /* never read or written: createTask allocates 0x6C bytes */
205} TrainIdle;
206
207/* An animated sprite of an image set, as a training shows it
208 (STGTRAIN_createActor): mode 1 idle, 2 scaling, 4 animating, 8 ending */
209typedef struct TrainActor {
211 /* 0x50 */ u32 mode;
212 /* 0x54 */ s32 set;
213 /* 0x58 */ s32 file; /* of STGTRAIN_files */
214 /* 0x5C */ s32 anim;
215 /* 0x60 */ s32 result; /* the training worked */
216 /* 0x64 */ s32 scale;
217 /* 0x68 */ s32 scaleStep;
218 /* 0x6C */ s32 pad6C; /* never read or written */
219 /* 0x70 */ s32 scaleChanged;
220 /* 0x74 */ s32 layerId;
221 /* 0x78 */ s32 depth;
222 /* 0x7C */ s32 pad7C; /* never read or written */
223 /* 0x80 */ s32 pos[4]; /* x, y, clutX, clutY: for loadSet */
224 /* 0x90 */ s32 savedX;
225 /* 0x94 */ s32 posSet;
226 /* 0x98 */ s32 clutSet;
227 /* 0x9C */ s32 chance; /* of the training working, in % */
228 /* 0xA0 */ s32 padA0; /* never read or written */
229 /* 0xA4 */ void (*setPos)(struct TrainActor *actor, s32 x, s32 y);
230 /* 0xA8 */ void (*setClutPos)(struct TrainActor *actor, s32 x, s32 y);
231 /* 0xAC */ void (*setChance)(struct TrainActor *actor, s32 chance);
232 /* 0xB0 */ void (*grow)(struct TrainActor *actor);
233 /* 0xB4 */ void (*shrink)(struct TrainActor *actor);
234 /* 0xB8 */ void (*play)(struct TrainActor *actor);
235 /* 0xBC */ void (*pause)(struct TrainActor *actor);
236 /* 0xC0 */ void (*setScale)(struct TrainActor *actor, s32 scale);
237 /* 0xC4 */ s32 (*getResult)(struct TrainActor *actor);
238 /* 0xC8 */ void (*end)(struct TrainActor *actor);
239 /* 0xCC */ u8 padCC[8]; /* never read or written: createTask allocates 0xD4 bytes */
240} TrainActor;
241
242/* The children of a TrainActor */
243typedef struct TrainActorSprites {
244 /* 0x0 */ TrainSprite *sprite;
245 /* 0x4 */ TrainSprite *effect; /* of set 8 */
246 /* 0x8 */ void *pad; /* never read or written: createTask allocates 0xC bytes of children */
248
249/* The results of a training (STGTRAIN_createResult) */
250typedef struct TrainResult {
252 /* 0x050 */ TrainScreen *screen;
253 /* 0x054 */ s32 layerId;
254 /* 0x058 */ s32 depth;
255 /* 0x05C */ s32 partner;
256 /* 0x060 */ s32 training;
257 /* 0x064 */ s32 trained[5];
258 /* 0x078 */ s32 gains[5];
259 /* 0x08C */ s32 losses[5];
260 /* 0x0A0 */ s32 modeArg;
262 /* 0x0D4 */ s32 bonusTrying; /* the bonus try (the fourth) is on: its mark blinks */
263 /* 0x0D8 */ s32 bonusWorked; /* the gains take their better columns */
264 /* 0x0DC */ s32 bonusBlink;
265 /* 0x0E0 */ s32 bonusBlinkTime;
266 /* 0x0E4 */ s32 prompting; /* the blinking arrow: cross goes on */
267 /* 0x0E8 */ s32 arrowClut;
268 /* 0x0EC */ s32 arrowTime;
269 /* 0x0F0 */ s16 bonusSound; /* the slot of the bonus try's sound */
270 /* 0x0F4 */ PanelAnim panels[4];
272
273/* The children of TrainResult */
274typedef struct TrainResultWindows {
275 /* 0x00 */ TextWindow *message[2];
276 /* 0x08 */ TextWindow *question[3]; /* whether to make the bonus try, yes, no */
277 /* 0x14 */ Cursor *cursor;
278 /* 0x18 */ TrainActor *actor;
280
281/* A stat change of a training: base plus a random 0..range-1 */
282typedef struct TrainGain {
283 /* 0x0 */ s32 base;
284 /* 0x4 */ s32 range;
285} TrainGain;
286
287/* An entry of STGTRAIN_files: a file and where its image goes */
288typedef struct TrainFile {
289 /* 0x0 */ s32 file;
290 /* 0x4 */ s32 x;
291 /* 0x8 */ s32 y;
292 /* 0xC */ s32 effectSameDepth; /* 0 draws the effect one depth in front of the
293 Digimon (STGTRAIN_updateActor) */
294} TrainFile;
295
296/* An image set of the loaded file (STGTRAIN_readSet) */
297typedef struct TrainImageSet {
298 /* 0x00 */ s32 id;
300 /* 0x08 */ s32 bankOffset;
301 /* 0x0C */ s32 bankSize; /* in bytes */
302 /* 0x10 */ TrainAnim *anims[6];
303 /* 0x28 */ u8 *images[4];
304 /* 0x38 */ s32 imageCount;
305 /* 0x3C */ s32 imageX[4];
306 /* 0x4C */ s32 imageY;
308
309/* The header of an image set in the loaded file: offsets into it, then
310 the bank's offset of its first sprite and the bank's size */
311typedef struct TrainSetHeader {
312 /* 0x00 */ s32 count; /* of the offsets */
313 /* 0x04 */ s32 bank;
314 /* 0x08 */ s32 anims[6];
315 /* 0x20 */ s32 images[1];
317
318/* Where readSet and its helpers read the loaded file */
319typedef union TrainCursor {
320 u8 *bytes; /* the file's offsets count bytes from its start */
324
325/* An entry of a gym level's trainings (STGTRAIN_gymTrainings) */
326typedef struct TrainEntry {
327 /* 0x0 */ s32 id;
328 /* 0x4 */ s16 stat; /* 1-5 battle stats, 8-14 resistances */
329 /* 0x6 */ s16 other; /* 1-5: lowered, 15 or 16: max HP or MP raised */
330} TrainEntry;
331
332/* A training (STGTRAIN_trainings) */
333typedef struct TrainInfo {
334 /* 0x00 */ s32 name; /* strings of the text file */
335 /* 0x04 */ s32 desc;
336 /* 0x08 */ s32 icons[4]; /* frames of STGTRAIN_FILE_SPRITES */
337} TrainInfo;
338
339/* The overlay's helpers and the file they load (STGTRAIN_state) */
340typedef struct TrainState {
341 /* 0x000 */ s32 tableCount; /* the entries of the last getTable */
342 /* 0x004 */ u8 *data; /* the loaded file of STGTRAIN_files */
343 /* 0x008 */ s32 fileIndex;
344 /* 0x00C */ TrainImageSet sets[9];
345 /* 0x2DC */ TrainInfo *trainings; /* STGTRAIN_trainings */
346 /* 0x2E0 */ void (*loadImages)(void);
347 /* 0x2E4 */ void (*startFade)(PanelAnim *fade, s32 fadeIn);
348 /* 0x2E8 */ s32 (*updateFade)(PanelAnim *fade);
349 /* 0x2EC */ void (*startLerp)(MenuLerp *lerp, s32 from, s32 to, s32 frames);
350 /* 0x2F0 */ s32 (*updateLerp)(MenuLerp *lerp);
351 /* 0x2F4 */ s32 (*requestFile)(s32 index);
352 /* 0x2F8 */ u8 *(*getFile)(void);
353 /* 0x2FC */ void (*freeFile)(void);
354 /* 0x300 */ s32 (*readSet)(s32 set);
355 /* 0x304 */ s32 (*loadSet)(s32 set, s32 *pos);
356 /* 0x308 */ s32 (*getFileId)(s32 index);
357 /* 0x30C */ s32 (*getFilePos)(s32 index); /* y << 16 | x */
358 /* 0x310 */ s32 (*getFileEffectSameDepth)(s32 index);
359 /* 0x314 */ TrainSpriteBank *(*getBank)(s32 set);
360 /* 0x318 */ s32 (*getBankOffset)(s32 set);
361 /* 0x31C */ s32 (*getBankSize)(s32 set);
362 /* 0x320 */ TrainAnim *(*getAnim)(s32 set, s32 i);
363 /* 0x324 */ TrainEntry *(*getTable)(s32 index);
364 /* 0x328 */ TrainEntry *(*findTableEntry)(s32 index, s32 id);
365} TrainState;
366
368
369/* The overlay's data, in its order: the first object's, the second's and the
370 third's */
376extern s32 STGTRAIN_intensityCosts[]; /* the points each intensity of a training costs */
377extern TrainEntry STGTRAIN_gymTrainings[14][16];
383
384/* sprite.c */
385void STGTRAIN_setSpriteBank(TrainSprite *sprite, TrainSpriteBank *bank, s32 offset);
386void STGTRAIN_setSpriteAnim(TrainSprite *sprite, TrainAnim *anim);
387void STGTRAIN_setSpriteLayer(TrainSprite *sprite, s32 layerId, s32 depth);
388void STGTRAIN_setSpritePos(TrainSprite *sprite, s32 x, s32 y);
390void STGTRAIN_setSpriteClutPos(TrainSprite *sprite, s32 x, s32 y);
391void STGTRAIN_setSpriteScale(TrainSprite *sprite, s32 x, s32 y, s32 z);
392void STGTRAIN_setSpritePivot(TrainSprite *sprite, s32 x, s32 y);
393void STGTRAIN_setSpriteRotation(TrainSprite *sprite, s16 x, s16 y, s16 z);
395void STGTRAIN_setSpritePaused(TrainSprite *sprite, s32 paused);
398
399/* scene.c */
400void STGTRAIN_updateRoot(Task *task, TrainScreen **children);
401
402/* screen.c */
404void STGTRAIN_showVitals(TrainScreen *screen, TrainScreenWindows *win, s32 show);
406void STGTRAIN_showTp(TrainScreen *screen, TrainScreenWindows *win, s32 show);
408void STGTRAIN_drawScreen(TrainScreen *screen);
412void STGTRAIN_startFader(ScreenFade *task, s32 fadeIn, s32 duration);
416
417/* result.c */
422void STGTRAIN_applyTry(TrainResult *result, s32 i);
425void STGTRAIN_drawResult(TrainResult *result);
428TrainResult *STGTRAIN_createResult(TrainScreen *screen, s32 partner, s32 training);
429void STGTRAIN_initIdle(TrainIdle *task, void *children);
430void STGTRAIN_showIdle(TrainIdle *task, void *children, s32 show);
431void STGTRAIN_drawIdle(TrainIdle *task);
432void STGTRAIN_runIdle(TrainIdle *task, void *children);
433void STGTRAIN_updateIdle(TrainIdle *task, void *children);
435
436/* session.c */
443
444/* actor.c */
447void STGTRAIN_playActor(TrainActor *actor);
448void STGTRAIN_setActorPos(TrainActor *actor, s32 x, s32 y);
449void STGTRAIN_setActorClutPos(TrainActor *actor, s32 x, s32 y);
450void STGTRAIN_setActorChance(TrainActor *actor, s32 chance);
451void STGTRAIN_growActor(TrainActor *actor);
453void STGTRAIN_setActorScale(TrainActor *actor, s32 scale);
455void STGTRAIN_endActor(TrainActor *actor);
456TrainActor *STGTRAIN_createActor(s32 set, s32 file, s32 layerId, s32 depth);
457
458/* menu.c */
460void STGTRAIN_showTrainingInfo(TrainMenu *menu, TextWindow **win, s32 show);
461void STGTRAIN_drawMenu(TrainMenu *menu);
462void STGTRAIN_runMenu(TrainMenu *menu, TextWindow **win);
463void STGTRAIN_updateMenu(TrainMenu *menu, TextWindow **win);
464void STGTRAIN_openMenu(TrainMenu *menu);
465void STGTRAIN_closeMenu(TrainMenu *menu);
468
469/* files.c */
470void STGTRAIN_loadImages(void);
471void STGTRAIN_startFade(PanelAnim *fade, s32 fadeIn);
473void STGTRAIN_startLerp(MenuLerp *lerp, s32 from, s32 to, s32 frames);
476u8 *STGTRAIN_getFile(void);
477void STGTRAIN_freeFile(void);
482s32 STGTRAIN_loadSet(s32 set, s32 *pos);
492
493#endif /* STGTRAIN_H */
signed int s32
Definition common.h:11
unsigned int u32
Definition common.h:12
signed short s16
Definition common.h:9
unsigned short u16
Definition common.h:10
unsigned char u8
Definition common.h:8
#define TASK_HEADER(Type)
Definition task.h:39
@ PARTNER_COUNT
Definition game_state.h:472
void STGTRAIN_finishSession(TrainSession *session)
Makes the session close (its substate 0x1E)
Definition session.c:451
s32 STGTRAIN_requestFile(s32 index)
Starts loading a file of STGTRAIN_files, unless it is the one loaded.
Definition files.c:22
void STGTRAIN_applyTry(TrainResult *result, s32 i)
Applies the i-th try of a training (if it worked) and shows what it changed: the stat it raises,...
Definition result.c:165
void STGTRAIN_drawScreen(TrainScreen *screen)
Draws the screen: the panels, the party's sprites and the sign.
Definition screen.c:223
s32 STGTRAIN_waitAnims[PARTNER_COUNT][7]
The overlay's data, in its order: the first object's, the second's and the third's.
Definition screen.c:692
void STGTRAIN_showTp(TrainScreen *screen, TrainScreenWindows *win, s32 show)
Shows or hides the selected partner's TP.
Definition screen.c:117
TrainGain STGTRAIN_statLosses[]
What a training may lower another battle stat by, by level.
Definition result.c:793
void STGTRAIN_startFade(PanelAnim *fade, s32 fadeIn)
void STGTRAIN_setActorClutPos(TrainActor *actor, s32 x, s32 y)
Sets where the Digimon's CLUTs go in VRAM.
Definition actor.c:256
void STGTRAIN_setSpriteScale(TrainSprite *sprite, s32 x, s32 y, s32 z)
Scales the sprite (0x1000 is its size), drawing it as quads.
Definition sprite.c:57
void STGTRAIN_freeFile(void)
Frees the loaded file of STGTRAIN_files.
Definition files.c:44
TrainEntry STGTRAIN_gymTrainings[14][16]
The trainings of each gym level, by STGTRAIN_findGymTraining: {id, stat, other}, 0 ends.
Definition files.c:249
void STGTRAIN_shrinkActor(TrainActor *actor)
Makes the Digimon shrink to nothing (mode 2)
Definition actor.c:275
void STGTRAIN_runIdle(TrainIdle *task, void *children)
Left empty.
Definition result.c:752
void STGTRAIN_setSpritePaused(TrainSprite *sprite, s32 paused)
Pauses the animation (paused) or plays it on.
Definition sprite.c:84
s32 STGTRAIN_raiseMaxHpMp(TrainResult *result, s32 stat)
Raises the maximum HP (stat 15) or MP (16) by the training's gain, up to 9999; the US version also ra...
Definition result.c:110
TrainFile STGTRAIN_files[]
the discs number their files differently
Definition files.c:394
void STGTRAIN_runScreen(TrainScreen *screen, TrainScreenWindows *win)
The training screen: opens the panels, picks the partner, runs the menu and the trainings,...
Definition screen.c:478
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
void STGTRAIN_runTraining(TrainResult *result, TrainResultWindows *win)
Runs a training: the partner tries it three times (five at the gyms' second half),...
Definition result.c:583
s32 STGTRAIN_updateLerp(MenuLerp *lerp)
void STGTRAIN_pauseActor(TrainActor *actor)
Pauses the Digimon's sprite and effect.
Definition actor.c:224
s32 STGTRAIN_readSetAnims(TrainSetHeader *header, s32 set)
The set's animations.
Definition files.c:63
s32 STGTRAIN_readSet(s32 set)
Reads an image set of the loaded file.
Definition files.c:91
void STGTRAIN_setSpriteBank(TrainSprite *sprite, TrainSpriteBank *bank, s32 offset)
sprite.c
Definition sprite.c:14
void STGTRAIN_showVitals(TrainScreen *screen, TrainScreenWindows *win, s32 show)
Shows or hides the selected partner's name, level, HP and MP.
Definition screen.c:34
void STGTRAIN_createSessionWindows(TrainSession *session, TrainSessionWindows *win)
session.c
Definition session.c:7
TrainEntry * STGTRAIN_findGymTraining(s32 index, s32 id)
A training of a gym level, by its id.
Definition files.c:228
TrainSpriteBank * STGTRAIN_getBank(s32 set)
The sprite bank of an image set.
Definition files.c:192
TrainEntry * STGTRAIN_getGymTrainings(s32 index)
The trainings of a gym level, counting them.
Definition files.c:212
void STGTRAIN_showMenuInfo(TrainMenu *menu)
Shows the selected training's name and description.
Definition menu.c:432
void STGTRAIN_setSpriteClutPos(TrainSprite *sprite, s32 x, s32 y)
Sets where the sprite's CLUT is in VRAM.
Definition sprite.c:51
TrainSession * STGTRAIN_createSession(TrainScreen *screen)
Creates a training session.
Definition session.c:456
s32 STGTRAIN_getFileId(s32 index)
The file of an entry of STGTRAIN_files.
Definition files.c:177
TrainActor * STGTRAIN_createActor(s32 set, s32 file, s32 layerId, s32 depth)
Creates an animated sprite of an image set.
Definition actor.c:302
void STGTRAIN_setSpritePivot(TrainSprite *sprite, s32 x, s32 y)
Sets the point the sprite scales and turns about.
Definition sprite.c:65
s32 STGTRAIN_readSetImages(TrainSetHeader *header, s32 set)
The images of a set: the rest of its offsets.
Definition files.c:79
void STGTRAIN_playActor(TrainActor *actor)
Plays the training on (mode 4), unpausing the sprite and effect.
Definition actor.c:236
s32 STGTRAIN_getSpriteFlags(TrainSprite *sprite)
Whether the animation has ended (the flags but for the pause)
Definition sprite.c:79
void STGTRAIN_showStatChanges(TrainScreen *screen, PartnerTotals *before)
Shows the selected partner's stats, in colour where they differ from before (NULL: just shows them).
Definition screen.c:139
void STGTRAIN_endActor(TrainActor *actor)
Plays the training's end (mode 8)
Definition actor.c:296
void STGTRAIN_drawResult(TrainResult *result)
Draws the training result: the blinking arrow, a mark for each try (0x45 worked, 0x46 failed) and the...
Definition result.c:258
TrainCursor STGTRAIN_animCursor
Definition files.c:431
void STGTRAIN_showTrainingInfo(TrainMenu *menu, TextWindow **win, s32 show)
Shows the name and description of the selected training (show) or hides them.
Definition menu.c:14
void STGTRAIN_updateFader(ScreenFade *task)
void STGTRAIN_initIdle(TrainIdle *task, void *children)
Left empty, as are the idle task's other steps.
Definition result.c:737
TrainScreen * STGTRAIN_createScreen(void)
Creates the training screen.
Definition screen.c:646
s32 STGTRAIN_lowerStat(TrainResult *result, s32 stat)
Lowers a battle stat (1-5) by the training's loss, half of the time, down to 0.
Definition result.c:35
void STGTRAIN_growActor(TrainActor *actor)
Makes the Digimon grow from nothing (mode 2)
Definition actor.c:268
s32 STGTRAIN_readSetBank(TrainSetHeader *header, s32 set)
The set's sprite bank, where its sprites start and its size: the two words after the set's offsets.
Definition files.c:52
TrainMenu * STGTRAIN_createMenu(TrainScreen *screen)
Creates the training menu.
Definition menu.c:437
u8 * STGTRAIN_getFile(void)
The requested file, or NULL while it loads.
Definition files.c:36
void STGTRAIN_startLerp(MenuLerp *lerp, s32 from, s32 to, s32 frames)
void STGTRAIN_showIdle(TrainIdle *task, void *children, s32 show)
Left empty.
Definition result.c:741
TrainCursor STGTRAIN_bankCursor
Definition files.c:430
TrainSprite * STGTRAIN_createSprite(void)
Creates an animated sprite.
Definition sprite.c:287
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
s32 STGTRAIN_getAccessoryBonus(TrainResult *result)
The bonus of the accessories 0x151 (3) and 0x152 (6)
Definition result.c:230
TrainGain STGTRAIN_maxHpMpGains[]
The max HP and MP gains, indexed like the resistances.
Definition result.c:821
void STGTRAIN_updateSession(TrainSession *session, TrainSessionWindows *win)
A training session.
Definition session.c:424
void STGTRAIN_showBattleStats(TrainScreen *screen, TrainScreenWindows *win, s32 show)
Shows or hides the selected partner's stats and resistances.
Definition screen.c:81
void STGTRAIN_updateMenu(TrainMenu *menu, TextWindow **win)
The training menu's task: a grid of trainings on two pages, filled from the gym's table (the training...
Definition menu.c:310
void STGTRAIN_setActorChance(TrainActor *actor, s32 chance)
Sets the chance that the training works.
Definition actor.c:263
s32 STGTRAIN_intensityCosts[]
the points each intensity of a training costs
Definition files.c:245
void STGTRAIN_drawIdle(TrainIdle *task)
Only sets up a sprite drawer.
Definition result.c:745
ScreenFade * STGTRAIN_createFader(void)
s32 STGTRAIN_getFileEffectSameDepth(s32 index)
Whether an entry of STGTRAIN_files draws its effect at the Digimon's depth.
Definition files.c:187
s32 STGTRAIN_getActorResult(TrainActor *actor)
Whether the training worked, once it is done (mode bit 0), else -1.
Definition actor.c:288
void STGTRAIN_setSpriteImagePos(TrainSprite *sprite, s32 x, s32 y)
Sets where the sprite's image is in VRAM.
Definition sprite.c:45
void STGTRAIN_setSpriteAnim(TrainSprite *sprite, TrainAnim *anim)
Starts an animation from its first frame.
Definition sprite.c:22
void STGTRAIN_updateScreen(TrainScreen *screen, TrainScreenWindows *win)
The training screen's update: loads its files, then runs the menu.
Definition screen.c:593
void STGTRAIN_drawMenu(TrainMenu *menu)
Draws the training menu: its panels, the trainings of the page and the cursor.
Definition menu.c:30
void STGTRAIN_openMenu(TrainMenu *menu)
Opens the training menu (its substate 0)
Definition menu.c:420
TrainAnim * STGTRAIN_getAnim(s32 set, s32 i)
An animation of an image set.
Definition files.c:207
void STGTRAIN_updateIdle(TrainIdle *task, void *children)
A task that does nothing: its steps are empty, and nothing creates it.
Definition result.c:756
void STGTRAIN_createResultWindows(TrainResult *result, TrainResultWindows *win)
Creates the training result's text windows and cursor.
Definition result.c:243
void STGTRAIN_closeMenu(TrainMenu *menu)
Closes the training menu (its substate 0x32)
Definition menu.c:426
void STGTRAIN_setSpriteLayer(TrainSprite *sprite, s32 layerId, s32 depth)
Sets the layer and depth the sprite is drawn at.
Definition sprite.c:33
TrainResult * STGTRAIN_createResult(TrainScreen *screen, s32 partner, s32 training)
Creates the results of a training of a partner.
Definition result.c:724
TrainCursor STGTRAIN_imageCursor
Definition files.c:432
s32 STGTRAIN_raiseStat(TrainResult *result, s32 stat)
result.c
Definition result.c:8
void STGTRAIN_loadImages(void)
files.c
Definition files.c:8
s32 STGTRAIN_loadSet(s32 set, s32 *pos)
Loads the images of a set into VRAM side by side, unpacking the run-length encoded ones ("RLEN") firs...
Definition files.c:112
TrainGain STGTRAIN_statGains[]
The battle stats a training raises, by [training >= 13][bonusWorked][level].
Definition result.c:786
void STGTRAIN_createScreenWindows(TrainScreen *screen, TrainScreenWindows *win)
screen.c
Definition screen.c:7
void STGTRAIN_setActorScale(TrainActor *actor, s32 scale)
Scales the Digimon (0x1000 is its size)
Definition actor.c:282
s32 STGTRAIN_getBankSize(s32 set)
The size of an image set's sprite bank (nothing calls it)
Definition files.c:202
void STGTRAIN_drawFader(ScreenFade *task)
void STGTRAIN_updateResult(TrainResult *result, TrainResultWindows *win)
The training result's task.
Definition result.c:691
void STGTRAIN_setActorPos(TrainActor *actor, s32 x, s32 y)
Sets where the Digimon's images go in VRAM.
Definition actor.c:249
void STGTRAIN_updateActor(TrainActor *actor, TrainActorSprites *sprites)
actor.c
Definition actor.c:183
TrainIdle * STGTRAIN_createIdle(TrainScreen *screen)
Creates the idle task for the screen.
Definition result.c:775
TrainState STGTRAIN_state
Definition files.c:422
s32 STGTRAIN_updateFade(PanelAnim *fade)
s32 STGTRAIN_getFilePos(s32 index)
Where the image of an entry of STGTRAIN_files goes (y << 16 | x)
Definition files.c:182
void STGTRAIN_startFader(ScreenFade *task, s32 fadeIn, s32 duration)
s32 STGTRAIN_getBankOffset(s32 set)
Where an image set's sprites start in its bank.
Definition files.c:197
void STGTRAIN_runMenu(TrainMenu *menu, TextWindow **win)
Runs the training menu: opens its panels, moves the cursor over the trainings of a page (L1 and R1 tu...
Definition menu.c:235
void STGTRAIN_setSpriteRotation(TrainSprite *sprite, s16 x, s16 y, s16 z)
Turns the sprite, drawing it as quads.
Definition sprite.c:71
void STGTRAIN_setSpritePos(TrainSprite *sprite, s32 x, s32 y)
Sets where the sprite is drawn.
Definition sprite.c:39
void STGTRAIN_updateSprite(TrainSprite *sprite)
The animated sprite's update: state 1 advances the animation, unless it is paused,...
Definition sprite.c:151
s32 STGTRAIN_raiseResistance(TrainResult *result, s32 stat)
Raises a resistance (stat 8-14) by the training's gain, up to 999: the table goes by the Digimon's gr...
Definition result.c:62
TrainGain * STGTRAIN_resistGainTables[]
The resistance gain tables, by the Digimon's affinity and the resistance's value (under 100,...
Definition result.c:814
void STGTRAIN_createMenuWindows(TrainMenu *menu, TextWindow **win)
menu.c
Definition menu.c:6
void STGTRAIN_updateRoot(Task *task, TrainScreen **children)
scene.c
Definition scene.c:6
TrainCursor STGTRAIN_setCursor
Definition files.c:433
A menu cursor: a text window showing one of the CURSOR_FRAMES glyphs.
Definition text.h:19
A drawing layer (GFX.funcs.createLayer): a DRAWENV with a pair of ordering tables,...
Definition gfx.h:128
Moves a value towards a target in fixed point, as the menu overlays' startLerp and updateLerp do.
Definition menu.h:27
Opens or closes a menu panel: level goes 0 -> ONE in duration frames (or back at twice the speed),...
Definition menu.h:18
Fades the whole screen to black and back with a subtractive rectangle.
Definition gfx.h:361
Any task, seen through its header.
Definition task.h:62
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
Definition text.h:131
The children of a TrainActor.
Definition gym.h:243
TrainSprite * effect
of set 8
Definition gym.h:245
void * pad
never read or written: createTask allocates 0xC bytes of children
Definition gym.h:246
TrainSprite * sprite
Definition gym.h:244
An animated sprite of an image set, as a training shows it (STGTRAIN_createActor): mode 1 idle,...
Definition gym.h:209
s32 padA0
never read or written
Definition gym.h:228
s32 scaleChanged
Definition gym.h:219
void(* play)(struct TrainActor *actor)
Definition gym.h:234
void(* setClutPos)(struct TrainActor *actor, s32 x, s32 y)
Definition gym.h:230
s32 pad7C
never read or written
Definition gym.h:222
void(* setScale)(struct TrainActor *actor, s32 scale)
Definition gym.h:236
void(* grow)(struct TrainActor *actor)
Definition gym.h:232
s32 layerId
Definition gym.h:220
s32 result
the training worked
Definition gym.h:215
s32 savedX
Definition gym.h:224
void(* pause)(struct TrainActor *actor)
Definition gym.h:235
s32 posSet
Definition gym.h:225
void(* end)(struct TrainActor *actor)
Definition gym.h:238
u32 mode
Definition gym.h:211
s32 anim
Definition gym.h:214
s32 clutSet
Definition gym.h:226
s32 pos[4]
x, y, clutX, clutY: for loadSet
Definition gym.h:223
s32 chance
of the training working, in %
Definition gym.h:227
void(* setChance)(struct TrainActor *actor, s32 chance)
Definition gym.h:231
s32(* getResult)(struct TrainActor *actor)
Definition gym.h:237
s32 pad6C
never read or written
Definition gym.h:218
u8 padCC[8]
never read or written: createTask allocates 0xD4 bytes
Definition gym.h:239
s32 set
Definition gym.h:212
void(* setPos)(struct TrainActor *actor, s32 x, s32 y)
Definition gym.h:229
s32 scale
Definition gym.h:216
void(* shrink)(struct TrainActor *actor)
Definition gym.h:233
s32 depth
Definition gym.h:221
s32 scaleStep
Definition gym.h:217
s32 file
of STGTRAIN_files
Definition gym.h:213
A frame of a sprite animation.
Definition gym.h:26
s16 sprite
into the sprite bank
Definition gym.h:27
u8 duration
in ticks of GFX.funcs.getTime
Definition gym.h:28
A sprite animation: its frames follow the header.
Definition gym.h:34
s16 unk0
0x124 in every animation; nothing reads it
Definition gym.h:35
s16 frameCount
Definition gym.h:36
TrainAnimFrame frames[1]
Definition gym.h:37
An entry of a gym level's trainings (STGTRAIN_gymTrainings)
Definition gym.h:326
s16 stat
1-5 battle stats, 8-14 resistances
Definition gym.h:328
s16 other
1-5: lowered, 15 or 16: max HP or MP raised
Definition gym.h:329
s32 id
Definition gym.h:327
An entry of STGTRAIN_files: a file and where its image goes.
Definition gym.h:288
s32 y
Definition gym.h:291
s32 file
Definition gym.h:289
s32 effectSameDepth
0 draws the effect one depth in front of the Digimon (STGTRAIN_updateActor)
Definition gym.h:292
s32 x
Definition gym.h:290
A stat change of a training: base plus a random 0..range-1.
Definition gym.h:282
s32 base
Definition gym.h:283
s32 range
Definition gym.h:284
A task the overlay creates (STGTRAIN_createIdle) that does nothing.
Definition gym.h:199
s32 depth
Definition gym.h:203
TrainScreen * screen
Definition gym.h:201
s32 layerId
Definition gym.h:202
u8 pad[0x10]
never read or written: createTask allocates 0x6C bytes
Definition gym.h:204
An image set of the loaded file (STGTRAIN_readSet)
Definition gym.h:297
TrainSpriteBank * bank
Definition gym.h:299
s32 imageY
Definition gym.h:306
s32 bankOffset
Definition gym.h:300
s32 imageCount
Definition gym.h:304
s32 bankSize
in bytes
Definition gym.h:301
s32 imageX[4]
Definition gym.h:305
TrainAnim * anims[6]
Definition gym.h:302
u8 * images[4]
Definition gym.h:303
A training (STGTRAIN_trainings)
Definition gym.h:333
s32 icons[4]
frames of STGTRAIN_FILE_SPRITES
Definition gym.h:336
s32 desc
Definition gym.h:335
s32 name
strings of the text file
Definition gym.h:334
The training menu (STGTRAIN_createMenu)
Definition gym.h:149
TrainScreen * screen
Definition gym.h:151
s32 cursorTime
Definition gym.h:156
s32 trainings[2][8]
[page][row * 4 + col], -1: none
Definition gym.h:165
s32 arrowTime
Definition gym.h:162
void(* close)(struct TrainMenu *menu)
Definition gym.h:168
s32 layerId
Definition gym.h:152
s32 page
Definition gym.h:159
void(* open)(struct TrainMenu *menu)
Definition gym.h:167
void(* showInfo)(struct TrainMenu *menu)
Definition gym.h:169
s32 cursorClut
Definition gym.h:155
PanelAnim panels[4]
Definition gym.h:166
s32 row
Definition gym.h:158
s32 iconTime
Definition gym.h:164
s32 cursorShown
Definition gym.h:154
s32 iconFrame
the selected training's icon
Definition gym.h:163
s32 arrowClut
Definition gym.h:161
s32 arrowShown
to the other page
Definition gym.h:160
s32 col
the cursor's
Definition gym.h:157
s32 depth
Definition gym.h:153
The children of TrainResult.
Definition gym.h:274
TextWindow * question[3]
whether to make the bonus try, yes, no
Definition gym.h:276
TrainActor * actor
Definition gym.h:278
TextWindow * message[2]
Definition gym.h:275
Cursor * cursor
Definition gym.h:277
The results of a training (STGTRAIN_createResult)
Definition gym.h:250
s32 training
Definition gym.h:256
s16 bonusSound
the slot of the bonus try's sound
Definition gym.h:269
s32 gains[5]
Definition gym.h:258
s32 trained[5]
Definition gym.h:257
s32 depth
Definition gym.h:254
s32 arrowClut
Definition gym.h:267
PanelAnim panels[4]
Definition gym.h:270
s32 losses[5]
Definition gym.h:259
s32 prompting
the blinking arrow: cross goes on
Definition gym.h:266
TrainScreen * screen
Definition gym.h:252
s32 arrowTime
Definition gym.h:268
s32 bonusBlinkTime
Definition gym.h:265
PartnerTotals before
Definition gym.h:261
s32 partner
Definition gym.h:255
s32 layerId
Definition gym.h:253
s32 bonusBlink
Definition gym.h:264
s32 bonusWorked
the gains take their better columns
Definition gym.h:263
s32 bonusTrying
the bonus try (the fourth) is on: its mark blinks
Definition gym.h:262
s32 modeArg
Definition gym.h:260
The children of the training screen.
Definition gym.h:131
TextWindow * stats[6]
Definition gym.h:137
TextWindow * tp[2]
Definition gym.h:139
TextWindow * slashes[2]
Definition gym.h:136
struct TrainSession * session
Definition gym.h:143
TextWindow * resistances[7]
Definition gym.h:138
TextWindow * level[2]
Definition gym.h:133
TextWindow * help
triangle stops training (string 5)
Definition gym.h:140
TextWindow * name
Definition gym.h:132
struct TrainResult * result
Definition gym.h:144
TextWindow * hp[3]
Definition gym.h:134
ScreenFade * fade
Definition gym.h:145
TextWindow * prompt
"Train which Digimon?" (string 6)
Definition gym.h:141
TextWindow * mp[3]
Definition gym.h:135
struct TrainMenu * menu
Definition gym.h:142
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
struct TrainScreen::@15 anims[3]
the party's sprites
s32 cursorTime
Definition gym.h:117
s32 partner
the one selected
Definition gym.h:114
s32 cursorClut
Definition gym.h:116
void(* showStats)(struct TrainScreen *screen, PartnerTotals *before)
Definition gym.h:127
PanelAnim panels[7]
Definition gym.h:126
s32 cursorShown
Definition gym.h:115
s32 time
Definition gym.h:122
s32 frame
the selected partner's sprite
Definition gym.h:121
s32 bgScroll
Definition gym.h:111
s32 bgTick
Definition gym.h:112
s32 bgSprite
the gym's sign, by the mode it came from
Definition gym.h:110
s32 intensity
the last one picked
Definition gym.h:119
s32 depth
Definition gym.h:109
s32 layerId
Definition gym.h:108
s32 partyCount
Definition gym.h:113
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
s32 depth
Definition gym.h:177
s32 iconTime
Definition gym.h:184
s32 intensity
the cursor's column, the training's intensity; from the screen's
Definition gym.h:178
The header of an image set in the loaded file: offsets into it, then the bank's offset of its first s...
Definition gym.h:311
s32 images[1]
Definition gym.h:315
s32 anims[6]
Definition gym.h:314
s32 count
of the offsets
Definition gym.h:312
A sprite bank's header, as the animated sprite reads it: its sprites start bankOffset bytes from it (...
Definition gym.h:57
u16 spriteCount
Definition gym.h:60
s16 unk0
801 in every bank; nothing reads it
Definition gym.h:58
u16 unk2
0 in every bank
Definition gym.h:59
A part of a sprite: a rectangle of a texture page.
Definition gym.h:42
u16 tpage
bits 0-4: the page's column, 64 pixels each; 5-8: getTPage's abr and tp
Definition gym.h:48
u8 unkC[8]
nothing reads it: in the files, four s16: 0, flags (bits 0, 14 and 15), 0x1000 and 0x1000
Definition gym.h:51
u16 clut
bits 6-14: the CLUT's row; bit 15: semi-transparent
Definition gym.h:47
Draws an animated sprite, maybe rotated and scaled (STGTRAIN_createSprite)
Definition gym.h:64
s32 y
Definition gym.h:71
s32 pivotY
Definition gym.h:88
s32 imageY
Definition gym.h:73
void(* setBank)(struct TrainSprite *sprite, TrainSpriteBank *bank, s32 offset)
Definition gym.h:92
s32 flags
bit 31: paused; the rest, ended
Definition gym.h:76
void(* setScale)(struct TrainSprite *sprite, s32 x, s32 y, s32 z)
Definition gym.h:98
s32 bankOffset
Definition gym.h:81
MATRIX matrix
Definition gym.h:91
s32 transformed
Definition gym.h:86
void(* setRotation)(struct TrainSprite *sprite, s16 x, s16 y, s16 z)
Definition gym.h:100
s32 pad
never read or written
Definition gym.h:77
u16 unk84
the bank's unk2 and spriteCount: nothing reads them
Definition gym.h:79
s32 x
Definition gym.h:70
void(* setAnim)(struct TrainSprite *sprite, TrainAnim *anim)
Definition gym.h:93
s32 clutX
Definition gym.h:74
s32 paused
Definition gym.h:65
void(* setClutPos)(struct TrainSprite *sprite, s32 x, s32 y)
Definition gym.h:97
s32 depth
Definition gym.h:69
s32(* getFlags)(struct TrainSprite *sprite)
Definition gym.h:101
u_long * ot
Definition gym.h:67
TrainSpriteBank * bank
Definition gym.h:78
SVECTOR rotation
Definition gym.h:90
s32 clutY
Definition gym.h:75
s32 frameCount
Definition gym.h:84
VECTOR scale
Definition gym.h:89
void(* setImagePos)(struct TrainSprite *sprite, s32 x, s32 y)
Definition gym.h:95
void(* setPivot)(struct TrainSprite *sprite, s32 x, s32 y)
Definition gym.h:99
u16 spriteCount
Definition gym.h:80
s32 frameTime
Definition gym.h:85
void(* setPos)(struct TrainSprite *sprite, s32 x, s32 y)
Definition gym.h:94
Layer * layer
Definition gym.h:66
s32 imageX
Definition gym.h:72
void(* setLayer)(struct TrainSprite *sprite, s32 layerId, s32 depth)
Definition gym.h:96
void(* setPaused)(struct TrainSprite *sprite, s32 paused)
Definition gym.h:102
s32 pivotX
Definition gym.h:87
s32 layerId
Definition gym.h:68
s32 frame
Definition gym.h:83
TrainAnim * anim
Definition gym.h:82
The overlay's helpers and the file they load (STGTRAIN_state)
Definition gym.h:340
s32(* requestFile)(s32 index)
Definition gym.h:351
TrainImageSet sets[9]
Definition gym.h:344
s32(* readSet)(s32 set)
Definition gym.h:354
s32 fileIndex
Definition gym.h:343
s32 tableCount
the entries of the last getTable
Definition gym.h:341
void(* loadImages)(void)
Definition gym.h:346
u8 * data
the loaded file of STGTRAIN_files
Definition gym.h:342
s32(* getBankOffset)(s32 set)
Definition gym.h:360
s32(* updateFade)(PanelAnim *fade)
Definition gym.h:348
s32(* getFilePos)(s32 index)
y << 16 | x
Definition gym.h:357
s32(* loadSet)(s32 set, s32 *pos)
Definition gym.h:355
s32(* updateLerp)(MenuLerp *lerp)
Definition gym.h:350
void(* startLerp)(MenuLerp *lerp, s32 from, s32 to, s32 frames)
Definition gym.h:349
void(* startFade)(PanelAnim *fade, s32 fadeIn)
Definition gym.h:347
s32(* getBankSize)(s32 set)
Definition gym.h:361
TrainInfo * trainings
STGTRAIN_trainings.
Definition gym.h:345
void(* freeFile)(void)
Definition gym.h:353
s32(* getFileEffectSameDepth)(s32 index)
Definition gym.h:358
s32(* getFileId)(s32 index)
Definition gym.h:356
computeStats' result: the stats with the equipment added, by STAT_* or by name.
Definition game_state.h:409
Where readSet and its helpers read the loaded file.
Definition gym.h:319
TrainSetHeader * set
Definition gym.h:322
s32 * w
Definition gym.h:321
u8 * bytes
the file's offsets count bytes from its start
Definition gym.h:320