Alchemy
Loading...
Searching...
No Matches

BattleMenuWork Struct Reference

The battle command menus' work, heap slot 57 (0x104 bytes), reached as gLinkCountdownWork. More...

#include <menu_list.h>

Data Fields

struct MenuSprite icons [3]
 The sprites UpdateLinkSessionCountdown draws each frame: the chosen command's icon, the chosen ability's icon and the member's portrait.
u8 iconShown [3]
 whether each of icons is drawn
u8 unk27
s32 targetSceneOffset
 Where the battle scene slides to (Camera_ConfigureScene's vertical offset): -2 or 16 by the target menu's mode, 0 otherwise.
s32 sceneOffset
 where the slide has reached; a third of the way a frame
s32 row
 the list row chosen last
s32 page
 the list page chosen last
s32 preferredRow
 the row to return to
s32 commandSelection [2]
 The command row's choice: [0] for the party's row (fight, flee, status), [1] for a member's commands.
s32 timerWindow
 The window that shows the link battle's seconds left, a struct UiWindow pointer kept as a word (as a pointer, two of the round's first stores swap), or 0.
s32 timerHidden
 Set while the status screen is open, so the timer opens no window.
s32 timer
 Frames left to choose commands in a link battle; -1 outside link battles.
s32 linkTimer
 1 while the link battle's timer runs
u8 standbyDjinn [8][4]
 The party's standby Djinn by element before each command: what the summons chosen by the earlier commands leave.
u8 listSlots [34]
 the Psynergy list's action slots, ended by 0
u16 listAbilities [33]
 the Psynergy list's ability ids, ended by 0
s32 tutorialStep
 The Djinn tutorial's step: 0 off, 1 from the start of each round while FLAG_DJINN_TUTORIAL is set, then one more for each hint shown.
s32 tutorialDelay
 frames until the tutorial's next key press
s32 commandActor
 The member whose commands are being chosen; -1 between members.
u32 chosenDjinn [8]
 The Djinni each command has chosen, element << 8 | index, or 0x80000000.

Detailed Description

The battle command menus' work, heap slot 57 (0x104 bytes), reached as gLinkCountdownWork.

Battle_CollectPartyCommands allocates it each round; it holds the icons beside the command window, the camera slide, the cursor each list remembers, the link battle's timer, the Djinn tutorial's key presses and what each command has spent.

Definition at line 107 of file menu_list.h.

Field Documentation

◆ icons

struct MenuSprite BattleMenuWork::icons[3]

The sprites UpdateLinkSessionCountdown draws each frame: the chosen command's icon, the chosen ability's icon and the member's portrait.

Definition at line 110 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), and UpdateLinkSessionCountdown().

◆ iconShown

u8 BattleMenuWork::iconShown[3]

whether each of icons is drawn

Definition at line 111 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), and UpdateLinkSessionCountdown().

◆ unk27

u8 BattleMenuWork::unk27

Definition at line 112 of file menu_list.h.

◆ targetSceneOffset

s32 BattleMenuWork::targetSceneOffset

Where the battle scene slides to (Camera_ConfigureScene's vertical offset): -2 or 16 by the target menu's mode, 0 otherwise.

Definition at line 115 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), BattleTarget_RunSelection(), and UpdateLinkSessionCountdown().

◆ sceneOffset

s32 BattleMenuWork::sceneOffset

where the slide has reached; a third of the way a frame

Definition at line 116 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), and UpdateLinkSessionCountdown().

◆ row

s32 BattleMenuWork::row

the list row chosen last

Definition at line 117 of file menu_list.h.

Referenced by Battle_SelectAbility().

◆ page

s32 BattleMenuWork::page

the list page chosen last

Definition at line 118 of file menu_list.h.

Referenced by Battle_SelectAbility().

◆ preferredRow

s32 BattleMenuWork::preferredRow

the row to return to

Definition at line 119 of file menu_list.h.

Referenced by Battle_SelectAbility().

◆ commandSelection

s32 BattleMenuWork::commandSelection[2]

The command row's choice: [0] for the party's row (fight, flee, status), [1] for a member's commands.

Definition at line 122 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), and Menu_RunCommandRow().

◆ timerWindow

s32 BattleMenuWork::timerWindow

The window that shows the link battle's seconds left, a struct UiWindow pointer kept as a word (as a pointer, two of the round's first stores swap), or 0.

Definition at line 126 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), Ui_RunOwnerStatusScreen(), and UpdateLinkSessionCountdown().

◆ timerHidden

s32 BattleMenuWork::timerHidden

Set while the status screen is open, so the timer opens no window.

Definition at line 128 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), Ui_RunOwnerStatusScreen(), and UpdateLinkSessionCountdown().

◆ timer

s32 BattleMenuWork::timer

Frames left to choose commands in a link battle; -1 outside link battles.

At 0 a menu ends as if cancelled, or takes the first command.

Definition at line 131 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), Battle_SelectAbility(), BattleMenu_RunActionSelection(), BattleTarget_RunSelection(), ItemList_SelectEntry(), Menu_RunCommandRow(), SummonMenu_SelectSummon(), Ui_RunOwnerStatusScreen(), UiText_ShowLocalizedMessageAndWait(), and UpdateLinkSessionCountdown().

◆ linkTimer

s32 BattleMenuWork::linkTimer

1 while the link battle's timer runs

Definition at line 132 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), and UpdateLinkSessionCountdown().

◆ standbyDjinn

u8 BattleMenuWork::standbyDjinn[8][4]

The party's standby Djinn by element before each command: what the summons chosen by the earlier commands leave.

Definition at line 135 of file menu_list.h.

Referenced by Battle_CollectPartyCommands().

◆ listSlots

u8 BattleMenuWork::listSlots[34]

the Psynergy list's action slots, ended by 0

Definition at line 136 of file menu_list.h.

Referenced by Battle_CollectPartyCommands().

◆ listAbilities

u16 BattleMenuWork::listAbilities[33]

the Psynergy list's ability ids, ended by 0

Definition at line 137 of file menu_list.h.

Referenced by Battle_CollectPartyCommands().

◆ tutorialStep

s32 BattleMenuWork::tutorialStep

The Djinn tutorial's step: 0 off, 1 from the start of each round while FLAG_DJINN_TUTORIAL is set, then one more for each hint shown.

While it is not 0 the menus press keys for the player.

Definition at line 141 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), Battle_SelectAbility(), BattleTarget_RunSelection(), Menu_RunCommandRow(), and SummonMenu_SelectSummon().

◆ tutorialDelay

s32 BattleMenuWork::tutorialDelay

frames until the tutorial's next key press

Definition at line 142 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), Battle_SelectAbility(), BattleTarget_RunSelection(), Menu_RunCommandRow(), and SummonMenu_SelectSummon().

◆ commandActor

s32 BattleMenuWork::commandActor

The member whose commands are being chosen; -1 between members.

Definition at line 144 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), and Menu_RunCommandRow().

◆ chosenDjinn

u32 BattleMenuWork::chosenDjinn[8]

The Djinni each command has chosen, element << 8 | index, or 0x80000000.

Definition at line 146 of file menu_list.h.

Referenced by Battle_CollectPartyCommands(), and Battle_SelectAbility().