The party status window. More...
Go to the source code of this file.
Macros | |
| #define | PARTY_STATUS_PUT_DIGIT(window, glyph, x, y) |
| #define | PARTY_STATUS_SHOW_PP 1 |
| add the PP row | |
| #define | PARTY_STATUS_SHOW_DJINN 2 |
| add the Djinn column (needs the PP row) | |
| #define | PARTY_STATUS_CLOSED 9 |
| erase the window | |
| #define | PARTY_STATUS_KEEP_FLAGS -1 |
| redraw with the flags it has | |
| #define | PARTY_STATUS_COLUMN_WIDTH 6 |
| #define | PARTY_STATUS_DJINN_WIDTH 5 |
| #define | PARTY_STATUS_BLOCK 16 |
| The heap block the party status window's layout lives in. | |
| #define | TILE_ROW_FROM_BOTTOM(tile, up) |
| The address of pixel row 7 - up of BG tile tile (4bpp, 32 bytes a tile, 4 bytes a row): the status bars are drawn from a tile's bottom row up. | |
Functions | |
| void | UiWindow_BuildLayoutBounds (s32 flags) |
| Works out where the party status window goes for flags: one column per party member (those in battle when a battle is on), plus the Djinn column, right-aligned on the 30-tile screen row at the top. | |
| void | UiWindow_CreateWithLayoutBounds (s32 flags) |
| Opens the party status window with flags (see PARTY_STATUS_*) in a new heap block and draws it. | |
| void | UiWindow_DrawColumnBorders (struct UiWindow *window, u32 flags) |
| Draws the vertical lines between the members' columns of the party status window, with their top and bottom joints, at the offsets listed in gUiWindow_PartyColumnOffsets (shifted right past the Djinn column, whose own line comes first in the list). | |
| s32 | UiWindow_DrawStatusBarTiles (struct UiWindow *window, s32 x, s32 y, s32 length) |
| void | PartyStatusDraw (s32 flags) |
| Draws the party status window with flags (see PARTY_STATUS_*): each member's name, HP and optionally PP with their bars, and in battle the standby Djinn of each element. | |
| void | PartyStatus_Close (void) |
| Closes the party status window and frees its heap block. | |
| void | UiWindow_SetTileAttributeBitRect (const struct UiWindow *window, s32 x, s32 y, s32 width, s32 height, u32 set) |
| Sets (set 1) or clears (0) bit 12 of the tilemap entries of the width x height tile rectangle at (x, y) inside window, clipped to the screen: bit 12 is the lowest bit of the entry's palette number, so this switches the rectangle between two palettes. | |
The party status window.
Part of battle_command.c, the menu object, compiled only through it.
Definition in file party_status.c.
| #define PARTY_STATUS_PUT_DIGIT | ( | window, | |
| glyph, | |||
| x, | |||
| y ) |
Definition at line 14 of file party_status.c.
Referenced by PartyStatusDraw().
| #define PARTY_STATUS_SHOW_PP 1 |
add the PP row
Definition at line 22 of file party_status.c.
Referenced by PartyStatusDraw(), UiWindow_BuildLayoutBounds(), and UiWindow_DrawColumnBorders().
| #define PARTY_STATUS_SHOW_DJINN 2 |
add the Djinn column (needs the PP row)
Definition at line 23 of file party_status.c.
Referenced by PartyStatusDraw(), UiWindow_BuildLayoutBounds(), and UiWindow_DrawColumnBorders().
| #define PARTY_STATUS_CLOSED 9 |
| #define PARTY_STATUS_KEEP_FLAGS -1 |
redraw with the flags it has
Definition at line 25 of file party_status.c.
Referenced by PartyStatusDraw().
| #define PARTY_STATUS_COLUMN_WIDTH 6 |
Definition at line 26 of file party_status.c.
Referenced by PartyStatusDraw(), and UiWindow_BuildLayoutBounds().
| #define PARTY_STATUS_DJINN_WIDTH 5 |
Definition at line 27 of file party_status.c.
Referenced by PartyStatusDraw(), UiWindow_BuildLayoutBounds(), and UiWindow_DrawColumnBorders().
| #define PARTY_STATUS_BLOCK 16 |
The heap block the party status window's layout lives in.
Definition at line 30 of file party_status.c.
Referenced by PartyStatus_Close(), PartyStatusDraw(), UiWindow_BuildLayoutBounds(), and UiWindow_CreateWithLayoutBounds().
| #define TILE_ROW_FROM_BOTTOM | ( | tile, | |
| up ) |
The address of pixel row 7 - up of BG tile tile (4bpp, 32 bytes a tile, 4 bytes a row): the status bars are drawn from a tile's bottom row up.
Definition at line 34 of file party_status.c.
Referenced by UiWindow_DrawStatusBarTiles().
| void UiWindow_BuildLayoutBounds | ( | s32 | flags | ) |
Works out where the party status window goes for flags: one column per party member (those in battle when a battle is on), plus the Djinn column, right-aligned on the 30-tile screen row at the top.
It is four tiles high outside battle and three in battle, plus one with the PP row.
Definition at line 41 of file party_status.c.
Referenced by PartyStatusDraw(), UiWindow_BuildLayoutBounds(), and UiWindow_CreateWithLayoutBounds().
| void UiWindow_CreateWithLayoutBounds | ( | s32 | flags | ) |
Opens the party status window with flags (see PARTY_STATUS_*) in a new heap block and draws it.
The UI is held busy while it is drawn.
Definition at line 85 of file party_status.c.
Referenced by UiWindow_CreateWithLayoutBounds(), and UiWindow_OpenMode1AndWaitFrame().
Draws the vertical lines between the members' columns of the party status window, with their top and bottom joints, at the offsets listed in gUiWindow_PartyColumnOffsets (shifted right past the Djinn column, whose own line comes first in the list).
In battle it also draws the window's bottom edge.
Definition at line 106 of file party_status.c.
Referenced by PartyStatusDraw(), and UiWindow_DrawColumnBorders().
Definition at line 165 of file party_status.c.
Referenced by PartyStatusDraw(), and UiWindow_DrawStatusBarTiles().
| void PartyStatusDraw | ( | s32 | flags | ) |
Draws the party status window with flags (see PARTY_STATUS_*): each member's name, HP and optionally PP with their bars, and in battle the standby Djinn of each element.
The HP is drawn in text colour 2 at zero and colour 4 at a quarter or less. When the flags change, the window is erased and laid out again first.
Definition at line 233 of file party_status.c.
Referenced by PartyStatusDraw(), Ui_RunOwnerStatusScreen(), and UiWindow_CreateWithLayoutBounds().
| void PartyStatus_Close | ( | void | ) |
Closes the party status window and frees its heap block.
Definition at line 378 of file party_status.c.
Referenced by PartyStatus_Close(), and UiWork_CloseAndRelease().
| void UiWindow_SetTileAttributeBitRect | ( | const struct UiWindow * | window, |
| s32 | x, | ||
| s32 | y, | ||
| s32 | width, | ||
| s32 | height, | ||
| u32 | set ) |
Sets (set 1) or clears (0) bit 12 of the tilemap entries of the width x height tile rectangle at (x, y) inside window, clipped to the screen: bit 12 is the lowest bit of the entry's palette number, so this switches the rectangle between two palettes.
The clip uses 29 for the bottom edge test and 20 for the clipped height.
Definition at line 394 of file party_status.c.
Referenced by UiWindow_SetTileAttributeBitRect().