|
Digimon World 3 decomp
The European version, SLES_039.36
|
The training's run and its result (STGTRAIN_runTraining), and an idle task that nothing creates: STGTRAIN.PRO's second object (see sprite.c), whose rodata starts at 0x8008251C (USA) More...
#include "menus/gym.h"Go to the source code of this file.
Functions | |
| s32 | STGTRAIN_raiseStat (TrainResult *result, s32 stat) |
| Raises a battle stat (1-5) by the training's gain, up to 999. | |
| 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. | |
| static s16 | getStat (PartnerTotals *totals, s32 stat) |
| A battle stat (1-5) or a resistance (8-14) of TOTALS: the match depends on reading them through these (indexed in place, the stat's address is summed with the index first) | |
| static s16 | getResistance (PartnerTotals *totals, s32 stat) |
| static void | STGTRAIN_takeTry (TrainResult *result, TrainResultWindows *win) |
| Takes the result of a try: plays its sound and applies it, then plays the next try, or, after the last, asks for the bonus try (three good tries) or ends the training (substate 3) | |
| static void | STGTRAIN_showGains (TrainResult *result, TrainResultWindows *win) |
| Once cross is pressed, shows what the training gave: the stat's gain, and the other stat's loss or gain, in the message, and the stats before and after. | |
| static void | STGTRAIN_askBonusTry (TrainResult *result, TrainResultWindows *win) |
| Moves the cursor between yes and no of the bonus try's question, and takes the answer (triangle: no) | |
| static void | STGTRAIN_startBonusTry (TrainResult *result, TrainResultWindows *win) |
| Once the question's panels close: yes makes the bonus try with its sound (a sure fail when the training is the partner's last bonus one, else a 50% chance), no plays the other tries. | |
| static void | STGTRAIN_takeBonusTry (TrainResult *result, TrainResultWindows *win) |
| Takes the result of the bonus try: a good one makes the training the partner's last bonus one and the gains take their better columns. | |
| 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. | |
Variables | |
| 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_resistGainsLow [] |
| The resistance gains, by [bonusWorked ? (training < 13 ? 1 : 2) : 0][level]. | |
| TrainGain | STGTRAIN_resistGainsMid [] |
| TrainGain | STGTRAIN_resistGainsHigh [] |
| 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. | |
The training's run and its result (STGTRAIN_runTraining), and an idle task that nothing creates: STGTRAIN.PRO's second object (see sprite.c), whose rodata starts at 0x8008251C (USA)
Definition in file result.c.
| s32 STGTRAIN_raiseStat | ( | TrainResult * | result, |
| s32 | stat | ||
| ) |
Raises a battle stat (1-5) by the training's gain, up to 999.
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().
|
inlinestatic |
A battle stat (1-5) or a resistance (8-14) of TOTALS: the match depends on reading them through these (indexed in place, the stat's address is summed with the index first)
Definition at line 332 of file result.c.
Referenced by STGTRAIN_showGains().
|
inlinestatic |
Definition at line 336 of file result.c.
Referenced by STGTRAIN_showGains().
|
inlinestatic |
Takes the result of a try: plays its sound and applies it, then plays the next try, or, after the last, asks for the bonus try (three good tries) or ends the training (substate 3)
Definition at line 344 of file result.c.
Referenced by STGTRAIN_runTraining().
|
inlinestatic |
Once cross is pressed, shows what the training gave: the stat's gain, and the other stat's loss or gain, in the message, and the stats before and after.
< SYSTEM07
Definition at line 376 of file result.c.
Referenced by STGTRAIN_runTraining().
|
inlinestatic |
Moves the cursor between yes and no of the bonus try's question, and takes the answer (triangle: no)
< SYSTEM02: a cursor moves
< SYSTEM00: a choice is taken
< SYSTEM01
Definition at line 495 of file result.c.
Referenced by STGTRAIN_runTraining().
|
inlinestatic |
Once the question's panels close: yes makes the bonus try with its sound (a sure fail when the training is the partner's last bonus one, else a 50% chance), no plays the other tries.
Definition at line 526 of file result.c.
Referenced by STGTRAIN_runTraining().
|
inlinestatic |
Takes the result of the bonus try: a good one makes the training the partner's last bonus one and the gains take their better columns.
Definition at line 552 of file result.c.
Referenced by STGTRAIN_runTraining().
| 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 | ) |
| TrainGain STGTRAIN_statGains[] |
The battle stats a training raises, by [training >= 13][bonusWorked][level].
Definition at line 786 of file result.c.
Referenced by STGTRAIN_raiseStat().
| TrainGain STGTRAIN_statLosses[] |
What a training may lower another battle stat by, by level.
Definition at line 793 of file result.c.
Referenced by STGTRAIN_lowerStat().
| TrainGain STGTRAIN_resistGainsLow[] |
| TrainGain STGTRAIN_resistGainsMid[] |
| TrainGain STGTRAIN_resistGainsHigh[] |
| TrainGain* STGTRAIN_resistGainTables[] |
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().
| TrainGain STGTRAIN_maxHpMpGains[] |
The max HP and MP gains, indexed like the resistances.
Definition at line 821 of file result.c.
Referenced by STGTRAIN_raiseMaxHpMp().