Alchemy

djinn_menu.c

The battle Djinn menu.

games/tbs/src/window/battle_command/djinn_menu.c on GitHub

The battle Djinn menu. Part of battle_command.c, the menu object, compiled only through it.

Functions

Battle_SelectAbility

s32 Battle_SelectAbility(s32 owner, s32 unused)

The battle Djinn menu for unit owner: its Djinn in element and number order, five to a page, set ones plain, standby ones in colour 2 and recovering ones in colour 4 with their turns, the one under the cursor described above the list with its change preview beside it (DjinnMenu_ShowChangePreview; holding R shows the Psynergy pages, Left and Right turn them). Returns the chosen Djinni's entry (element << 8 | number, with DJINN_ENTRY_STANDBY when on standby), or -1 when cancelled, when the link battle's time runs out, or when the member has no Djinn. A recovering Djinni, or one an earlier command this round chose (BattleMenuWork.chosenDjinn), is refused. Battle_CollectPartyCommands runs it for the Djinn command; the Djinn tutorial presses A every 60 frames.

Used by Battle_CollectPartyCommands.

Line 39

Macros

CURSOR_OWNER

#define CURSOR_OWNER (*(struct PartyStatusWindow **)gPartyStatusWork)

The party status window's layout, whose Djinn column the menu blinks.

Used by Battle_SelectAbility.

Line 18

DJINN_ENTRY_RECOVERY_MASK

#define DJINN_ENTRY_RECOVERY_MASK 0x3e0000

bits 21..17: turns until a recovering Djinni is back; 0 when ready.

Used by Battle_SelectAbility.

Line 24

Also, macros without a comment: TURNS_DIGITS, TURNS_X, TURNS_DIGITS, TURNS_X, DJINN_ENTRY_STANDBY, DJINN_ENTRY_RECOVERY_SHIFT, DJINN_ENTRY_END.

On this page