src/battle/battle_debug.c
Debug: the unit snapshot, the parameter sets and the battle test menu. More…
Included by battle.c.
Macros
| Name | Description | |
|---|---|---|
#define | DEBUG_PAIRED_SETS_FIRST 70 | From this parameter set on, an even set is loaded together with the odd one after it. |
#define | DEBUG_PARAMETER_SET_LAST_ROW 440 | The last row of DebugParameterSets; the scan reports a missing parameter set past it. |
#define | DEBUG_FIRST_ENCOUNTER 69 | The encounter the debug battle starts with (Moapa and two Knights), and The Broken Seal's Djinn tutorial encounter, here an unused Mars Djinni's battle: rows of formations.c. |
#define | DJINN_TUTORIAL_ENCOUNTER 28 |
Functions
| Name | Description | |
|---|---|---|
void | btDebugBattleRunForever (void) | Unused: runs random encounters one after another, forever. |
void | btScriptedBattleSaveUnits (void) | After the first two parts of Karst and Agatio's battle (FORMATION_KARST_AND_AGATIO_A and _B), snapshots the five units of ScriptedBattleUnits that fought (Felix, Piers and Jenna, and the first two enemies) for btScriptedBattleRestoreUnits to bring back as the next part begins. |
void | btScriptedBattleRestoreUnits (void) | Restores the five units btScriptedBattleSaveUnits snapshotted, each one still in the battle and listed then: the first three's summon boosts, each one's statuses, and the last two's HP and PP. |
void | gmUnitUpdateClassStub (Sint32 owner) | Works out a character's class, Psynergy and base elements again. |
Sint32 | btDebugParamSetLoad (Sint32 set) | Debug: replaces the party with parameter set number set, each member at its level with its Djinn, abilities and equipped items. |
void | btDebugStartNoOperation (void) | Does nothing; the debug battle menu calls it when Start is pressed, as The Broken Seal's calls btDebugSelectNoOperation on Select. |
void | btDebugBattleRunMenu (void) | Debug: the battle test menu, which never returns. |
Description
Debug: the unit snapshot, the parameter sets and the battle test menu. Part
of battle.c.
Macros in detail
DEBUG_PAIRED_SETS_FIRST
#define DEBUG_PAIRED_SETS_FIRST 70
From this parameter set on, an even set is loaded together with the odd one after it.
Referenced by btDebugParamSetLoad().
Definition at line 131 of file battle_debug.c.
DEBUG_PARAMETER_SET_LAST_ROW
#define DEBUG_PARAMETER_SET_LAST_ROW 440
The last row of DebugParameterSets; the scan reports a missing parameter set
past it.
Referenced by btDebugParamSetLoad().
Definition at line 135 of file battle_debug.c.
DEBUG_FIRST_ENCOUNTER
#define DEBUG_FIRST_ENCOUNTER 69
The encounter the debug battle starts with (Moapa and two Knights), and The
Broken Seal's Djinn tutorial encounter, here an unused Mars Djinni's battle:
rows of formations.c.
Referenced by btDebugBattleRunMenu().
Definition at line 265 of file battle_debug.c.
DJINN_TUTORIAL_ENCOUNTER
#define DJINN_TUTORIAL_ENCOUNTER 28
Referenced by btDebugBattleRunMenu().
Definition at line 266 of file battle_debug.c.
Functions in detail
btDebugBattleRunForever
void btDebugBattleRunForever(void)
Unused: runs random encounters one after another, forever.
References btRun().
Definition at line 5 of file battle_debug.c.
btScriptedBattleSaveUnits
void btScriptedBattleSaveUnits(void)
After the first two parts of Karst and Agatio's battle
(FORMATION_KARST_AND_AGATIO_A and _B), snapshots the five units of
ScriptedBattleUnits that fought (Felix, Piers and Jenna, and the first two
enemies) for btScriptedBattleRestoreUnits to bring back as the next part
begins.
References btUnitIsListed(), gmUnitGet(), ScriptedBattleUnits and Sint32.
Referenced by btRun().
Definition at line 16 of file battle_debug.c.
btScriptedBattleRestoreUnits
void btScriptedBattleRestoreUnits(void)
Restores the five units btScriptedBattleSaveUnits snapshotted, each one still
in the battle and listed then: the first three's summon boosts, each one's
statuses, and the last two's HP and PP.
References btUnitIsListed(), gmUnitGet(), gmUnitSetHpStub(), gmUnitSetPpStub(), ScriptedBattleUnits and Sint32.
Referenced by btRun().
Definition at line 74 of file battle_debug.c.
gmUnitUpdateClassStub
void gmUnitUpdateClassStub(Sint32 owner)
Works out a character's class, Psynergy and base elements again.
Referenced by btDebugParamSetLoad() and mnStatusPanelDraw().
Definition at line 127 of file battle_debug.c.
btDebugParamSetLoad
Sint32 btDebugParamSetLoad(Sint32 set)
Debug: replaces the party with parameter set number set, each member at its level with its Djinn, abilities and equipped items. Returns 1 when the table ends before that set.
References DebugParameterSets, gmDjinnGetRecoveryTableStub(), gmDjinnGiveStub(), gmDjinnSetStub(), gmInventoryAddItemStub(), gmInventoryEquipStub(), gmInventoryRemoveStub(), gmPartyAddMemberStub(), gmPartyRemoveMemberStub(), gmUnitGet(), gmUnitLearnPsynergyStub(), gmUnitLevelUpToStub(), gmUnitUpdateClassStub() and Sint32.
Referenced by btDebugBattleRunMenu() and scLinkLobbyChooseDebugParamSet().
Definition at line 140 of file battle_debug.c.
btDebugStartNoOperation
void btDebugStartNoOperation(void)
Does nothing; the debug battle menu calls it when Start is pressed, as The
Broken Seal's calls btDebugSelectNoOperation on Select.
Referenced by btDebugBattleRunMenu().
Definition at line 258 of file battle_debug.c.
btDebugBattleRunMenu
void btDebugBattleRunMenu(void)
Debug: the battle test menu, which never returns. It fights the first encounter again and again with auto battle on, unless Down is held at the start to open the chooser of encounter and parameter set.
References btDebugParamSetLoad(), btDebugStartNoOperation(), btRun(), DebugTextEnabled, gmMainRoutineStateInitDefaultsStub(), gmUnitCalculateStub(), MainRoutineStateWork, PerWork, Sint32, syGameFlagClear(), syGameFlagSet(), syHeapInit(), syInitEvent(), syPrintClear(), sySynch(), syVRAMCacheReset() and syWindowLoadGraphics().
Definition at line 271 of file battle_debug.c.