src/window/screens_party_status.c
The party status window. More…
Included by screens.c.
Macros
| Name | Description | |
|---|---|---|
#define | PARTY_STATUS_COLUMN_WIDTH 6 | The party status window's column for each party member, in tiles. |
#define | PARTY_STATUS_DJINN_WIDTH 5 | the Djinn column, in battle |
#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. |
#define | PARTY_STATUS_BAR_LENGTH 40 | A party member's HP and PP bars: PARTY_STATUS_BAR_LENGTH pixels across five tiles, whose own pixels are drawn in BAR_TILE_COLOR over a shadow of BAR_TILE_SHADOW_COLOR. |
#define | BAR_TILE_COLOR 14 | |
#define | BAR_TILE_SHADOW_COLOR 1 | |
#define | BAR_FILLED_COLOR 8 | The colours the filled part of a bar and the rest of it are drawn in, each over its shadow: on the field, the basic sprite colours copied into HIGHLIGHT_PALETTE. |
#define | BAR_FILLED_SHADOW_COLOR 13 | |
#define | BAR_EMPTY_COLOR 2 | |
#define | BAR_EMPTY_SHADOW_COLOR 12 | |
#define | TILE_ROW_BITS 32 | A 4bpp tile row: eight pixels of four bits, one word. |
Functions
| Name | Description | |
|---|---|---|
void | mnPartyStatusBuildLayoutBounds (Sint32 flags) | Sizes the party status window by the party: a column of six tiles a party member (four at most outside battle), one more row with PARTY_STATUS_SHOW_PP and the Djinn column with PARTY_STATUS_SHOW_DJINN, against the screen's right edge. |
void | mnPartyStatusCreateWindow (Sint32 flags) | Opens the party status window, sized by mnPartyStatusBuildLayoutBounds, and draws it, holding the tilemap upload meanwhile. |
void | mnWindowDrawColumnBorders (WINDOW *window, Uint32 flags) | Draws the vertical lines between the party members' columns of the party status window, with their top and bottom joints, at the offsets listed in WindowPartyColumnOffsets (shifted right past the Djinn column, whose own line comes first in the list). |
UNREAD_RESULT | mnPartyStatusDrawBars (WINDOW *window, Sint32 x, Sint32 y, Sint32 length) | Recolours the five bar tiles at (x, y) in window to show a bar length pixels long (0 to PARTY_STATUS_BAR_LENGTH). |
void | mnPartyStatusDraw (Sint32 flags) | Draws the party status window with flags (see PARTY_STATUS_*): each party member's name, HP and optionally PP with their bars, and in battle the standby Djinn of each element. |
void | mnPartyStatusClose (void) | Closes the party status window and frees its heap block. |
Description
The party status window. Part of screens.c.
Macros in detail
PARTY_STATUS_COLUMN_WIDTH
#define PARTY_STATUS_COLUMN_WIDTH 6
The party status window's column for each party member, in tiles.
Referenced by mnPartyStatusBuildLayoutBounds() and mnPartyStatusDraw().
Definition at line 4 of file screens_party_status.c.
PARTY_STATUS_DJINN_WIDTH
#define PARTY_STATUS_DJINN_WIDTH 5
the Djinn column, in battle
Referenced by mnPartyStatusBuildLayoutBounds(), mnPartyStatusDraw() and mnWindowDrawColumnBorders().
Definition at line 5 of file screens_party_status.c.
TILE_ROW_FROM_BOTTOM
#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.
Referenced by mnPartyStatusDrawBars().
Definition at line 146 of file screens_party_status.c.
PARTY_STATUS_BAR_LENGTH
#define PARTY_STATUS_BAR_LENGTH 40
A party member's HP and PP bars: PARTY_STATUS_BAR_LENGTH pixels across five
tiles, whose own pixels are drawn in BAR_TILE_COLOR over a shadow of
BAR_TILE_SHADOW_COLOR.
Referenced by mnPartyStatusDraw() and mnPartyStatusDrawBars().
Definition at line 152 of file screens_party_status.c.
BAR_TILE_COLOR
#define BAR_TILE_COLOR 14
Referenced by mnPartyStatusDrawBars().
Definition at line 153 of file screens_party_status.c.
BAR_TILE_SHADOW_COLOR
#define BAR_TILE_SHADOW_COLOR 1
Referenced by mnPartyStatusDrawBars().
Definition at line 154 of file screens_party_status.c.
BAR_FILLED_COLOR
#define BAR_FILLED_COLOR 8
The colours the filled part of a bar and the rest of it are drawn in, each
over its shadow: on the field, the basic sprite colours copied into
HIGHLIGHT_PALETTE.
Referenced by mnPartyStatusDrawBars().
Definition at line 158 of file screens_party_status.c.
BAR_FILLED_SHADOW_COLOR
#define BAR_FILLED_SHADOW_COLOR 13
Referenced by mnPartyStatusDrawBars().
Definition at line 159 of file screens_party_status.c.
BAR_EMPTY_COLOR
#define BAR_EMPTY_COLOR 2
Referenced by mnPartyStatusDrawBars().
Definition at line 160 of file screens_party_status.c.
BAR_EMPTY_SHADOW_COLOR
#define BAR_EMPTY_SHADOW_COLOR 12
Referenced by mnPartyStatusDrawBars().
Definition at line 161 of file screens_party_status.c.
TILE_ROW_BITS
#define TILE_ROW_BITS 32
A 4bpp tile row: eight pixels of four bits, one word.
Referenced by mnPartyStatusDrawBars().
Definition at line 163 of file screens_party_status.c.
Functions in detail
mnPartyStatusBuildLayoutBounds
void mnPartyStatusBuildLayoutBounds(Sint32 flags)
Sizes the party status window by the party: a column of six tiles a party
member (four at most outside battle), one more row with PARTY_STATUS_SHOW_PP
and the Djinn column with PARTY_STATUS_SHOW_DJINN, against the screen's right
edge.
References btPartyPrepareMembersStub(), gmPartyCountMembersStub() and Sint32.
Referenced by mnPartyStatusCreateWindow() and mnPartyStatusDraw().
Definition at line 11 of file screens_party_status.c.
mnPartyStatusCreateWindow
void mnPartyStatusCreateWindow(Sint32 flags)
Opens the party status window, sized by mnPartyStatusBuildLayoutBounds, and
draws it, holding the tilemap upload meanwhile.
References mnPartyStatusBuildLayoutBounds(), mnPartyStatusDraw(), mnWindowCreate(), Sint32 and syHeapSlotAllocateEWRAM().
Referenced by mnPartyStatusOpenAndWait().
Definition at line 52 of file screens_party_status.c.
mnWindowDrawColumnBorders
void mnWindowDrawColumnBorders(WINDOW *window, Uint32 flags)
Draws the vertical lines between the party members' columns of the party
status window, with their top and bottom joints, at the offsets listed in
WindowPartyColumnOffsets (shifted right past the Djinn column, whose own line
comes first in the list). In battle it also draws the window's bottom edge.
References Sint32 and WindowPartyColumnOffsets.
Referenced by mnPartyStatusDraw().
Definition at line 76 of file screens_party_status.c.
mnPartyStatusDrawBars
UNREAD_RESULT mnPartyStatusDrawBars(WINDOW *window, Sint32 x, Sint32 y, Sint32 length)
Recolours the five bar tiles at (x, y) in window to show a bar length
pixels long (0 to PARTY_STATUS_BAR_LENGTH).
References Sint32, syDMAXCopy() and syPaletteGetBasicSpriteColors().
Referenced by mnPartyStatusDraw().
Definition at line 167 of file screens_party_status.c.
mnPartyStatusDraw
void mnPartyStatusDraw(Sint32 flags)
Draws the party status window with flags (see PARTY_STATUS_*): each party
member's name, HP and optionally PP with their bars, and in battle the
standby Djinn of each element.
References btDjinnCountStandbyStub(), btPartyPrepareMembersStub(), gmPartyCountMembersStub(), gmUnitGet(), MainRoutineStateWork, mnPartyStatusBuildLayoutBounds(), mnPartyStatusDrawBars(), mnTextDrawPrefixedNumberAtOffset(), mnTextDrawStringAtOffset(), mnTextSetColor(), mnWindowDrawBorder(), mnWindowDrawColumnBorders(), mnWindowEraseBorderRect(), mnWindowSetTilemapEntry(), mnWindowSpriteRedrawSavedRect(), PartyStatusDigitTiles, Sint32 and syDMAXCopy().
Referenced by mnBattleCollectPartyCommands(), mnBattlePartyChooseReserve(), mnBattleStatusScreenRun() and mnPartyStatusCreateWindow().
Definition at line 246 of file screens_party_status.c.
mnPartyStatusClose
void mnPartyStatusClose(void)
Closes the party status window and frees its heap block.
References mnWindowClose() and syHeapSlotRelease().
Referenced by mnPartyStatusCloseWithMenu().
Definition at line 416 of file screens_party_status.c.