|
Digimon World 3 decomp
The European version, SLES_039.36
|
FIGHTSTG.PRO: the battle. More...
#include "battle/battle_mode/types.h"#include "battle/battle_mode/model.h"#include "battle/battle_mode/stage.h"#include "battle/battle_mode/camera.h"#include "battle/battle_mode/effect.h"#include "battle/battle_mode/battle.h"#include "battle/battle_mode/action.h"#include "battle/battle_mode/menu.h"#include "battle/battle_mode/task.h"Go to the source code of this file.
Macros | |
| #define | OVL_NAME(name) FIGHTSTG_##name |
| The name of this overlay's copy of a function of src/shared/. | |
| #define | FILE_WFIGHTMN 0x208 |
| The sub-overlays (FIGHTSTG_updateRoot) and their entry points. | |
| #define | FILE_WFIGHTTS 0x209 |
Functions | |
| Task * | WFIGHTMN_start (void) |
| WFIGHTMN's entry point: creates the battle menu, and zeroes FIGHTSTG_battle's state and BATTLE_RESULT. | |
| Task * | WFIGHTTS_start (void) |
| WFIGHTTS's entry point: creates the battle test, though with 0 bytes for its fields and for its children. | |
| BattleScript * | WFIGHTMN_startTech (u8 actor, s32 id) |
| WFIGHTMN's functions FIGHTSTG calls. | |
| void | WFIGHTMN_checkEquip (s32 fighter) |
| Queues a recovery (FIGHTSTG_queueRecovery) for party member MEMBER's partner when it has WFIGHTMN_RECOVERY_ITEM in one of its last two equipment slots. | |
| void | WFIGHTMN_chargeGauge (u8 side, s32 damage) |
| Adds what damage gives to the current partner's gauge (BATTLE_SETUP.gauges), up to 1000. | |
| s32 | WFIGHTMN_setIdleMotion (u8 id, s32 damage) |
| Sets the idle motion of side id >> 4's fighter: 1 (weak) if damage leaves it with a quarter of its HP or less; returns whether it did. | |
| void | WFIGHTMN_countHit (u8 side, s32 damage) |
| In BATTLE_KIND_FINAL_LAST, the partner's third hit that does damage weakens the enemy (FIGHTSTG's FIGHTSTG_weakenEnemy) | |
| void | WFIGHTMN_endWeakness (u8 side) |
| In BATTLE_KIND_FINAL_LAST, anything the partner does but an attack ends the enemy's weakness (FIGHTSTG's FIGHTSTG_endEnemyWeakness) | |
| s32 | WFIGHTMN_limitDamage (u8 side, s32 damage, s32 hits) |
| In BATTLE_KIND_ESCAPE and BATTLE_KIND_UNK2, cuts the damage that the partner's hits do so that the enemy keeps at least an eleventh of its HP; in BATTLE_KIND_NO_DAMAGE the partner does none. | |
FIGHTSTG.PRO: the battle.
It loads WFIGHTMN (file 0x1FA) for a normal battle, or WFIGHTTS (file 0x1FB) for the battle test, at STAGE_VRAM. Its declarations are in include/battle/battle_mode/, by module; this header includes them all.
The Japanese version's battle (FIGHTSTG, WFIGHTMN) is the European one wherever that differs from the USA one (the counterattack, the revival, the camera, the battle menu's fixes), but for the files it loads, which it numbers as the USA disc does: what the comments here say of the European version holds for the Japanese one too.
Definition in file battle_mode.h.
| #define OVL_NAME | ( | name | ) | FIGHTSTG_##name |
The name of this overlay's copy of a function of src/shared/.
Definition at line 26 of file battle_mode.h.
| #define FILE_WFIGHTMN 0x208 |
The sub-overlays (FIGHTSTG_updateRoot) and their entry points.
Definition at line 33 of file battle_mode.h.
| #define FILE_WFIGHTTS 0x209 |
Definition at line 34 of file battle_mode.h.
| Task * WFIGHTMN_start | ( | void | ) |
WFIGHTMN's entry point: creates the battle menu, and zeroes FIGHTSTG_battle's state and BATTLE_RESULT.
< WFIGHTMN's battle menu
Definition at line 1455 of file menu.c.
Referenced by FIGHTSTG_updateRoot().
| Task * WFIGHTTS_start | ( | void | ) |
WFIGHTTS's entry point: creates the battle test, though with 0 bytes for its fields and for its children.
Definition at line 393 of file battle_test.c.
Referenced by FIGHTSTG_updateRoot().
| BattleScript * WFIGHTMN_startTech | ( | u8 | actor, |
| s32 | id | ||
| ) |
WFIGHTMN's functions FIGHTSTG calls.
WFIGHTMN's functions FIGHTSTG calls.
< two magic hits, as techniques 0x1B9 and 0x1BA
< in BATTLE_KIND_UNK2: takes 70 percent of the partner's HP, ends as BATTLE_FLED
< in BATTLE_KIND_UNK2: takes 70 percent of the partner's HP, ends as BATTLE_FLED
< FIGHTSTG_rollHit and FIGHTSTG_computeDamage
< FIGHTSTG_rollMagicHit and FIGHTSTG_computeMagicDamage
Definition at line 150 of file techs.c.
Referenced by FIGHTSTG_updateEnemyAttack(), FIGHTSTG_updateFirstTech(), FIGHTSTG_updateOneHpTurn(), startTechScript(), and WFIGHTMN_recover().
| void WFIGHTMN_checkEquip | ( | s32 | fighter | ) |
Queues a recovery (FIGHTSTG_queueRecovery) for party member MEMBER's partner when it has WFIGHTMN_RECOVERY_ITEM in one of its last two equipment slots.
Definition at line 81 of file setup.c.
Referenced by FIGHTSTG_reviveFighter(), restoreSide(), reviveParty(), reviveSide(), and WFIGHTMN_checkParty().
Adds what damage gives to the current partner's gauge (BATTLE_SETUP.gauges), up to 1000.
Definition at line 35 of file techs.c.
Referenced by FIGHTSTG_updateCounterattack(), FIGHTSTG_updateEnemyAttack(), FIGHTSTG_updateFirstTech(), FIGHTSTG_updateTechAction(), and showOtherAttackResult().
Sets the idle motion of side id >> 4's fighter: 1 (weak) if damage leaves it with a quarter of its HP or less; returns whether it did.
< WFIGHTMN's battle menu
< its third enemy; winning plays the ending
Definition at line 280 of file techs.c.
Referenced by FIGHTSTG_updateEnemyAttack(), FIGHTSTG_updateEnemyTurn(), playCounterTech(), setItemScript(), setTechIdleMotions(), setUpDrain(), setUpItemTech(), WFIGHTMN_countHit(), WFIGHTMN_digidevolve(), WFIGHTMN_endBlast(), WFIGHTMN_knockOut(), WFIGHTMN_recover(), WFIGHTMN_tag(), and WFIGHTMN_takeDamage().
In BATTLE_KIND_FINAL_LAST, the partner's third hit that does damage weakens the enemy (FIGHTSTG's FIGHTSTG_weakenEnemy)
< its third enemy; winning plays the ending
Definition at line 301 of file techs.c.
Referenced by FIGHTSTG_runItemScript(), playCounterTech(), and setTechIdleMotions().
| void WFIGHTMN_endWeakness | ( | u8 | side | ) |
In BATTLE_KIND_FINAL_LAST, anything the partner does but an attack ends the enemy's weakness (FIGHTSTG's FIGHTSTG_endEnemyWeakness)
< its third enemy; winning plays the ending
Definition at line 312 of file techs.c.
Referenced by FIGHTSTG_runItemScript(), setTechIdleMotions(), startTechScript(), and WFIGHTMN_runCommand().
In BATTLE_KIND_ESCAPE and BATTLE_KIND_UNK2, cuts the damage that the partner's hits do so that the enemy keeps at least an eleventh of its HP; in BATTLE_KIND_NO_DAMAGE the partner does none.
< the enemy runs away under a tenth of its HP
< the enemy keeps an eleventh of its HP
< the partner's hits do no damage
Definition at line 321 of file techs.c.
Referenced by FIGHTSTG_startAction(), FIGHTSTG_updateCounterattack(), and setUpItemTech().