|
Digimon World 3 decomp
The European version, SLES_039.36
|
STGTRAIN.PRO: the gyms, where the partners train their stats. More...
#include "engine/game.h"Go to the source code of this file.
Data Structures | |
| struct | TrainAnimFrame |
| A frame of a sprite animation. More... | |
| struct | TrainAnim |
| A sprite animation: its frames follow the header. More... | |
| struct | TrainSpritePart |
| A part of a sprite: a rectangle of a texture page. More... | |
| struct | TrainSpriteBank |
| A sprite bank's header, as the animated sprite reads it: its sprites start bankOffset bytes from it (TrainImageSet) More... | |
| struct | TrainSprite |
| Draws an animated sprite, maybe rotated and scaled (STGTRAIN_createSprite) More... | |
| struct | TrainScreen |
| The training screen's main task (STGTRAIN_createScreen) More... | |
| struct | TrainScreenWindows |
| The children of the training screen. More... | |
| struct | TrainMenu |
| The training menu (STGTRAIN_createMenu) More... | |
| struct | TrainSession |
| A training session (STGTRAIN_createSession) More... | |
| struct | TrainSessionWindows |
| The children of a training session. More... | |
| struct | TrainIdle |
| A task the overlay creates (STGTRAIN_createIdle) that does nothing. More... | |
| struct | TrainActor |
| An animated sprite of an image set, as a training shows it (STGTRAIN_createActor): mode 1 idle, 2 scaling, 4 animating, 8 ending. More... | |
| struct | TrainActorSprites |
| The children of a TrainActor. More... | |
| struct | TrainResult |
| The results of a training (STGTRAIN_createResult) More... | |
| struct | TrainResultWindows |
| The children of TrainResult. More... | |
| struct | TrainGain |
| A stat change of a training: base plus a random 0..range-1. More... | |
| struct | TrainFile |
| An entry of STGTRAIN_files: a file and where its image goes. More... | |
| struct | TrainImageSet |
| An image set of the loaded file (STGTRAIN_readSet) More... | |
| struct | TrainSetHeader |
| The header of an image set in the loaded file: offsets into it, then the bank's offset of its first sprite and the bank's size. More... | |
| union | TrainCursor |
| Where readSet and its helpers read the loaded file. More... | |
| struct | TrainEntry |
| An entry of a gym level's trainings (STGTRAIN_gymTrainings) More... | |
| struct | TrainInfo |
| A training (STGTRAIN_trainings) More... | |
| struct | TrainState |
| The overlay's helpers and the file they load (STGTRAIN_state) More... | |
Macros | |
| #define | OVL_NAME(name) STGTRAIN_##name |
| The name of this overlay's copy of a function of src/shared/. | |
| #define | STGTRAIN_TEXT TEXT_FILE(TEXT_TRAINING) |
| The overlay's files: the discs number them differently. | |
| #define | STGTRAIN_FILE_SPRITES 0x28C |
| #define | STGTRAIN_FILE_IMAGES 0x28D |
| #define | STGTRAIN_SPRITES (STGTRAIN_FILE_SPRITES << 16 | 3) |
| its sprite bank | |
Functions | |
| void | STGTRAIN_setSpriteBank (TrainSprite *sprite, TrainSpriteBank *bank, s32 offset) |
| sprite.c | |
| void | STGTRAIN_setSpriteAnim (TrainSprite *sprite, TrainAnim *anim) |
| Starts an animation from its first frame. | |
| void | STGTRAIN_setSpriteLayer (TrainSprite *sprite, s32 layerId, s32 depth) |
| Sets the layer and depth the sprite is drawn at. | |
| void | STGTRAIN_setSpritePos (TrainSprite *sprite, s32 x, s32 y) |
| Sets where the sprite is drawn. | |
| void | STGTRAIN_setSpriteImagePos (TrainSprite *sprite, s32 x, s32 y) |
| Sets where the sprite's image is in VRAM. | |
| void | STGTRAIN_setSpriteClutPos (TrainSprite *sprite, s32 x, s32 y) |
| Sets where the sprite's CLUT is in VRAM. | |
| void | STGTRAIN_setSpriteScale (TrainSprite *sprite, s32 x, s32 y, s32 z) |
| Scales the sprite (0x1000 is its size), drawing it as quads. | |
| void | STGTRAIN_setSpritePivot (TrainSprite *sprite, s32 x, s32 y) |
| Sets the point the sprite scales and turns about. | |
| void | STGTRAIN_setSpriteRotation (TrainSprite *sprite, s16 x, s16 y, s16 z) |
| Turns the sprite, drawing it as quads. | |
| s32 | STGTRAIN_getSpriteFlags (TrainSprite *sprite) |
| Whether the animation has ended (the flags but for the pause) | |
| void | STGTRAIN_setSpritePaused (TrainSprite *sprite, s32 paused) |
| Pauses the animation (paused) or plays it on. | |
| void | STGTRAIN_updateSprite (TrainSprite *sprite) |
| The animated sprite's update: state 1 advances the animation, unless it is paused, and draws the frame's sprite, its parts from the last to the first, as sprites or, scaled and rotated about the pivot, as quads. | |
| TrainSprite * | STGTRAIN_createSprite (void) |
| Creates an animated sprite. | |
| void | STGTRAIN_updateRoot (Task *task, TrainScreen **children) |
| scene.c | |
| void | STGTRAIN_createScreenWindows (TrainScreen *screen, TrainScreenWindows *win) |
| screen.c | |
| void | STGTRAIN_showVitals (TrainScreen *screen, TrainScreenWindows *win, s32 show) |
| Shows or hides the selected partner's name, level, HP and MP. | |
| void | STGTRAIN_showBattleStats (TrainScreen *screen, TrainScreenWindows *win, s32 show) |
| Shows or hides the selected partner's stats and resistances. | |
| void | STGTRAIN_showTp (TrainScreen *screen, TrainScreenWindows *win, s32 show) |
| Shows or hides the selected partner's TP. | |
| void | STGTRAIN_showStatChanges (TrainScreen *screen, PartnerTotals *before) |
| Shows the selected partner's stats, in colour where they differ from before (NULL: just shows them). | |
| void | STGTRAIN_drawScreen (TrainScreen *screen) |
| Draws the screen: the panels, the party's sprites and the sign. | |
| void | STGTRAIN_runScreen (TrainScreen *screen, TrainScreenWindows *win) |
| The training screen: opens the panels, picks the partner, runs the menu and the trainings, and closes everything when leaving. | |
| void | STGTRAIN_updateScreen (TrainScreen *screen, TrainScreenWindows *win) |
| The training screen's update: loads its files, then runs the menu. | |
| TrainScreen * | STGTRAIN_createScreen (void) |
| Creates the training screen. | |
| void | STGTRAIN_startFader (ScreenFade *task, s32 fadeIn, s32 duration) |
| void | STGTRAIN_drawFader (ScreenFade *task) |
| void | STGTRAIN_updateFader (ScreenFade *task) |
| ScreenFade * | STGTRAIN_createFader (void) |
| s32 | STGTRAIN_raiseStat (TrainResult *result, s32 stat) |
| result.c | |
| 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. | |
| 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 growth of it and how high it already is. | |
| 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 raises the current value, up to the maximum. | |
| 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, and the one it lowers or also raises. | |
| s32 | STGTRAIN_getAccessoryBonus (TrainResult *result) |
| The bonus of the accessories 0x151 (3) and 0x152 (6) | |
| void | STGTRAIN_createResultWindows (TrainResult *result, TrainResultWindows *win) |
| Creates the training result's text windows and cursor. | |
| void | STGTRAIN_drawResult (TrainResult *result) |
| Draws the training result: the blinking arrow, a mark for each try (0x45 worked, 0x46 failed) and the four panels. | |
| void | STGTRAIN_runTraining (TrainResult *result, TrainResultWindows *win) |
| Runs a training: the partner tries it three times (five at the gyms' second half), then shows what it gained. | |
| void | STGTRAIN_updateResult (TrainResult *result, TrainResultWindows *win) |
| The training result's task. | |
| TrainResult * | STGTRAIN_createResult (TrainScreen *screen, s32 partner, s32 training) |
| Creates the results of a training of a partner. | |
| void | STGTRAIN_initIdle (TrainIdle *task, void *children) |
| Left empty, as are the idle task's other steps. | |
| void | STGTRAIN_showIdle (TrainIdle *task, void *children, s32 show) |
| Left empty. | |
| void | STGTRAIN_drawIdle (TrainIdle *task) |
| Only sets up a sprite drawer. | |
| void | STGTRAIN_runIdle (TrainIdle *task, void *children) |
| Left empty. | |
| void | STGTRAIN_updateIdle (TrainIdle *task, void *children) |
| A task that does nothing: its steps are empty, and nothing creates it. | |
| TrainIdle * | STGTRAIN_createIdle (TrainScreen *screen) |
| Creates the idle task for the screen. | |
| void | STGTRAIN_createSessionWindows (TrainSession *session, TrainSessionWindows *win) |
| session.c | |
| void | STGTRAIN_drawSession (TrainSession *session) |
| Draws a training session: the training's icon, its panels and the cursor over the three columns. | |
| void | STGTRAIN_runSession (TrainSession *session, TrainSessionWindows *win) |
| Runs a training session: opens its panels, picks one of three intensities (it costs STGTRAIN_intensityCosts's points of totals.fields.tp), asks to confirm and closes, leaving the intensity in the screen's. | |
| void | STGTRAIN_updateSession (TrainSession *session, TrainSessionWindows *win) |
| A training session. | |
| void | STGTRAIN_finishSession (TrainSession *session) |
| Makes the session close (its substate 0x1E) | |
| TrainSession * | STGTRAIN_createSession (TrainScreen *screen) |
| Creates a training session. | |
| void | STGTRAIN_updateActor (TrainActor *actor, TrainActorSprites *sprites) |
| actor.c | |
| void | STGTRAIN_pauseActor (TrainActor *actor) |
| Pauses the Digimon's sprite and effect. | |
| void | STGTRAIN_playActor (TrainActor *actor) |
| Plays the training on (mode 4), unpausing the sprite and effect. | |
| void | STGTRAIN_setActorPos (TrainActor *actor, s32 x, s32 y) |
| Sets where the Digimon's images go in VRAM. | |
| void | STGTRAIN_setActorClutPos (TrainActor *actor, s32 x, s32 y) |
| Sets where the Digimon's CLUTs go in VRAM. | |
| void | STGTRAIN_setActorChance (TrainActor *actor, s32 chance) |
| Sets the chance that the training works. | |
| void | STGTRAIN_growActor (TrainActor *actor) |
| Makes the Digimon grow from nothing (mode 2) | |
| void | STGTRAIN_shrinkActor (TrainActor *actor) |
| Makes the Digimon shrink to nothing (mode 2) | |
| void | STGTRAIN_setActorScale (TrainActor *actor, s32 scale) |
| Scales the Digimon (0x1000 is its size) | |
| s32 | STGTRAIN_getActorResult (TrainActor *actor) |
| Whether the training worked, once it is done (mode bit 0), else -1. | |
| void | STGTRAIN_endActor (TrainActor *actor) |
| Plays the training's end (mode 8) | |
| TrainActor * | STGTRAIN_createActor (s32 set, s32 file, s32 layerId, s32 depth) |
| Creates an animated sprite of an image set. | |
| void | STGTRAIN_createMenuWindows (TrainMenu *menu, TextWindow **win) |
| menu.c | |
| void | STGTRAIN_showTrainingInfo (TrainMenu *menu, TextWindow **win, s32 show) |
| Shows the name and description of the selected training (show) or hides them. | |
| void | STGTRAIN_drawMenu (TrainMenu *menu) |
| Draws the training menu: its panels, the trainings of the page and the cursor. | |
| 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 turn the pages when the gym has more than five), and closes with a training picked (cross) or none (triangle). | |
| 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 trainings it has), with the cursor on the last one. | |
| void | STGTRAIN_openMenu (TrainMenu *menu) |
| Opens the training menu (its substate 0) | |
| void | STGTRAIN_closeMenu (TrainMenu *menu) |
| Closes the training menu (its substate 0x32) | |
| void | STGTRAIN_showMenuInfo (TrainMenu *menu) |
| Shows the selected training's name and description. | |
| TrainMenu * | STGTRAIN_createMenu (TrainScreen *screen) |
| Creates the training menu. | |
| void | STGTRAIN_loadImages (void) |
| files.c | |
| void | STGTRAIN_startFade (PanelAnim *fade, s32 fadeIn) |
| s32 | STGTRAIN_updateFade (PanelAnim *fade) |
| void | STGTRAIN_startLerp (MenuLerp *lerp, s32 from, s32 to, s32 frames) |
| s32 | STGTRAIN_updateLerp (MenuLerp *lerp) |
| s32 | STGTRAIN_requestFile (s32 index) |
| Starts loading a file of STGTRAIN_files, unless it is the one loaded. | |
| u8 * | STGTRAIN_getFile (void) |
| The requested file, or NULL while it loads. | |
| void | STGTRAIN_freeFile (void) |
| Frees the loaded file of STGTRAIN_files. | |
| 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. | |
| s32 | STGTRAIN_readSetAnims (TrainSetHeader *header, s32 set) |
| The set's animations. | |
| s32 | STGTRAIN_readSetImages (TrainSetHeader *header, s32 set) |
| The images of a set: the rest of its offsets. | |
| s32 | STGTRAIN_readSet (s32 set) |
| Reads an image set of the loaded file. | |
| 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") first. | |
| s32 | STGTRAIN_getFileId (s32 index) |
| The file of an entry of STGTRAIN_files. | |
| s32 | STGTRAIN_getFilePos (s32 index) |
| Where the image of an entry of STGTRAIN_files goes (y << 16 | x) | |
| s32 | STGTRAIN_getFileEffectSameDepth (s32 index) |
| Whether an entry of STGTRAIN_files draws its effect at the Digimon's depth. | |
| TrainSpriteBank * | STGTRAIN_getBank (s32 set) |
| The sprite bank of an image set. | |
| s32 | STGTRAIN_getBankOffset (s32 set) |
| Where an image set's sprites start in its bank. | |
| s32 | STGTRAIN_getBankSize (s32 set) |
| The size of an image set's sprite bank (nothing calls it) | |
| TrainAnim * | STGTRAIN_getAnim (s32 set, s32 i) |
| An animation of an image set. | |
| TrainEntry * | STGTRAIN_getGymTrainings (s32 index) |
| The trainings of a gym level, counting them. | |
| TrainEntry * | STGTRAIN_findGymTraining (s32 index, s32 id) |
| A training of a gym level, by its id. | |
Variables | |
| TrainState | STGTRAIN_state |
| s32 | STGTRAIN_waitAnims [PARTNER_COUNT][7] |
| The overlay's data, in its order: the first object's, the second's and the third's. | |
| TrainGain | STGTRAIN_statGains [] |
| The battle stats a training raises, by [training >= 13][bonusWorked][level]. | |
| TrainGain | STGTRAIN_statLosses [] |
| What a training may lower another battle stat by, by level. | |
| TrainGain * | STGTRAIN_resistGainTables [] |
| The resistance gain tables, by the Digimon's affinity and the resistance's value (under 100, under 300, more) | |
| TrainGain | STGTRAIN_maxHpMpGains [] |
| The max HP and MP gains, indexed like the resistances. | |
| s32 | STGTRAIN_intensityCosts [] |
| the points each intensity of a training costs | |
| TrainEntry | STGTRAIN_gymTrainings [14][16] |
| The trainings of each gym level, by STGTRAIN_findGymTraining: {id, stat, other}, 0 ends. | |
| TrainFile | STGTRAIN_files [] |
| the discs number their files differently | |
| TrainCursor | STGTRAIN_bankCursor |
| TrainCursor | STGTRAIN_animCursor |
| TrainCursor | STGTRAIN_imageCursor |
| TrainCursor | STGTRAIN_setCursor |
STGTRAIN.PRO: the gyms, where the partners train their stats.
The mode it was entered from (the gym's stage) picks the gym's sign; the screen shows the party, the selected partner's stats and the training menu.
Definition in file gym.h.
| #define OVL_NAME | ( | name | ) | STGTRAIN_##name |
| #define STGTRAIN_TEXT TEXT_FILE(TEXT_TRAINING) |
| #define STGTRAIN_SPRITES (STGTRAIN_FILE_SPRITES << 16 | 3) |
| void STGTRAIN_setSpriteBank | ( | TrainSprite * | sprite, |
| TrainSpriteBank * | bank, | ||
| s32 | offset | ||
| ) |
Definition at line 14 of file sprite.c.
Referenced by STGTRAIN_createSprite().
| void STGTRAIN_setSpriteAnim | ( | TrainSprite * | sprite, |
| TrainAnim * | anim | ||
| ) |
Starts an animation from its first frame.
Definition at line 22 of file sprite.c.
Referenced by STGTRAIN_createSprite().
| void STGTRAIN_setSpriteLayer | ( | TrainSprite * | sprite, |
| s32 | layerId, | ||
| s32 | depth | ||
| ) |
Sets the layer and depth the sprite is drawn at.
Definition at line 33 of file sprite.c.
Referenced by STGTRAIN_createSprite().
| void STGTRAIN_setSpritePos | ( | TrainSprite * | sprite, |
| s32 | x, | ||
| s32 | y | ||
| ) |
Sets where the sprite is drawn.
Definition at line 39 of file sprite.c.
Referenced by STGTRAIN_createSprite().
| void STGTRAIN_setSpriteImagePos | ( | TrainSprite * | sprite, |
| s32 | x, | ||
| s32 | y | ||
| ) |
Sets where the sprite's image is in VRAM.
Definition at line 45 of file sprite.c.
Referenced by STGTRAIN_createSprite().
| void STGTRAIN_setSpriteClutPos | ( | TrainSprite * | sprite, |
| s32 | x, | ||
| s32 | y | ||
| ) |
Sets where the sprite's CLUT is in VRAM.
Definition at line 51 of file sprite.c.
Referenced by STGTRAIN_createSprite().
| void STGTRAIN_setSpriteScale | ( | TrainSprite * | sprite, |
| s32 | x, | ||
| s32 | y, | ||
| s32 | z | ||
| ) |
Scales the sprite (0x1000 is its size), drawing it as quads.
Definition at line 57 of file sprite.c.
Referenced by STGTRAIN_createSprite().
| void STGTRAIN_setSpritePivot | ( | TrainSprite * | sprite, |
| s32 | x, | ||
| s32 | y | ||
| ) |
Sets the point the sprite scales and turns about.
Definition at line 65 of file sprite.c.
Referenced by STGTRAIN_createSprite().
| void STGTRAIN_setSpriteRotation | ( | TrainSprite * | sprite, |
| s16 | x, | ||
| s16 | y, | ||
| s16 | z | ||
| ) |
Turns the sprite, drawing it as quads.
Definition at line 71 of file sprite.c.
Referenced by STGTRAIN_createSprite().
| s32 STGTRAIN_getSpriteFlags | ( | TrainSprite * | sprite | ) |
Whether the animation has ended (the flags but for the pause)
Definition at line 79 of file sprite.c.
Referenced by STGTRAIN_createSprite().
| void STGTRAIN_setSpritePaused | ( | TrainSprite * | sprite, |
| s32 | paused | ||
| ) |
Pauses the animation (paused) or plays it on.
Definition at line 84 of file sprite.c.
Referenced by STGTRAIN_createSprite().
| void STGTRAIN_updateSprite | ( | TrainSprite * | sprite | ) |
The animated sprite's update: state 1 advances the animation, unless it is paused, and draws the frame's sprite, its parts from the last to the first, as sprites or, scaled and rotated about the pivot, as quads.
The match depends on cur holding the animation before its frames.
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
Definition at line 151 of file sprite.c.
Referenced by STGTRAIN_createSprite().
| TrainSprite * STGTRAIN_createSprite | ( | void | ) |
Creates an animated sprite.
Definition at line 287 of file sprite.c.
Referenced by STGTRAIN_setUpActor().
| void STGTRAIN_updateRoot | ( | Task * | task, |
| TrainScreen ** | children | ||
| ) |
scene.c
scene.c
Definition at line 6 of file scene.c.
Referenced by STGTRAIN_start().
| void STGTRAIN_createScreenWindows | ( | TrainScreen * | screen, |
| TrainScreenWindows * | win | ||
| ) |
screen.c
screen.c
Definition at line 7 of file screen.c.
Referenced by STGTRAIN_updateScreen().
| void STGTRAIN_showVitals | ( | TrainScreen * | screen, |
| TrainScreenWindows * | win, | ||
| s32 | show | ||
| ) |
Shows or hides the selected partner's name, level, HP and MP.
Definition at line 34 of file screen.c.
Referenced by STGTRAIN_openBattleStats(), STGTRAIN_pickPartner(), STGTRAIN_showStatChanges(), and STGTRAIN_startLeaving().
| void STGTRAIN_showBattleStats | ( | TrainScreen * | screen, |
| TrainScreenWindows * | win, | ||
| s32 | show | ||
| ) |
Shows or hides the selected partner's stats and resistances.
Definition at line 81 of file screen.c.
Referenced by STGTRAIN_openTp(), STGTRAIN_pickPartner(), STGTRAIN_runScreen(), STGTRAIN_showStatChanges(), and STGTRAIN_startLeaving().
| void STGTRAIN_showTp | ( | TrainScreen * | screen, |
| TrainScreenWindows * | win, | ||
| s32 | show | ||
| ) |
Shows or hides the selected partner's TP.
Definition at line 117 of file screen.c.
Referenced by STGTRAIN_openParty(), STGTRAIN_pickPartner(), STGTRAIN_startLeaving(), and STGTRAIN_waitSession().
| void STGTRAIN_showStatChanges | ( | TrainScreen * | screen, |
| PartnerTotals * | before | ||
| ) |
Shows the selected partner's stats, in colour where they differ from before (NULL: just shows them).
The MP label is given win->mp[3] (that is, slashes[0]) as its window, as in the original. The match depends on the stats and resistances being read as *(totals.fields.battle + i).
< a light blue: what is highlighted or current
< a light blue: what is highlighted or current
< a light blue: what is highlighted or current
< a light blue: what is highlighted or current
Definition at line 139 of file screen.c.
Referenced by STGTRAIN_createScreen().
| void STGTRAIN_drawScreen | ( | TrainScreen * | screen | ) |
Draws the screen: the panels, the party's sprites and the sign.
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< its sprite bank
Definition at line 223 of file screen.c.
Referenced by STGTRAIN_updateScreen().
| void STGTRAIN_runScreen | ( | TrainScreen * | screen, |
| TrainScreenWindows * | win | ||
| ) |
The training screen: opens the panels, picks the partner, runs the menu and the trainings, and closes everything when leaving.
Definition at line 478 of file screen.c.
Referenced by STGTRAIN_updateScreen().
| void STGTRAIN_updateScreen | ( | TrainScreen * | screen, |
| TrainScreenWindows * | win | ||
| ) |
The training screen's update: loads its files, then runs the menu.
< TRAINING: the gym's training
< TRAINING: the gym's training
Definition at line 593 of file screen.c.
Referenced by STGTRAIN_createScreen().
| TrainScreen * STGTRAIN_createScreen | ( | void | ) |
Creates the training screen.
Definition at line 646 of file screen.c.
Referenced by STGTRAIN_updateRoot().
| void STGTRAIN_startFader | ( | ScreenFade * | task, |
| s32 | fadeIn, | ||
| s32 | duration | ||
| ) |
| void STGTRAIN_drawFader | ( | ScreenFade * | task | ) |
| void STGTRAIN_updateFader | ( | ScreenFade * | task | ) |
| ScreenFade * STGTRAIN_createFader | ( | void | ) |
| s32 STGTRAIN_raiseStat | ( | TrainResult * | result, |
| s32 | stat | ||
| ) |
Definition at line 8 of file result.c.
Referenced by STGTRAIN_applyTry().
| 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 at line 35 of file result.c.
Referenced by STGTRAIN_applyTry().
| 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 growth of it and how high it already is.
Definition at line 62 of file result.c.
Referenced by STGTRAIN_applyTry().
| 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 raises the current value, up to the maximum.
Definition at line 110 of file result.c.
Referenced by STGTRAIN_applyTry().
| 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, and the one it lowers or also raises.
< a light blue: what is highlighted or current
< a light blue: what is highlighted or current
< a light blue: what is highlighted or current
Definition at line 165 of file result.c.
Referenced by STGTRAIN_takeBonusTry(), and STGTRAIN_takeTry().
| s32 STGTRAIN_getAccessoryBonus | ( | TrainResult * | result | ) |
The bonus of the accessories 0x151 (3) and 0x152 (6)
Definition at line 230 of file result.c.
Referenced by STGTRAIN_runTraining().
| void STGTRAIN_createResultWindows | ( | TrainResult * | result, |
| TrainResultWindows * | win | ||
| ) |
Creates the training result's text windows and cursor.
Definition at line 243 of file result.c.
Referenced by STGTRAIN_updateResult().
| void STGTRAIN_drawResult | ( | TrainResult * | result | ) |
Draws the training result: the blinking arrow, a mark for each try (0x45 worked, 0x46 failed) and the four panels.
< its sprite bank
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
Definition at line 258 of file result.c.
Referenced by STGTRAIN_updateResult().
| void STGTRAIN_runTraining | ( | TrainResult * | result, |
| TrainResultWindows * | win | ||
| ) |
Runs a training: the partner tries it three times (five at the gyms' second half), then shows what it gained.
Three good tries in a row give a bonus try, asked for (with the training as the partner's last) after the gyms' first half.
< SYSTEM07
< SYSTEM07
Definition at line 583 of file result.c.
Referenced by STGTRAIN_updateResult().
| void STGTRAIN_updateResult | ( | TrainResult * | result, |
| TrainResultWindows * | win | ||
| ) |
The training result's task.
Definition at line 691 of file result.c.
Referenced by STGTRAIN_createResult().
| TrainResult * STGTRAIN_createResult | ( | TrainScreen * | screen, |
| s32 | partner, | ||
| s32 | training | ||
| ) |
Creates the results of a training of a partner.
Definition at line 724 of file result.c.
Referenced by STGTRAIN_runScreen().
| void STGTRAIN_initIdle | ( | TrainIdle * | task, |
| void * | children | ||
| ) |
Left empty, as are the idle task's other steps.
Definition at line 737 of file result.c.
Referenced by STGTRAIN_updateIdle().
Left empty.
Definition at line 741 of file result.c.
Referenced by STGTRAIN_updateIdle().
| void STGTRAIN_drawIdle | ( | TrainIdle * | task | ) |
Only sets up a sprite drawer.
Definition at line 745 of file result.c.
Referenced by STGTRAIN_updateIdle().
| void STGTRAIN_runIdle | ( | TrainIdle * | task, |
| void * | children | ||
| ) |
Left empty.
Definition at line 752 of file result.c.
Referenced by STGTRAIN_updateIdle().
| void STGTRAIN_updateIdle | ( | TrainIdle * | task, |
| void * | children | ||
| ) |
A task that does nothing: its steps are empty, and nothing creates it.
Definition at line 756 of file result.c.
Referenced by STGTRAIN_createIdle().
| TrainIdle * STGTRAIN_createIdle | ( | TrainScreen * | screen | ) |
| void STGTRAIN_createSessionWindows | ( | TrainSession * | session, |
| TrainSessionWindows * | win | ||
| ) |
Definition at line 7 of file session.c.
Referenced by STGTRAIN_updateSession().
| void STGTRAIN_drawSession | ( | TrainSession * | session | ) |
Draws a training session: the training's icon, its panels and the cursor over the three columns.
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
Definition at line 25 of file session.c.
Referenced by STGTRAIN_updateSession().
| void STGTRAIN_runSession | ( | TrainSession * | session, |
| TrainSessionWindows * | win | ||
| ) |
Runs a training session: opens its panels, picks one of three intensities (it costs STGTRAIN_intensityCosts's points of totals.fields.tp), asks to confirm and closes, leaving the intensity in the screen's.
The match depends on each loop and each cursor's last value having a variable of its own (now each in its own step): shared, they take other registers.
Definition at line 305 of file session.c.
Referenced by STGTRAIN_updateSession().
| void STGTRAIN_updateSession | ( | TrainSession * | session, |
| TrainSessionWindows * | win | ||
| ) |
A training session.
Definition at line 424 of file session.c.
Referenced by STGTRAIN_createSession().
| void STGTRAIN_finishSession | ( | TrainSession * | session | ) |
Makes the session close (its substate 0x1E)
Definition at line 451 of file session.c.
Referenced by STGTRAIN_createSession().
| TrainSession * STGTRAIN_createSession | ( | TrainScreen * | screen | ) |
Creates a training session.
Definition at line 456 of file session.c.
Referenced by STGTRAIN_runScreen().
| void STGTRAIN_updateActor | ( | TrainActor * | actor, |
| TrainActorSprites * | sprites | ||
| ) |
actor.c
actor.c
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
Definition at line 183 of file actor.c.
Referenced by STGTRAIN_createActor().
| void STGTRAIN_pauseActor | ( | TrainActor * | actor | ) |
Pauses the Digimon's sprite and effect.
Definition at line 224 of file actor.c.
Referenced by STGTRAIN_createActor().
| void STGTRAIN_playActor | ( | TrainActor * | actor | ) |
Plays the training on (mode 4), unpausing the sprite and effect.
Definition at line 236 of file actor.c.
Referenced by STGTRAIN_createActor().
| void STGTRAIN_setActorPos | ( | TrainActor * | actor, |
| s32 | x, | ||
| s32 | y | ||
| ) |
Sets where the Digimon's images go in VRAM.
Definition at line 249 of file actor.c.
Referenced by STGTRAIN_createActor().
| void STGTRAIN_setActorClutPos | ( | TrainActor * | actor, |
| s32 | x, | ||
| s32 | y | ||
| ) |
Sets where the Digimon's CLUTs go in VRAM.
Definition at line 256 of file actor.c.
Referenced by STGTRAIN_createActor().
| void STGTRAIN_setActorChance | ( | TrainActor * | actor, |
| s32 | chance | ||
| ) |
Sets the chance that the training works.
Definition at line 263 of file actor.c.
Referenced by STGTRAIN_createActor().
| void STGTRAIN_growActor | ( | TrainActor * | actor | ) |
Makes the Digimon grow from nothing (mode 2)
Definition at line 268 of file actor.c.
Referenced by STGTRAIN_createActor().
| void STGTRAIN_shrinkActor | ( | TrainActor * | actor | ) |
Makes the Digimon shrink to nothing (mode 2)
< GTE regards 4096 as 1.0
Definition at line 275 of file actor.c.
Referenced by STGTRAIN_createActor().
| void STGTRAIN_setActorScale | ( | TrainActor * | actor, |
| s32 | scale | ||
| ) |
Scales the Digimon (0x1000 is its size)
Definition at line 282 of file actor.c.
Referenced by STGTRAIN_createActor().
| s32 STGTRAIN_getActorResult | ( | TrainActor * | actor | ) |
Whether the training worked, once it is done (mode bit 0), else -1.
Definition at line 288 of file actor.c.
Referenced by STGTRAIN_createActor().
| void STGTRAIN_endActor | ( | TrainActor * | actor | ) |
Plays the training's end (mode 8)
Definition at line 296 of file actor.c.
Referenced by STGTRAIN_createActor().
| TrainActor * STGTRAIN_createActor | ( | s32 | set, |
| s32 | file, | ||
| s32 | layerId, | ||
| s32 | depth | ||
| ) |
Creates an animated sprite of an image set.
Definition at line 302 of file actor.c.
Referenced by STGTRAIN_updateResult().
| void STGTRAIN_createMenuWindows | ( | TrainMenu * | menu, |
| TextWindow ** | win | ||
| ) |
menu.c
menu.c
Definition at line 6 of file menu.c.
Referenced by STGTRAIN_updateMenu().
| void STGTRAIN_showTrainingInfo | ( | TrainMenu * | menu, |
| TextWindow ** | win, | ||
| s32 | show | ||
| ) |
Shows the name and description of the selected training (show) or hides them.
Definition at line 14 of file menu.c.
Referenced by STGTRAIN_pickTraining(), STGTRAIN_runMenu(), and STGTRAIN_showMenuInfo().
| void STGTRAIN_drawMenu | ( | TrainMenu * | menu | ) |
Draws the training menu: its panels, the trainings of the page and the cursor.
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< its sprite bank
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< its sprite bank
Definition at line 30 of file menu.c.
Referenced by STGTRAIN_updateMenu().
| 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 turn the pages when the gym has more than five), and closes with a training picked (cross) or none (triangle).
Definition at line 235 of file menu.c.
Referenced by STGTRAIN_updateMenu().
| 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 trainings it has), with the cursor on the last one.
Definition at line 310 of file menu.c.
Referenced by STGTRAIN_createMenu().
| void STGTRAIN_openMenu | ( | TrainMenu * | menu | ) |
Opens the training menu (its substate 0)
Definition at line 420 of file menu.c.
Referenced by STGTRAIN_createMenu().
| void STGTRAIN_closeMenu | ( | TrainMenu * | menu | ) |
Closes the training menu (its substate 0x32)
Definition at line 426 of file menu.c.
Referenced by STGTRAIN_createMenu().
| void STGTRAIN_showMenuInfo | ( | TrainMenu * | menu | ) |
Shows the selected training's name and description.
Definition at line 432 of file menu.c.
Referenced by STGTRAIN_createMenu().
| TrainMenu * STGTRAIN_createMenu | ( | TrainScreen * | screen | ) |
Creates the training menu.
Definition at line 437 of file menu.c.
Referenced by STGTRAIN_runScreen().
| void STGTRAIN_loadImages | ( | void | ) |
| u8 * STGTRAIN_getFile | ( | void | ) |
| void STGTRAIN_freeFile | ( | void | ) |
| 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 at line 52 of file files.c.
Referenced by STGTRAIN_readSet().
| s32 STGTRAIN_readSetAnims | ( | TrainSetHeader * | header, |
| s32 | set | ||
| ) |
The set's animations.
Definition at line 63 of file files.c.
Referenced by STGTRAIN_readSet().
| s32 STGTRAIN_readSetImages | ( | TrainSetHeader * | header, |
| s32 | set | ||
| ) |
The images of a set: the rest of its offsets.
Definition at line 79 of file files.c.
Referenced by STGTRAIN_readSet().
| TrainSpriteBank * STGTRAIN_getBank | ( | s32 | set | ) |
| TrainEntry * STGTRAIN_getGymTrainings | ( | s32 | index | ) |
| TrainEntry * STGTRAIN_findGymTraining | ( | s32 | index, |
| s32 | id | ||
| ) |
|
extern |
Definition at line 422 of file files.c.
Referenced by STGTRAIN_applyTry(), STGTRAIN_askToTrain(), STGTRAIN_closeIntensities(), STGTRAIN_closeNotice(), STGTRAIN_closePartnerPick(), STGTRAIN_closeQuestion(), STGTRAIN_drawMenu(), STGTRAIN_drawSession(), STGTRAIN_endSession(), STGTRAIN_freeFile(), STGTRAIN_getAnim(), STGTRAIN_getBank(), STGTRAIN_getBankOffset(), STGTRAIN_getBankSize(), STGTRAIN_getFile(), STGTRAIN_getGymTrainings(), STGTRAIN_loadSet(), STGTRAIN_openBattleStats(), STGTRAIN_openParty(), STGTRAIN_openTp(), STGTRAIN_partnerPickClosed(), STGTRAIN_pickTraining(), STGTRAIN_playTraining(), STGTRAIN_playTrainingEnd(), STGTRAIN_readSet(), STGTRAIN_readSetAnims(), STGTRAIN_readSetBank(), STGTRAIN_readSetImages(), STGTRAIN_requestFile(), STGTRAIN_runMenu(), STGTRAIN_runScreen(), STGTRAIN_runSession(), STGTRAIN_runTraining(), STGTRAIN_screenClosed(), STGTRAIN_setUpActor(), STGTRAIN_showGains(), STGTRAIN_showIntensities(), STGTRAIN_showTrainingInfo(), STGTRAIN_showTrainingName(), STGTRAIN_startBonusTry(), STGTRAIN_startClosing(), STGTRAIN_startLeaving(), STGTRAIN_startTraining(), STGTRAIN_updateActor(), STGTRAIN_updateMenu(), and STGTRAIN_updateScreen().
|
extern |
The overlay's data, in its order: the first object's, the second's and the third's.
The overlay's data, in its order: the first object's, the second's and the third's.
Definition at line 692 of file screen.c.
Referenced by STGTRAIN_animatePartner(), and STGTRAIN_drawScreen().
|
extern |
The battle stats a training raises, by [training >= 13][bonusWorked][level].
Definition at line 786 of file result.c.
Referenced by STGTRAIN_raiseStat().
|
extern |
What a training may lower another battle stat by, by level.
Definition at line 793 of file result.c.
Referenced by STGTRAIN_lowerStat().
|
extern |
The resistance gain tables, by the Digimon's affinity and the resistance's value (under 100, under 300, more)
Definition at line 814 of file result.c.
Referenced by STGTRAIN_raiseResistance().
|
extern |
The max HP and MP gains, indexed like the resistances.
Definition at line 821 of file result.c.
Referenced by STGTRAIN_raiseMaxHpMp().
|
extern |
the points each intensity of a training costs
Definition at line 245 of file files.c.
Referenced by STGTRAIN_answerToTrain(), and STGTRAIN_pickIntensity().
|
extern |
The trainings of each gym level, by STGTRAIN_findGymTraining: {id, stat, other}, 0 ends.
Definition at line 249 of file files.c.
Referenced by STGTRAIN_findGymTraining(), and STGTRAIN_getGymTrainings().
|
extern |
the discs number their files differently
Definition at line 394 of file files.c.
Referenced by STGTRAIN_freeFile(), STGTRAIN_getFile(), STGTRAIN_getFileEffectSameDepth(), STGTRAIN_getFileId(), STGTRAIN_getFilePos(), and STGTRAIN_requestFile().
|
extern |
Definition at line 430 of file files.c.
Referenced by STGTRAIN_readSetBank().
|
extern |
Definition at line 431 of file files.c.
Referenced by STGTRAIN_readSetAnims().
|
extern |
Definition at line 432 of file files.c.
Referenced by STGTRAIN_readSetImages().
|
extern |
Definition at line 433 of file files.c.
Referenced by STGTRAIN_readSet().