Alchemy

status.c

The status screen.

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

The status screen. Part of battle_command.c, the menu object, compiled only through it.

Functions

Ui_RunOwnerStatusScreen

s32 Ui_RunOwnerStatusScreen(u16 *list, s32 listCount, s32 owner)

Runs the status screen for party member owner until B is pressed or the link battle's time runs out: the member's level, experience, HP and PP, class, stats, Djinn, elements and conditions, with a help line for the item under the cursor. With listCount nonzero, L and R step through the members of list (0xff ends it, 0xfe is an empty place). The link timer's window is closed while it is open (BattleMenuWork.timerHidden), and the party status window is redrawn on the way out. Returns 0. Battle_CollectPartyCommands opens it from the Status command and from L or R in a member's command row.

Used by Battle_CollectPartyCommands.

Line 55

Structures

StatusCursor

struct StatusCursor

The status screen's cursor: its place in each group, the help entry it shows and where it points.

FieldDeclared as
groupPositionss8 groupPositions[5]The cursor's place in each group. [3] is written when Left, Right or A in group 1 makes it group 3 for a frame; [4] is cleared at the start and never read.
helpEntrys32 helpEntryThe help shown: MsgOwnerStatusEntryHelp + entry for 0 to 13, the help of condition icon entry - 14 from 14 on. It decides the group.
drawnHelpEntrys32 drawnHelpEntrythe help drawn last; a change redraws the help
groups32 groupSTATUS_CURSOR_ group
groupSizes32 groupSizehow many stops the group has
columns32 columntiles
rows32 rowtiles

Used by Ui_RunOwnerStatusScreen.

Line 31

Macros

STATUS_CURSOR_GENERAL

#define STATUS_CURSOR_GENERAL 0

The name, experience, HP, PP, class, Djinn and element rows (gOwnerStatus_StatCursors).

Used by Ui_RunOwnerStatusScreen.

Line 24

STATUS_CURSOR_COMBAT_STATS

#define STATUS_CURSOR_COMBAT_STATS 1

Attack, Defense, Agility and Luck (gOwnerStatus_EquipmentCursors).

Used by Ui_RunOwnerStatusScreen.

Line 26

Also, macros without a comment: OWNER_STATUS_TEXT_MAX, OWNER_STATUS_VALUE_X, OWNER_STATUS_TEXT_MAX, OWNER_STATUS_VALUE_X, OWNER_STATUS_LABEL, OWNER_STATUS_LABEL, STATUS_CURSOR_CONDITIONS.

On this page