src/window/screens_battle_status.c
The Status screen of a battle: a party member's stats and conditions, Psynergy, Djinn and items, on four pages that A turns. More…
Included by screens.c.
Macros
| Name | Description | |
|---|---|---|
#define | SUMMARY_ITEM_HELP_CAPACITY WHEN(LONG_STATUS_ITEM_HELP, 52, 32) | Room for the help line of an item and of a Djinni, as measured: the item line grows from German on, the Djinni line from French on. |
#define | SUMMARY_DJINN_HELP_CAPACITY WHEN(LONG_STATUS_DJINN_HELP, 52, 32) | |
#define | SUMMARY_HELP_CAPACITY 32 | Room for a help line no edition lengthens: no items, an item that cannot be used, no Djinn, a Djinni ready to summon. |
#define | SUMMARY_HELP_TEXT_LENGTH JAPANESE_OR(64, 128) | Japanese text is shorter: its help lines and Psynergy descriptions take smaller buffers, and its stat numbers sit one tile further left. |
#define | SUMMARY_STAT_VALUE_X JAPANESE_OR(176, 184) | |
#define | STATUS_ICON_COUNT 11 | The condition icons the Status screen shows at most: Normal, or each condition the unit has, in a row. |
#define | OWNER_STATUS_LABEL (row) | The message of label row (enum above), counted back from MsgExp. |
#define | STATUS_CURSOR_GENERAL 0 | The Status screen's cursor groups, each with its table of cursor stops. |
#define | STATUS_CURSOR_COMBAT_STATS 1 | Attack, Defense, Agility and Luck (OwnerStatusEquipmentCursors). |
#define | STATUS_CURSOR_CONDITIONS 2 | The status icons. |
#define | STATUS_CURSOR_PSYNERGY 3 | The Psynergy page's rows. |
#define | STATUS_CURSOR_DJINN 4 | The Djinn page's grid. |
#define | STATUS_CURSOR_ITEMS 5 | The items page's rows. |
#define | STATUS_STAT_STOPS 9 | The general group's stops (OwnerStatusStatCursors): nine for a member with Djinn, then the seven of one without. |
#define | STATUS_STAT_STOPS_WITHOUT_DJINN 7 | |
#define | STATUS_REDRAW_PAGE 1 | What a pass of mnBattleStatusScreenRun redraws: the whole page, for a new page or party member, or the lists and help line, when the cursor moves to another entry. |
#define | STATUS_REDRAW_LIST 2 | |
#define | PARTY_FRONT_ROW_SIZE 4 | The party members who fight: the first four of the battle's party list. |
#define | STATUS_CONDITIONS_LISTED 8 | The conditions the Status screen looks for stop once it shows eight. |
#define | STATUS_CURSOR_FLIP 8 | The cursor's affine index field, of a sprite with no affine transform: its bit 3 flips the hand horizontally, as on the stats page. |
#define | SUMMARY_DRAW_PAGE_MARKS (window, count, rowBase) | The four list-page scroll marks, one tile per page of four rows (Psynergy and items). |
Enumerations
| Name | Description | |
|---|---|---|
enum | BATTLE_SUMMARY_LABEL { OWNER_STATUS_LABEL_ATTACK, OWNER_STATUS_LABEL_DEFENSE, OWNER … } | The Status screen's labels, in their message order up to MsgExp (OWNER_STATUS_LABEL). |
enum | BATTLE_SUMMARY_PAGE { STATUS_PAGE_STATS, STATUS_PAGE_PSYNERGY, STATUS_PAGE_DJINN, … } | The Status screen's pages, which A turns. |
Functions
| Name | Description | |
|---|---|---|
void | btObjectSpawnObjectsForListStub (Uint16 *unitIds, Sint32 refreshPoses, Sint32 releaseOthers) | Spawns the battle objects of a list of units. |
Sint32 | gmUnitGetExperienceForLevelStub (Sint32 member, Sint32 level) | Returns the experience party member memberId needs for level. |
Sint32 | mnBattleStatusScreenRun (Uint16 *list, Sint32 listCount, Sint32 member) | Runs the Status screen for party member member until B is pressed or the link battle's time runs out: the party member's level, experience, HP and PP, class, stats, Djinn, elements and statuses, with a help line for the item under the cursor. |
Description
The Status screen of a battle: a party member's stats and conditions,
Psynergy, Djinn and items, on four pages that A turns. Part of screens.c.
Macros in detail
SUMMARY_ITEM_HELP_CAPACITY
#define SUMMARY_ITEM_HELP_CAPACITY WHEN(LONG_STATUS_ITEM_HELP, 52, 32)
Room for the help line of an item and of a Djinni, as measured: the item line grows from German on, the Djinni line from French on.
Referenced by mnBattleStatusScreenRun().
Definition at line 8 of file screens_battle_status.c.
SUMMARY_DJINN_HELP_CAPACITY
#define SUMMARY_DJINN_HELP_CAPACITY WHEN(LONG_STATUS_DJINN_HELP, 52, 32)
Referenced by mnBattleStatusScreenRun().
Definition at line 9 of file screens_battle_status.c.
SUMMARY_HELP_CAPACITY
#define SUMMARY_HELP_CAPACITY 32
Room for a help line no edition lengthens: no items, an item that cannot be used, no Djinn, a Djinni ready to summon.
Referenced by mnBattleStatusScreenRun().
Definition at line 12 of file screens_battle_status.c.
SUMMARY_HELP_TEXT_LENGTH
#define SUMMARY_HELP_TEXT_LENGTH JAPANESE_OR(64, 128)
Japanese text is shorter: its help lines and Psynergy descriptions take
smaller buffers, and its stat numbers sit one tile further left. It decodes
the item, Psynergy and Djinn lines raw where the other languages copy them
expanded (BATTLE_MENU_MESSAGE_COPY); the lines that take a number are copied
expanded in every language.
Referenced by mnBattleStatusScreenRun().
Definition at line 19 of file screens_battle_status.c.
SUMMARY_STAT_VALUE_X
#define SUMMARY_STAT_VALUE_X JAPANESE_OR(176, 184)
Referenced by mnBattleStatusScreenRun().
Definition at line 20 of file screens_battle_status.c.
STATUS_ICON_COUNT
#define STATUS_ICON_COUNT 11
The condition icons the Status screen shows at most: Normal, or each condition the unit has, in a row.
Referenced by mnBattleStatusScreenRun().
Definition at line 24 of file screens_battle_status.c.
OWNER_STATUS_LABEL
#define OWNER_STATUS_LABEL(row)
The message of label row (enum above), counted back from MsgExp.
Referenced by mnBattleStatusScreenRun().
Definition at line 44 of file screens_battle_status.c.
STATUS_CURSOR_GENERAL
#define STATUS_CURSOR_GENERAL 0
The Status screen's cursor groups, each with its table of cursor stops. The
name, experience, HP, PP, class, Djinn and element rows
(OwnerStatusStatCursors).
Referenced by mnBattleStatusScreenRun().
Definition at line 60 of file screens_battle_status.c.
STATUS_CURSOR_COMBAT_STATS
#define STATUS_CURSOR_COMBAT_STATS 1
Attack, Defense, Agility and Luck (OwnerStatusEquipmentCursors).
Referenced by mnBattleStatusScreenRun().
Definition at line 62 of file screens_battle_status.c.
STATUS_CURSOR_CONDITIONS
#define STATUS_CURSOR_CONDITIONS 2
The status icons.
Referenced by mnBattleStatusScreenRun().
Definition at line 64 of file screens_battle_status.c.
STATUS_CURSOR_PSYNERGY
#define STATUS_CURSOR_PSYNERGY 3
The Psynergy page's rows.
Referenced by mnBattleStatusScreenRun().
Definition at line 66 of file screens_battle_status.c.
STATUS_CURSOR_DJINN
#define STATUS_CURSOR_DJINN 4
The Djinn page's grid.
Referenced by mnBattleStatusScreenRun().
Definition at line 68 of file screens_battle_status.c.
STATUS_CURSOR_ITEMS
#define STATUS_CURSOR_ITEMS 5
The items page's rows.
Referenced by mnBattleStatusScreenRun().
Definition at line 70 of file screens_battle_status.c.
STATUS_STAT_STOPS
#define STATUS_STAT_STOPS 9
The general group's stops (OwnerStatusStatCursors): nine for a member with
Djinn, then the seven of one without.
Referenced by mnBattleStatusScreenRun().
Definition at line 74 of file screens_battle_status.c.
STATUS_STAT_STOPS_WITHOUT_DJINN
#define STATUS_STAT_STOPS_WITHOUT_DJINN 7
Referenced by mnBattleStatusScreenRun().
Definition at line 75 of file screens_battle_status.c.
STATUS_REDRAW_PAGE
#define STATUS_REDRAW_PAGE 1
What a pass of mnBattleStatusScreenRun redraws: the whole page, for a new
page or party member, or the lists and help line, when the cursor moves to
another entry. Both redraw the same.
Referenced by mnBattleStatusScreenRun().
Definition at line 80 of file screens_battle_status.c.
STATUS_REDRAW_LIST
#define STATUS_REDRAW_LIST 2
Referenced by mnBattleStatusScreenRun().
Definition at line 81 of file screens_battle_status.c.
PARTY_FRONT_ROW_SIZE
#define PARTY_FRONT_ROW_SIZE 4
The party members who fight: the first four of the battle's party list. The Status screen marks the others "In the back".
Referenced by mnBattleStatusScreenRun().
Definition at line 85 of file screens_battle_status.c.
STATUS_CONDITIONS_LISTED
#define STATUS_CONDITIONS_LISTED 8
The conditions the Status screen looks for stop once it shows eight.
Referenced by mnBattleStatusScreenRun().
Definition at line 88 of file screens_battle_status.c.
STATUS_CURSOR_FLIP
#define STATUS_CURSOR_FLIP 8
The cursor's affine index field, of a sprite with no affine transform: its bit 3 flips the hand horizontally, as on the stats page.
Referenced by mnBattleStatusScreenRun().
Definition at line 92 of file screens_battle_status.c.
SUMMARY_DRAW_PAGE_MARKS
#define SUMMARY_DRAW_PAGE_MARKS(window, count, rowBase)
The four list-page scroll marks, one tile per page of four rows (Psynergy and items).
Referenced by mnBattleStatusScreenRun().
Definition at line 100 of file screens_battle_status.c.
Enumerations in detail
BATTLE_SUMMARY_LABEL
enum BATTLE_SUMMARY_LABEL
The Status screen's labels, in their message order up to MsgExp
(OWNER_STATUS_LABEL).
| Enumerator | Value | Description |
|---|---|---|
OWNER_STATUS_LABEL_ATTACK | 0 | |
OWNER_STATUS_LABEL_DEFENSE | 1 | |
OWNER_STATUS_LABEL_AGILITY | 2 | |
OWNER_STATUS_LABEL_LUCK | 3 | |
OWNER_STATUS_LABEL_ATTRIBUTES | 4 | "Attrib.", which nothing draws |
OWNER_STATUS_LABEL_ELEMENT_LEVEL | 5 | "Lv" |
OWNER_STATUS_LABEL_POWER | 6 | |
OWNER_STATUS_LABEL_RESIST | 7 | |
OWNER_STATUS_LABEL_CLASS | 8 | "Class", which nothing draws |
OWNER_STATUS_LABEL_DJINN | 9 | |
OWNER_STATUS_LABEL_EXP | 10 | MsgExp |
Definition at line 28 of file screens_battle_status.c.
BATTLE_SUMMARY_PAGE
enum BATTLE_SUMMARY_PAGE
The Status screen's pages, which A turns.
| Enumerator | Value | Description |
|---|---|---|
STATUS_PAGE_STATS | 0 | |
STATUS_PAGE_PSYNERGY | 1 | |
STATUS_PAGE_DJINN | 2 | |
STATUS_PAGE_ITEMS | 3 | |
STATUS_PAGE_COUNT | 4 |
Definition at line 48 of file screens_battle_status.c.
Functions in detail
mnBattleStatusScreenRun
Sint32 mnBattleStatusScreenRun(Uint16 *list, Sint32 listCount, Sint32 member)
Runs the Status screen for party member member until B is pressed or the
link battle's time runs out: the party member's level, experience, HP and PP,
class, stats, Djinn, elements and statuses, with a help line for the item
under the cursor. With listCount nonzero, L and R step through the party
members of list (BATTLE_UNIT_LIST_END ends it, BATTLE_UNIT_REMOVED is an
empty place). The link timer's window is closed while it is open
(BATTLE_MENU_STATE.timerHidden), and the party status window is redrawn on
the way out. Returns 0. mnBattleCollectPartyCommands opens it from the Status
command and from L or R in a party member's command row.
References btActorSpawnObjectsForListStub(), btObjectDestroySpritesStub(), btObjectGetStub(), btObjectPutStub(), btObjectSpawnObjectsForListStub(), gmAbilityGetDefinitionStub(), gmDjinnGetRecoveryTableStub(), gmItemGetDefinitionStub(), gmPartySumDjinnCountsStub(), gmUnitCalculateStub(), gmUnitGet(), gmUnitGetElementLevelStub(), gmUnitGetExperienceForLevelStub(), mnAbilityIconLoadIntoSlot(), mnBattleStatusDrawPageArrows(), mnItemCheckBattleUse(), mnItemIconLoadIntoSlot(), mnMessageArgumentClearAll(), mnMessageArgumentPush(), mnMessageCopyExpanded(), mnMiscellaneousIconLoadIntoSlot(), mnPartyStatusDraw(), mnPortraitLoad(), mnRangeIconDraw(), mnTextDrawMessageAsTiles(), mnTextDrawNumberAtOffset(), mnTextDrawNumberInWindow(), mnTextDrawStringAtOffset(), mnTextDrawWideStringAtOffset(), mnTextFillCanvasBackground(), mnTextSetColor(), mnWindowClose(), mnWindowCreate(), mnWindowDrawDividerLine(), mnWindowHighlightRect(), mnWindowMapTextCanvasTiles(), mnWindowMarkVisibleTextTiles(), mnWindowSetTilemapEntry(), mnWindowSpriteRedrawSavedRect(), MsgClassName, OwnerStatusConditionCursors, OwnerStatusEquipmentCursors, OwnerStatusHpString, OwnerStatusKpString, OwnerStatusLevelString, OwnerStatusNivString, OwnerStatusNvString, OwnerStatusPpString, OwnerStatusPvString, OwnerStatusSlashString and 16 more.
Referenced by mnBattleCollectPartyCommands().
Definition at line 135 of file screens_battle_status.c.