Skip to Content
The Alchemy Project

struct BATTLE_MENU_STATE

The battle menus' state (HEAP_SLOT_BATTLE_MENU): what the command row and the lists remember between them while the party's commands are chosen.

Declared in menu_list.h.

Fields

NameDescription
MENU_SPRicons [3]The sprites mnBattleMenuUpdateEachTick draws each tick: the chosen command's icon, the chosen ability's icon and the party member's portrait.
Uint8iconShown [3]Whether each of icons is drawn.
Uint8paddingUp to the word targetViewOffset starts on.
Sint32targetViewOffsetWhere the battle view slides to (btCameraSetCommandView's vertical offset): -2 or 16 by the target menu's mode, 0 otherwise.
Sint32viewOffsetWhere the slide has reached; a third of the way a tick.
Sint32rowThe list row chosen last.
Sint32pageThe list page chosen last.
Sint32preferredRowThe row to return to.
Sint32commandSelection [2]The command row's choice: [0] for the party's row (fight, flee, status), [1] for a party member's commands.
struct WINDOW *timerWindowThe window that shows the link battle's seconds left, or NULL.
Sint32timerHiddenSet while the status screen is open, so the timer opens no window.
Sint32timerTicks left to choose commands in a link battle; -1 outside link battles.
Sint32linkTimer1 while the link battle's timer runs.
Uint8standbyDjinn [8][4]The party's standby Djinn by element before each command: what the summons chosen by the earlier commands leave.
Uint8listSlots [34]The Psynergy list's action slots, ended by 0.
Uint16listAbilities [33]The Psynergy list's ability ids, ended by 0.
Sint32tutorialStepThe Djinn tutorial's step: 0 off, 1 from the start of each turn while FLAG_DJINN_LESSON is set, then one more for each hint shown.
Sint32tutorialDelayTicks until the tutorial's next key press.
Sint32commandActorThe party member whose commands are being chosen; -1 between members.
Uint32chosenDjinn [8]The Djinni each command has chosen, element << 8 | index, or BATTLE_MENU_NO_DJINNI.
Sint32swappedUnitThe unit a reserve swap replaced, -1 for none.
Sint32swappedPlaceIts party place.
Sint32lastTargetThe target mnBattleTargetRunSelection chose last, where it starts again.

Description

The battle menus' state (HEAP_SLOT_BATTLE_MENU): what the command row and the lists remember between them while the party's commands are chosen.

struct BATTLE_MENU_STATE

Referenced by mnBattleCollectPartyCommands(), mnBattleCommandRowRun(), mnBattleDjinnMenuRun(), mnBattleItemMenuRun(), mnBattleMenuUpdateEachTick(), mnBattlePartyChooseReserve(), mnBattlePsynergyMenuRun(), mnBattleStatusScreenRun() and mnBattleSummonMenuRun().

Definition at line 71 of file menu_list.h.

Fields in detail

icons

MENU_SPR icons[3]

The sprites mnBattleMenuUpdateEachTick draws each tick: the chosen command's icon, the chosen ability's icon and the party member's portrait.

iconShown

Uint8 iconShown[3]

Whether each of icons is drawn.

padding

Uint8 padding

Up to the word targetViewOffset starts on.

targetViewOffset

Sint32 targetViewOffset

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

viewOffset

Sint32 viewOffset

Where the slide has reached; a third of the way a tick.

row

Sint32 row

The list row chosen last.

page

Sint32 page

The list page chosen last.

preferredRow

Sint32 preferredRow

The row to return to.

commandSelection

Sint32 commandSelection[2]

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

timerWindow

struct WINDOW *timerWindow

The window that shows the link battle's seconds left, or NULL.

timerHidden

Sint32 timerHidden

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

timer

Sint32 timer

Ticks 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.

linkTimer

Sint32 linkTimer

1 while the link battle's timer runs.

standbyDjinn

Uint8 standbyDjinn[8][4]

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

listSlots

Uint8 listSlots[34]

The Psynergy list's action slots, ended by 0.

listAbilities

Uint16 listAbilities[33]

The Psynergy list's ability ids, ended by 0.

tutorialStep

Sint32 tutorialStep

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

tutorialDelay

Sint32 tutorialDelay

Ticks until the tutorial's next key press.

commandActor

Sint32 commandActor

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

chosenDjinn

Uint32 chosenDjinn[8]

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

swappedUnit

Sint32 swappedUnit

The unit a reserve swap replaced, -1 for none.

swappedPlace

Sint32 swappedPlace

Its party place.

lastTarget

Sint32 lastTarget

The target mnBattleTargetRunSelection chose last, where it starts again.