85 for (i = 0; i < 3; i++) {
87 sprite.
setPivot(i * 40 + 0xA6, 0x6C);
128 for (i = 0; i < 3; i++) {
187 for (j = 0; j < 3; j++) {
225 if (choice != session->
choice) {
230 if (session->
choice == 0) {
286 for (k = 0; k < 3; k++) {
425 switch (session->
state) {
GfxState GFX
GFX: the graphics state and its methods.
GameState GAME
The save data, the game mode and the methods.
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Cursor * createCursor(s16 layerId, s32 depth, s16 x, s16 y)
A menu cursor on a layer at (x, y)
FileCache FILE_CACHE
The file cache.
s32 STGTRAIN_intensityCosts[]
the points each intensity of a training costs
TrainState STGTRAIN_state
#define STAT_TP
what the training's intensities cost
#define SCREEN_LAYER
The layer over the whole screen that most modes create first and draw their menus on (FIELDSTG and ST...
STGTRAIN.PRO: the gyms, where the partners train their stats.
#define STGTRAIN_FILE_SPRITES
#define STGTRAIN_SPRITES
its sprite bank
#define STGTRAIN_TEXT
The overlay's files: the discs number them differently.
#define PAD_PRESSED(button)
One button of pad 1: newly pressed, auto-repeated while held, or held.
#define PAD_REPEATED(button)
void STGTRAIN_finishSession(TrainSession *session)
Makes the session close (its substate 0x1E)
static void STGTRAIN_askToTrain(TrainSession *session, TrainSessionWindows *win)
Once the question's panels are open, asks whether to train at the picked intensity,...
static void STGTRAIN_closeNotice(TrainSession *session, TrainSessionWindows *win)
Once cross is pressed, hides the not-enough-points notice and closes its panel.
void STGTRAIN_drawSession(TrainSession *session)
Draws a training session: the training's icon, its panels and the cursor over the three columns.
static void STGTRAIN_showIntensities(TrainSession *session, TrainSessionWindows *win)
Once the intensities' panel is open, writes the three intensities and shows the cursor.
void STGTRAIN_createSessionWindows(TrainSession *session, TrainSessionWindows *win)
Creates the training session's text windows and cursor.
static void STGTRAIN_closeQuestion(TrainSession *session, TrainSessionWindows *win)
Hides the question, its answers and the cursor, and closes their panels.
TrainSession * STGTRAIN_createSession(TrainScreen *screen)
Creates a training session.
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,...
void STGTRAIN_runSession(TrainSession *session, TrainSessionWindows *win)
Runs a training session: opens its panels, picks one of three intensities (it costs STGTRAIN_intensit...
static void STGTRAIN_startClosing(TrainSession *session, TrainSessionWindows *win)
Starts closing the session (triangle): hides its texts and closes its panels.
void STGTRAIN_updateSession(TrainSession *session, TrainSessionWindows *win)
A training session.
static void STGTRAIN_endSession(TrainSession *session, TrainSessionWindows *win)
Ends the session once the training is over: hides the titles and closes their panels.
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.
static void STGTRAIN_closeIntensities(TrainSession *session, TrainSessionWindows *win)
Hides the intensities, the cursor and the message, and closes their panels.
static void STGTRAIN_pickIntensity(TrainSession *session)
Moves the cursor over the three intensities, and picks one (cross) when the partner has its TP,...
static void STGTRAIN_startTraining(TrainSession *session, TrainSessionWindows *win)
Starts the training: hides the question's message, answers and cursor, and closes their panels.
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define SOUND_MENU_CONFIRM
SYSTEM07.
#define SOUND_SELECT
Sounds the overlays share, with SOUNDTST's names.
#define SOUND_MENU_CANCEL
SYSTEM01.
#define SOUND_MENU_MOVE
SYSTEM06.
#define SOUND_CURSOR
SYSTEM02: a cursor moves.
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)
void(* setVisible)()
(cursor, visible)
void *(* getEntry)(u32 fileAndIndex)
struct PartnerStats *(* getPartnerStats)(s32 partner)
void(* computeStats)(s32 partner, union PartnerTotals *out)
s32(* getPartyMember)(u32 index)
A partner Digimon from its name on (Partner.info), as getPartnerStats gives it.
short(* playSound)(s32 id)
returns the voice of a key-on
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
void(* setScale)()
(x, y, z), ONE = 1.0
void(* setLayerId)()
(id, depth)
void(* setClutRow)()
(row)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
void(* setVisible)(struct TextWindow *obj, u8 arg)
s32 icons[4]
frames of STGTRAIN_FILE_SPRITES
s32 name
strings of the text file
The training screen's main task (STGTRAIN_createScreen)
s32 training
the one picked in the menu, 0 for none
s32 partner
the one selected
s32 intensity
the last one picked
The children of a training session.
TextWindow * answers[2]
yes, no
TextWindow * notice
not enough points
TextWindow * text[3]
the message, the training and the intensity
TextWindow * intensities[3]
A training session (STGTRAIN_createSession)
void(* finish)(struct TrainSession *session)
void(* nextState)(struct TrainSession *task)
s32 intensity
the cursor's column, the training's intensity; from the screen's
s32(* updateFade)(PanelAnim *fade)
void(* startFade)(PanelAnim *fade, s32 fadeIn)
TrainInfo * trainings
STGTRAIN_trainings.
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
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.
s16 tp
what the training's intensities cost
struct PartnerTotals::@10 fields