src/window/screens_party_status.c
The party status window. More…
Included by screens.c.
Macros
| Name | Description | |
|---|---|---|
#define | PARTY_STATUS_PUT_DIGIT (window, glyph, x, y) | |
#define | PARTY_STATUS_COLUMN_WIDTH 6 | The party status window's columns, in tiles: one for each party member, and the Djinn column on their left (PARTY_STAT_FLAG, battle_status.h). |
#define | PARTY_STATUS_DJINN_WIDTH 5 | |
#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 | An HP or PP bar at full, in pixels: five tiles. |
#define | BAR_TILE_COLOR 14 | The colours of the bar tiles that the bar recolours: its body and its shadow. |
#define | BAR_TILE_SHADOW_COLOR 1 | |
#define | BAR_FILLED_COLOR 8 | The colours they become, in HIGHLIGHT_PALETTE: the filled part of the bar and its shadow, and the empty part and its shadow. |
#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) | 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 | mnPartyStatusCreateWindow (Sint32 flags) | Opens the party status window with flags (see PARTY_STATUS_*) in a new heap block, HEAP_SLOT_PARTY_STATUS, which mnPartyStatusClose frees, and draws it; the tilemap upload is held back (holdTilemapUpload) while it is drawn. |
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. |
void | mnWindowSetInteriorPaletteBit (const WINDOW *window, Sint32 x, Sint32 y, Sint32 width, Sint32 height, Uint32 set) | Unused: sets (set 1) or clears (0) the lowest bit of the palette number of the tilemap entries of the width x height tile rectangle at (x, y) inside window, clipped to the screen, so switching the rectangle between two palettes, such as WINDOW_PALETTE and HIGHLIGHT_PALETTE. |
Description
The party status window. Part of screens.c.
Macros in detail
PARTY_STATUS_PUT_DIGIT
#define PARTY_STATUS_PUT_DIGIT(window, glyph, x, y)
Referenced by mnPartyStatusDraw().
Definition at lines 7 and 10 of file screens_party_status.c.
PARTY_STATUS_COLUMN_WIDTH
#define PARTY_STATUS_COLUMN_WIDTH 6
The party status window's columns, in tiles: one for each party member, and
the Djinn column on their left (PARTY_STAT_FLAG, battle_status.h).
Referenced by mnPartyStatusBuildLayoutBounds() and mnPartyStatusDraw().
Definition at line 16 of file screens_party_status.c.
PARTY_STATUS_DJINN_WIDTH
#define PARTY_STATUS_DJINN_WIDTH 5
Referenced by mnPartyStatusBuildLayoutBounds(), mnPartyStatusDraw() and mnWindowDrawColumnBorders().
Definition at line 17 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 21 of file screens_party_status.c.
PARTY_STATUS_BAR_LENGTH
#define PARTY_STATUS_BAR_LENGTH 40
An HP or PP bar at full, in pixels: five tiles.
Referenced by mnPartyStatusDraw() and mnPartyStatusDrawBars().
Definition at line 142 of file screens_party_status.c.
BAR_TILE_COLOR
#define BAR_TILE_COLOR 14
The colours of the bar tiles that the bar recolours: its body and its shadow.
Referenced by mnPartyStatusDrawBars().
Definition at line 144 of file screens_party_status.c.
BAR_TILE_SHADOW_COLOR
#define BAR_TILE_SHADOW_COLOR 1
Referenced by mnPartyStatusDrawBars().
Definition at line 145 of file screens_party_status.c.
BAR_FILLED_COLOR
#define BAR_FILLED_COLOR 8
The colours they become, in HIGHLIGHT_PALETTE: the filled part of the bar and
its shadow, and the empty part and its shadow.
Referenced by mnPartyStatusDrawBars().
Definition at line 148 of file screens_party_status.c.
BAR_FILLED_SHADOW_COLOR
#define BAR_FILLED_SHADOW_COLOR 13
Referenced by mnPartyStatusDrawBars().
Definition at line 149 of file screens_party_status.c.
BAR_EMPTY_COLOR
#define BAR_EMPTY_COLOR 2
Referenced by mnPartyStatusDrawBars().
Definition at line 150 of file screens_party_status.c.
BAR_EMPTY_SHADOW_COLOR
#define BAR_EMPTY_SHADOW_COLOR 12
Referenced by mnPartyStatusDrawBars().
Definition at line 151 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 153 of file screens_party_status.c.
Functions in detail
mnPartyStatusBuildLayoutBounds
void mnPartyStatusBuildLayoutBounds(Sint32 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.
References btPartyPrepareMembersStub(), gmPartyCountMembersStub(), Sint32, state and width.
Referenced by mnPartyStatusCreateWindow() and mnPartyStatusDraw().
Definition at line 27 of file screens_party_status.c.
mnPartyStatusCreateWindow
void mnPartyStatusCreateWindow(Sint32 flags)
Opens the party status window with flags (see PARTY_STATUS_*) in a new heap
block, HEAP_SLOT_PARTY_STATUS, which mnPartyStatusClose frees, and draws it;
the tilemap upload is held back (holdTilemapUpload) while it is drawn.
References mnPartyStatusBuildLayoutBounds(), mnPartyStatusDraw(), mnWindowCreate(), Sint32 and syHeapSlotAllocateEWRAM().
Referenced by mnPartyStatusOpenAndWait().
Definition at line 67 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).
References Sint32, state and WindowPartyColumnOffsets.
Referenced by mnPartyStatusDraw().
Definition at line 88 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 colour, pixels, Sint32, state, syDMAXCopy() and syPaletteGetBasicSpriteColors().
Referenced by mnPartyStatusDraw().
Definition at line 157 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(), gmUnitGetStub(), MainRoutineStateWork, mnPartyStatusBuildLayoutBounds(), mnPartyStatusDrawBars(), mnTextDrawPrefixedNumberAtOffset(), mnTextDrawStringAtOffset(), mnTextSetColor(), mnWindowDrawBorder(), mnWindowDrawColumnBorders(), mnWindowEraseBorderRect(), mnWindowSetTilemapEntry(), mnWindowSpriteRedrawSavedRect(), Sint32 and state.
Referenced by mnBattleStatusScreenRun() and mnPartyStatusCreateWindow().
Definition at line 236 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 392 of file screens_party_status.c.
mnWindowSetInteriorPaletteBit
void mnWindowSetInteriorPaletteBit(const WINDOW *window, Sint32 x, Sint32 y, Sint32 width, Sint32 height, Uint32 set)
Unused: sets (set 1) or clears (0) the lowest bit of the palette number of
the tilemap entries of the width x height tile rectangle at (x, y) inside
window, clipped to the screen, so switching the rectangle between two
palettes, such as WINDOW_PALETTE and HIGHLIGHT_PALETTE.
References Sint32, state and width.
Definition at line 402 of file screens_party_status.c.