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.
Structures
StatusCursor
struct StatusCursor
The status screen's cursor: its place in each group, the help entry it shows and where it points.
| Field | Declared as | |
|---|---|---|
groupPositions | s8 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. |
helpEntry | s32 helpEntry | The help shown: MsgOwnerStatusEntryHelp + entry for 0 to 13, the help of condition icon entry - 14 from 14 on. It decides the group. |
drawnHelpEntry | s32 drawnHelpEntry | the help drawn last; a change redraws the help |
group | s32 group | STATUS_CURSOR_ group |
groupSize | s32 groupSize | how many stops the group has |
column | s32 column | tiles |
row | s32 row | tiles |
Used by Ui_RunOwnerStatusScreen.
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.
STATUS_CURSOR_COMBAT_STATS
#define STATUS_CURSOR_COMBAT_STATS 1
Attack, Defense, Agility and Luck (gOwnerStatus_EquipmentCursors).
Used by Ui_RunOwnerStatusScreen.
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.