src/menu/menu_status.c
The party member chooser and the Status menu: its party member row, status page, Psynergy page and equipment page. More…
Included by menu.c.
Macros
| Name | Description | |
|---|---|---|
#define | MEMBER_CHOOSER_MEMBER_COUNT WHEN(EIGHT_PARTY_FIGURES_RESET, 8, 4) | The party figures the chooser lowers before it raises the chosen one's: eight outside Japan and four in the Japanese edition, as the Status menu's STATUS_MEMBER_FIGURE_COUNT. |
#define | STATUS_SAVED_TILE_BYTES WHEN(STATUS_MENU_EXTRA_TEXT_TILES, 8192, 2048) | The window tiles the Status menu saves and restores, more where it draws its text into extra tiles. |
#define | STATUS_SAVED_PALETTE_BYTES (2 * PALETTE_COLORS * 2) | Background palettes 0 and 1, which the Status menu fills with the element icons' colours: two palettes of PALETTE_COLORS two-byte colours. |
#define | STATUS_PAGE_NO_CLEAR (1 << 8) | A bit over the page mode: draw without clearing the window first, as for a window just opened. |
#define | STATUS_PAGE_MODE_MASK (STATUS_PAGE_NO_CLEAR - 1) | |
#define | STATUS_HELP_TEXT_MAX JAPANESE_OR(64, 128) | The longest status help text, in characters. |
#define | STATUS_STAT_DIGITS JAPANESE_OR(4, 3) | The stat column of the status page's top rows: three digits from 200 or four from 192, both ending at pixel 224. |
#define | STATUS_STAT_X JAPANESE_OR(192, 200) | |
#define | STATUS_EQUIP_PAGE_SIZE JAPANESE_OR(6, 5) | Items to a page of the equipment page's list. |
#define | STATUS_PSYNERGY_CURSOR_X JAPANESE_OR(58, 55) | The hand cursor on the Psynergy page. |
#define | STATUS_PSYNERGY_CURSOR_Y JAPANESE_OR(52, 60) | |
#define | STATUS_EQUIP_SLOT_X JAPANESE_OR(2, 1) | The highlight over the equipment window's four slot rows. |
#define | STATUS_EQUIP_SLOT_WIDTH JAPANESE_OR(9, 12) | |
#define | STATUS_ITEM_PAGE_ICONS_X JAPANESE_OR(123, 119) | The equipment page's item list: its page icons, the item names, and the Attack and Defense figures. |
#define | STATUS_ITEM_NAME_X JAPANESE_OR(136, 128) | |
#define | STATUS_ITEM_STAT_X JAPANESE_OR(72, 80) | |
#define | STATUS_ITEM_EMPTY_MESSAGE_X GERMAN_OR(112, 120) | The x of "You have no items." in the equipment page's list, in pixels. |
#define | STATUS_EQUIP_WINDOW_WIDTH JAPANESE_OR(13, 15) | The equipment window, and the equipped items' names in it. |
#define | STATUS_EQUIPPED_NAME_X JAPANESE_OR(16, 8) | |
#define | STATUS_FIGURE_X (index) (130 + (index) * 32) | The Djinn figures stand in a row 32 pixels apart, at y STATUS_FIGURE_ROW_Y, over the status page's Djinn counts. |
#define | STATUS_FIGURE_ROW_Y 128 | |
#define | STATUS_FIGURE_FULL_PAGE_ROW_Y 104 | |
#define | STATUS_FIGURE_ABOVE_SCREEN_Y -16 | |
#define | DJINN_LIST_COLUMN_WIDTH 56 | The Djinn list (mnStatusScreenShowDjinnList): a column for each element, its Djinni figure standing over it. |
#define | DJINN_LIST_FIGURE_X (element) (32 + (element) * DJINN_LIST_COLUMN_WIDTH) | |
#define | DJINN_LIST_FIGURE_Y 70 | |
#define | ELEMENT_ICON_FIRST_TILE 1 | The window tile of the first element icon, Venus's; the four elements follow it in order. |
#define | STATUS_ELEMENT_TILE (BG_TILE_PALETTE(1) | ELEMENT_ICON_FIRST_TILE) | |
#define | SWITCH_HELP_Y -24 | The switch help's two lines, drawn above the status window's interior. |
#define | STATUS_AILMENT_Y (row) ((row) * 16 + 40) | The status page's ailments, one a row of 16 pixels from y 40. |
#define | EQUIP_ROW_NAME_TILE_ROW (row) ((row) * 2 + 1) | |
#define | DJINN_LIST_DJINN_PER_ELEMENT 7 | Each element's column of the Djinn list holds its seven Djinn. |
#define | STATUS_ELEMENT_COLUMN (element) ((element) * 4 + 15) | The status page's four element columns, 4 tiles apart from tile 15, where each element's icon stands; its figures end left of it. |
#define | STATUS_ELEMENT_X (element) (STATUS_ELEMENT_COLUMN(element) * 8) | |
#define | STAT_LABEL (n) | Stat label n of "Attack", "Defense", "Agility" and "Luck" (MsgStatLabel + n), counted back from "Exp" (MsgExpLabel), which the status page also shows. |
#define | EQUIPPED_ROW_Y (row) ((row) * 16) | The equipment slots' rows (EQUIP_ROW_) in mnItemMenuDrawEquipment's window, 16 pixels apart. |
#define | EQUIPPED_ICON_X 216 | |
#define | EQUIPPED_ICON_Y (row) (EQUIPPED_ROW_Y(row) + 32) | |
#define | ENTRY_ICON_CELL_SIZE 16 | The side of a cell of the grids mnPlaceEntryIconInGrid places icons in. |
Typedefs
| Name | Description | |
|---|---|---|
typedef Uint64 | EXPERIENCE_DIFFERENCE ; |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { STATUS_PAGE_SUMMARY, STATUS_PAGE_FULL } | The page modes of mnStatusScreenDrawStatusPage and mnStatusScreenDrawTopRows, in the mode's low byte: the party row's summary, or the full status page, with the elemental levels, Power and Resist. |
enum | anonymous enum { STATUS_SIDE_STATUSES, STATUS_SIDE_STATS, STATUS_SIDE_COUNT } | The two sides of the status page: the statuses on the left, the stats on the right. |
enum | anonymous enum { STATUS_ROW_NAME, STATUS_ROW_EXPERIENCE, STATUS_ROW_HP, STATU … } | The rows of the status page's right side, in the order of their help (MsgProgressHelp): the first four beside the top rows, the others under the element icons. |
enum | anonymous enum { PSYNERGY_USABLE_IN_BATTLE, PSYNERGY_USABLE_IN_FIELD, PSYNERG … } | Where a Psynergy can be used, as the Psynergy page tells it outside Japan. |
enum | anonymous enum { EQUIP_ROW_WEAPON, EQUIP_ROW_HEAD, EQUIP_ROW_SHIELD, EQUIP_RO … } | The equipment window's four slots, from the top, under the game's labels "Weapon", "Head", "Shield" and "Chest"; each slot's item name is on the tile row below its label. |
enum | STAT_SCREEN_STEP { STATUS_STEP_MEMBER, STATUS_STEP_STATUS, STATUS_STEP_PSYNERGY … } | The steps of the Status menu (mnStatusScreenRunPages). |
enum | anonymous enum { RANGE_ICON_PAIRS, RANGE_ICON_PAIR_WORDS } | The Psynergy range icons' tiles: two sets of RANGE_ICON_PAIRS tile pairs, a pair RANGE_ICON_PAIR_WORDS of tile data, a word to a 4bpp tile row. |
Functions
| Name | Description | |
|---|---|---|
static __inline__ void | mnStatusScreenLoadIconPalettes (void) | The highlight palette, and the first sprite palette into background palettes 0 and 1 for the element icons drawn as window tiles: palette 0, for the highlighted row, takes HIGHLIGHT_PALETTE's WINDOW_BACKGROUND_COLOR as its TEXT_BACKGROUND_COLOR, palette 1 WINDOW_PALETTE's (mnStatusScreenShowPsynergyRow). |
Sint32 | mnPartyMemberChooserOpen (void) | Lets the player choose one party member, over the field (the Colosso scenes use it, through stubs.s, and so does the debug test). |
Sint32 | mnPartyMemberChooserRun (void) | The party member chooser's loop. |
Sint32 | mnStatusScreenRun (void) | The Status screen, the field menu's Status (mnFieldMenuRun, FIELD_MENU_STATUS), over the field: saves the first two background palettes and the window tiles it draws over, sets up the party row and, when the party has Djinn, the four Djinn sprites, runs the status pages, then puts everything back. |
Sint32 | mnStatusScreenRunPages (void) | The Status menu's pages: choose a party member, then their status page, A for their Psynergy page and A again for their equipment page, whose A goes back round to the status page; B on any page goes back to the party member row. |
Sint32 | mnStatusScreenSelectMember (Sint32 slot) | Lets the player choose a party member in slot, from the one chosen last: the party member chooser on STATUS_SCREEN_PAGE_CHOOSER, else the Status menu's party row. |
Sint32 | mnStatusScreenShowDjinnList (void) | Shows every Djinn the party has found, a column of seven for each element, until A, B or Select, then puts the screen back. |
static __inline__ void | mnStatusScreenSetSelectedMemberRow (STATUS_SCREEN_STATE *menu, Sint32 selectedMember) | Lowers the party figures, then raises the currently selected party member. |
Sint32 | mnStatusScreenRunPartyRow (void) | The Status menu's party row: Left and Right choose a party member, showing their status; L and R move the party member one place along the party order; Select lists the Djinn found (once the first is caught, FLAG_DJINN_FIRST); A chooses the party member and B backs out. |
Sint32 | mnPartyMemberChooserChooseMember (void) | The party member chooser (STATUS_SCREEN_PAGE_CHOOSER): Left and Right choose a party member, showing their status and Psynergy icons; A chooses and B backs out. |
Bool | mnStatusScreenMovePartyMember (Sint32 selectedIndex, Sint32 direction) | Moves the party member at selectedIndex one place later (direction 1) or earlier (0) in the party order. |
void | mnStatusScreenInit (Sint32 x, Sint32 y, Sint32 mode, Sint32 columns) | Sets up the Status menu's first screen: the cursor window with the party's figures, no other windows yet, and an 8 by 2 cursor grid. x, y, mode and columns are not used. |
void | mnStatusScreenShowMemberStatus (Sint32 member, Sint32 page) | Shows member's status in the status window (0, 5, 30 by 15), opening it first with the party member's portrait (kept as the state's statusCursor), the 32 entry icons (the chooser's Psynergy icons) on the chooser page, and the eight status icon sprites; then draws the stats and statuses. page is not used. |
Sint32 | mnStatusScreenRunStatusPage (void) | The Status menu's status page for the chosen party member: on the left their statuses, on the right their stats, a help line for the one under the cursor in the window above; Left and Right change sides, Up and Down rows, L and R party member. |
void | mnStatusScreenDrawSelectionCursor (Sint32 side, Sint32 selected, Uint8 *entries, Sint32 invert) | Highlights (invert 0) or unhighlights (invert 1) the selected entry of the status page: on side 0 the selected status row, as wide as its label (StatusScreenCursorWidths); on side 1 one of the first four stat rows or of the rows below. |
void | mnStatusScreenDrawSelectionLabels (WINDOW *target, Sint32 selected, const Uint8 *entries) | Writes the advice for the selected status (two lines, for example how to revive a party member who is down) into window target, or that the party member is well when they have no status. |
void | mnStatusScreenShowMemberProgressMessage (WINDOW *dest, Sint32 row, Sint32 hasDjinn) | Writes the help text of the status page's right-hand row row into destination: the rows skip the Djinn row when the party has no Djinn (hasDjinn 0); the experience row says how many points the next level needs, or, at level 99, gives the plain experience text. |
void | mnStatusScreenDrawStatusPage (WINDOW *window, Sint32 memberId, Sint32 mode) | Draws party member memberId's status page into window: the top rows (mnStatusScreenDrawTopRows), the status list or "Normal", and except on the chooser page the Djinn counts by element and, on STATUS_PAGE_FULL, the elemental levels, Power and Resist. |
void | mnBusyWait (void) | Spins for 256 loop passes (international editions only). |
void | mnStatusScreenDrawTopRows (WINDOW *window, Sint32 memberId, Sint32 flags) | Draws the top rows of party member memberId's status page into window: name, class, level, experience, HP and PP on the left, Attack, Defense, Agility and Luck on the right. |
Sint32 | mnStatusScreenListStatuses (Uint8 *ailments, Sint32 includeDown, Sint32 memberId) | Fills ailments (indexed by UNIT_STAT) with party member memberId's statuses: down (only when includeDown is 1), poison or venom, curse and haunt. |
Sint32 | mnPagedListBuild (PAGED_LIST *result, Sint32 index) | Fills result with the item list of the party member in side index for the equipment pages: their unit, the menu's item count, and the page and row of the item chosen last for them, STATUS_EQUIP_PAGE_SIZE items to a page. |
void | mnBuildPatternTiles (void) | Builds the Psynergy range icons' tiles in the window tile area, each a fill of WINDOW_BACKGROUND_COLOR with the rows of MenuPatternRowMasks XORed in, the first set growing row by row and the second skipping its top row. |
void | mnPsynergyMenuDrawRange ( WINDOW *window, Sint32 x, Sint32 y, Sint32 range, Sint32 unused) | Draws a Psynergy range icon at tile (x, y) of window: three tiles from pair range of the range icon tiles (mnBuildPatternTiles), the side tile on both ends, mirrored on the left, and the centre tile between. range is the ability's range less one (0 for the aimed unit alone), or RANGE_ICON_ALL for ABILITY_RANGE_ALL (mnStatusScreenDrawPsynergyPage). |
Sint32 | mnStatusScreenShowPsynergyRow (WINDOW *window, Sint32 unused, PAGED_LIST *state) | Updates the Psynergy page for the row under the cursor: the Psynergy's description in the info window, where it can be used (in the field, in battle, or anywhere), and the row highlights with the range icons. |
Sint32 | mnStatusScreenDrawPsynergyPage (WINDOW *window, Sint32 unused, const PAGED_LIST *res) | Draws one page of the Status menu's Psynergy list into window: up to STATUS_LIST_PAGE_ROWS names with their icons, PP costs and range icons, the page numbers or "no Psynergy", and the party member's name, class and level. |
Sint32 | mnStatusScreenRunPsynergyPage (void) | The Status menu's Psynergy page: the party member's Psynergy, STATUS_LIST_PAGE_ROWS to a page, each with its PP cost and range icon; the cursor's Psynergy is described in the info window with where it can be used. |
Sint32 | mnStatusScreenPsynergyPageReturnTrue (void) | Unused: returns 1. |
void | mnPsynergyMenuDrawPreparedPsynergyIcons (const void *unused, Sint32 memberId) | Hides every entry icon, then loads the icons of the Psynergy already listed in the state (psynergies) into them. memberId is only looked up. |
void | mnPsynergyMenuPreparedIconsNoOperation (void) | Unused: two functions that do nothing. |
void | mnPsynergyMenuPreparedIconsSecondNoOperation (void) | |
Sint32 | mnStatusScreenShowEquipmentRow (WINDOW *window, Sint32 unused, PAGED_LIST *state) | Updates the Status menu's equipment page for the row under the cursor: the item's plain name in the info window, the row highlights, and in the equipment window the highlight of the slot the item is worn in, if it is. |
Sint32 | mnStatusScreenDrawEquipmentPage (WINDOW *window, Sint32 unused, PAGED_LIST *state) | Draws one page of the Status menu's equipment page into window: up to STATUS_LIST_PAGE_ROWS item names with their icons and the page numbers, or "no items", and the party member's name with their Attack and Defense. |
Sint32 | mnStatusScreenRunEquipmentPage (void) | The Status menu's equipment page: the party member's items in the first list order (LIST_SORT_EQUIPPED_THEN_ITEMS), STATUS_LIST_PAGE_ROWS to a page, beside the equipment window of what they wear. |
Sint32 | mnMoveGridCursor (Sint32 *columnOut, Sint32 *rowOut, Sint32 direction) | Moves through the status grid's irregular rows and returns row * 9 + column. |
Sint32 | mnGridCursorReturnTrue (void) | Unused: returns 1. |
void | mnItemMenuDrawEquipment (WINDOW *window, Sint32 memberId, Sint32 mode) | Writes the four equipment slot labels (Weapon, Head, Shield and Chest, one a 16-pixel row) and the names of the items worn in them into window; mode 0 also shows their icons at the right. |
void | mnItemMenuDrawEquippedItemNames (WINDOW *window, Uint16 *items) | Writes the name of each worn weapon, armor, shield and helm under its slot label (mnItemMenuDrawEquipment). |
void | mnPlaceEntryIconsInGrid (Sint32 originX, Sint32 originY, Sint32 columns) | Places the 32 entry icons in a grid of 16x16 cells, columns wide, from (originX, originY), and shows them: the party member chooser's Psynergy icons. |
void | mnPlaceEntryIconInGrid (WINDOW_SPR *icon, Sint32 index, Sint32 originX, Sint32 originY, Sint32 columns) | Places icon at cell index (an index above 31 is taken as 0) of a grid of ENTRY_ICON_CELL_SIZE square cells, columns wide, from (originX, originY), and shows it. |
void | mnItemMenuPlaceEquippedIcons (Uint16 *items) | Places the icon of each worn weapon, armor, shield and helm at EQUIPPED_ICON_X, on its slot's row; the others stay off screen. |
void | mnHideEntryIcons (void) | Moves all 32 entry icons off screen, to MENU_ICON_HIDDEN_X and _Y, before a screen lays them out again. |
Sint32 | mnStatusScreenCreateStatusIcons (WINDOW *window) | Creates the eight status icon sprites in window, off screen at MENU_ICON_HIDDEN_X and _Y, each on item graphic slot of the same number; the Status menu shows the status icons with the first five (mnStatusScreenLoadStatusIcons). |
void | mnStatusScreenShowStatusIcons (const Uint8 *flags) | Shows the icon of each status that flags marks (mnStatusScreenListStatuses) down the left edge from y 88, 16 pixels apart, beside the status labels of mnStatusScreenDrawStatusPage. |
void | mnStatusScreenHideStatusIcons (void) | Moves the five status icons off screen, before they are shown again or while another view covers them. |
Sint32 | mnStatusScreenLoadStatusIcons (const Uint8 *enabled) | Loads each enabled status's icon into its sprite's tile slot: kind is the icon's number in IconMiscellaneousIconPointers, which the battle Status screen shows for the same status. |
Description
The party member chooser and the Status menu: its party member row, status
page, Psynergy page and equipment page. Part of menu.c.
Macros in detail
MEMBER_CHOOSER_MEMBER_COUNT
#define MEMBER_CHOOSER_MEMBER_COUNT WHEN(EIGHT_PARTY_FIGURES_RESET, 8, 4)
The party figures the chooser lowers before it raises the chosen one's: eight
outside Japan and four in the Japanese edition, as the Status menu's
STATUS_MEMBER_FIGURE_COUNT.
Referenced by mnPartyMemberChooserOpen().
Definition at line 9 of file menu_status.c.
STATUS_SAVED_TILE_BYTES
#define STATUS_SAVED_TILE_BYTES WHEN(STATUS_MENU_EXTRA_TEXT_TILES, 8192, 2048)
The window tiles the Status menu saves and restores, more where it draws its text into extra tiles.
Referenced by mnStatusScreenRun().
Definition at line 13 of file menu_status.c.
STATUS_SAVED_PALETTE_BYTES
#define STATUS_SAVED_PALETTE_BYTES (2 * PALETTE_COLORS * 2)
Background palettes 0 and 1, which the Status menu fills with the element
icons' colours: two palettes of PALETTE_COLORS two-byte colours.
Referenced by mnStatusScreenRun().
Definition at line 17 of file menu_status.c.
STATUS_PAGE_NO_CLEAR
#define STATUS_PAGE_NO_CLEAR (1 << 8)
A bit over the page mode: draw without clearing the window first, as for a window just opened.
Referenced by mnStatusScreenDrawStatusPage(), mnStatusScreenDrawTopRows() and mnStatusScreenShowMemberStatus().
Definition at line 30 of file menu_status.c.
STATUS_PAGE_MODE_MASK
#define STATUS_PAGE_MODE_MASK (STATUS_PAGE_NO_CLEAR - 1)
Referenced by mnStatusScreenDrawStatusPage().
Definition at line 31 of file menu_status.c.
STATUS_HELP_TEXT_MAX
#define STATUS_HELP_TEXT_MAX JAPANESE_OR(64, 128)
The longest status help text, in characters.
Referenced by mnStatusScreenShowMemberProgressMessage().
Definition at line 34 of file menu_status.c.
STATUS_STAT_DIGITS
#define STATUS_STAT_DIGITS JAPANESE_OR(4, 3)
The stat column of the status page's top rows: three digits from 200 or four from 192, both ending at pixel 224.
Referenced by mnStatusScreenDrawTopRows().
Definition at line 38 of file menu_status.c.
STATUS_STAT_X
#define STATUS_STAT_X JAPANESE_OR(192, 200)
Referenced by mnStatusScreenDrawTopRows().
Definition at line 39 of file menu_status.c.
STATUS_EQUIP_PAGE_SIZE
#define STATUS_EQUIP_PAGE_SIZE JAPANESE_OR(6, 5)
Items to a page of the equipment page's list.
Referenced by mnPagedListBuild().
Definition at line 42 of file menu_status.c.
STATUS_PSYNERGY_CURSOR_X
#define STATUS_PSYNERGY_CURSOR_X JAPANESE_OR(58, 55)
The hand cursor on the Psynergy page.
Referenced by mnStatusScreenRunPsynergyPage().
Definition at line 45 of file menu_status.c.
STATUS_PSYNERGY_CURSOR_Y
#define STATUS_PSYNERGY_CURSOR_Y JAPANESE_OR(52, 60)
Referenced by mnStatusScreenRunPsynergyPage().
Definition at line 46 of file menu_status.c.
STATUS_EQUIP_SLOT_X
#define STATUS_EQUIP_SLOT_X JAPANESE_OR(2, 1)
The highlight over the equipment window's four slot rows.
Referenced by mnStatusScreenShowEquipmentRow().
Definition at line 49 of file menu_status.c.
STATUS_EQUIP_SLOT_WIDTH
#define STATUS_EQUIP_SLOT_WIDTH JAPANESE_OR(9, 12)
Referenced by mnStatusScreenShowEquipmentRow().
Definition at line 50 of file menu_status.c.
STATUS_ITEM_PAGE_ICONS_X
#define STATUS_ITEM_PAGE_ICONS_X JAPANESE_OR(123, 119)
The equipment page's item list: its page icons, the item names, and the Attack and Defense figures.
Referenced by mnStatusScreenDrawEquipmentPage().
Definition at line 54 of file menu_status.c.
STATUS_ITEM_NAME_X
#define STATUS_ITEM_NAME_X JAPANESE_OR(136, 128)
Referenced by mnStatusScreenDrawEquipmentPage().
Definition at line 55 of file menu_status.c.
STATUS_ITEM_STAT_X
#define STATUS_ITEM_STAT_X JAPANESE_OR(72, 80)
Referenced by mnStatusScreenDrawEquipmentPage().
Definition at line 56 of file menu_status.c.
STATUS_ITEM_EMPTY_MESSAGE_X
#define STATUS_ITEM_EMPTY_MESSAGE_X GERMAN_OR(112, 120)
The x of "You have no items." in the equipment page's list, in pixels.
Referenced by mnStatusScreenDrawEquipmentPage().
Definition at line 59 of file menu_status.c.
STATUS_EQUIP_WINDOW_WIDTH
#define STATUS_EQUIP_WINDOW_WIDTH JAPANESE_OR(13, 15)
The equipment window, and the equipped items' names in it.
Referenced by mnStatusScreenRunEquipmentPage().
Definition at line 62 of file menu_status.c.
STATUS_EQUIPPED_NAME_X
#define STATUS_EQUIPPED_NAME_X JAPANESE_OR(16, 8)
Referenced by mnItemMenuDrawEquippedItemNames().
Definition at line 63 of file menu_status.c.
STATUS_FIGURE_X
#define STATUS_FIGURE_X(index) (130 + (index) * 32)
The Djinn figures stand in a row 32 pixels apart, at y STATUS_FIGURE_ROW_Y,
over the status page's Djinn counts. On the full status page those stand
three tiles higher, and the figures at STATUS_FIGURE_FULL_PAGE_ROW_Y; the
Psynergy page puts them above the screen.
Referenced by mnStatusScreenRun(), mnStatusScreenRunPartyRow() and mnStatusScreenShowDjinnList().
Definition at line 69 of file menu_status.c.
STATUS_FIGURE_ROW_Y
#define STATUS_FIGURE_ROW_Y 128
Referenced by mnStatusScreenRun(), mnStatusScreenRunPartyRow(), mnStatusScreenRunStatusPage() and mnStatusScreenShowDjinnList().
Definition at line 70 of file menu_status.c.
STATUS_FIGURE_FULL_PAGE_ROW_Y
#define STATUS_FIGURE_FULL_PAGE_ROW_Y 104
Referenced by mnStatusScreenRunStatusPage().
Definition at line 71 of file menu_status.c.
STATUS_FIGURE_ABOVE_SCREEN_Y
#define STATUS_FIGURE_ABOVE_SCREEN_Y -16
Referenced by mnStatusScreenRunPsynergyPage().
Definition at line 72 of file menu_status.c.
DJINN_LIST_COLUMN_WIDTH
#define DJINN_LIST_COLUMN_WIDTH 56
The Djinn list (mnStatusScreenShowDjinnList): a column for each element, its
Djinni figure standing over it.
Referenced by mnStatusScreenShowDjinnList().
Definition at line 76 of file menu_status.c.
DJINN_LIST_FIGURE_X
#define DJINN_LIST_FIGURE_X(element) (32 + (element) * DJINN_LIST_COLUMN_WIDTH)
Referenced by mnStatusScreenShowDjinnList().
Definition at line 77 of file menu_status.c.
DJINN_LIST_FIGURE_Y
#define DJINN_LIST_FIGURE_Y 70
Referenced by mnStatusScreenShowDjinnList().
Definition at line 78 of file menu_status.c.
ELEMENT_ICON_FIRST_TILE
#define ELEMENT_ICON_FIRST_TILE 1
The window tile of the first element icon, Venus's; the four elements follow
it in order. STATUS_ELEMENT_TILE is its map entry in palette 1, as
TILEMAP_ENTRY_ICON gives it.
Referenced by mnStatusScreenDrawStatusPage(), mnStatusScreenShowEquipmentRow() and mnStatusScreenShowPsynergyRow().
Definition at line 82 of file menu_status.c.
STATUS_ELEMENT_TILE
#define STATUS_ELEMENT_TILE (BG_TILE_PALETTE(1) | ELEMENT_ICON_FIRST_TILE)
Referenced by mnStatusScreenShowDjinnList().
Definition at line 83 of file menu_status.c.
SWITCH_HELP_Y
#define SWITCH_HELP_Y -24
The switch help's two lines, drawn above the status window's interior.
Referenced by mnStatusScreenRunEquipmentPage(), mnStatusScreenRunPsynergyPage() and mnStatusScreenRunStatusPage().
Definition at line 86 of file menu_status.c.
STATUS_AILMENT_Y
#define STATUS_AILMENT_Y(row) ((row) * 16 + 40)
The status page's ailments, one a row of 16 pixels from y 40.
Referenced by mnStatusScreenDrawStatusPage().
Definition at line 89 of file menu_status.c.
EQUIP_ROW_NAME_TILE_ROW
#define EQUIP_ROW_NAME_TILE_ROW(row) ((row) * 2 + 1)
Referenced by mnStatusScreenShowEquipmentRow().
Definition at line 140 of file menu_status.c.
DJINN_LIST_DJINN_PER_ELEMENT
#define DJINN_LIST_DJINN_PER_ELEMENT 7
Each element's column of the Djinn list holds its seven Djinn.
Referenced by mnStatusScreenShowDjinnList().
Definition at line 143 of file menu_status.c.
STATUS_ELEMENT_COLUMN
#define STATUS_ELEMENT_COLUMN(element) ((element) * 4 + 15)
The status page's four element columns, 4 tiles apart from tile 15, where each element's icon stands; its figures end left of it.
Referenced by mnStatusScreenDrawStatusPage().
Definition at line 147 of file menu_status.c.
STATUS_ELEMENT_X
#define STATUS_ELEMENT_X(element) (STATUS_ELEMENT_COLUMN(element) * 8)
Referenced by mnStatusScreenDrawStatusPage().
Definition at line 148 of file menu_status.c.
STAT_LABEL
#define STAT_LABEL(n)
Stat label n of "Attack", "Defense", "Agility" and "Luck" (MsgStatLabel +
n), counted back from "Exp" (MsgExpLabel), which the status page also shows.
Referenced by mnStatusScreenDrawTopRows().
Definition at line 1313 of file menu_status.c.
EQUIPPED_ROW_Y
#define EQUIPPED_ROW_Y(row) ((row) * 16)
The equipment slots' rows (EQUIP_ROW_) in mnItemMenuDrawEquipment's window,
16 pixels apart. A slot's label stands on its row, its item's name a line
below, and its icon at EQUIPPED_ICON_X on screen.
Referenced by mnItemMenuDrawEquipment() and mnItemMenuDrawEquippedItemNames().
Definition at line 2416 of file menu_status.c.
EQUIPPED_ICON_X
#define EQUIPPED_ICON_X 216
Referenced by mnItemMenuPlaceEquippedIcons().
Definition at line 2417 of file menu_status.c.
EQUIPPED_ICON_Y
#define EQUIPPED_ICON_Y(row) (EQUIPPED_ROW_Y(row) + 32)
Referenced by mnItemMenuPlaceEquippedIcons().
Definition at line 2418 of file menu_status.c.
ENTRY_ICON_CELL_SIZE
#define ENTRY_ICON_CELL_SIZE 16
The side of a cell of the grids mnPlaceEntryIconInGrid places icons in.
Referenced by mnPlaceEntryIconInGrid().
Definition at line 2520 of file menu_status.c.
Typedefs in detail
EXPERIENCE_DIFFERENCE
typedef Uint64 EXPERIENCE_DIFFERENCE;
typedef Uint32 EXPERIENCE_DIFFERENCE;
Referenced by mnStatusScreenShowMemberProgressMessage().
Definition at lines 1096 and 1098 of file menu_status.c.
Enumerations in detail
anonymous enum
enum { STATUS_PAGE_SUMMARY, STATUS_PAGE_FULL }
The page modes of mnStatusScreenDrawStatusPage and mnStatusScreenDrawTopRows,
in the mode's low byte: the party row's summary, or the full status page,
with the elemental levels, Power and Resist.
| Enumerator | Value | Description |
|---|---|---|
STATUS_PAGE_SUMMARY | 0 | |
STATUS_PAGE_FULL | 1 |
Definition at line 22 of file menu_status.c.
anonymous enum
enum { STATUS_SIDE_STATUSES, STATUS_SIDE_STATS, STATUS_SIDE_COUNT }
The two sides of the status page: the statuses on the left, the stats on the right.
| Enumerator | Value | Description |
|---|---|---|
STATUS_SIDE_STATUSES | ||
STATUS_SIDE_STATS | ||
STATUS_SIDE_COUNT |
Definition at line 93 of file menu_status.c.
anonymous enum
enum { STATUS_ROW_NAME, STATUS_ROW_EXPERIENCE, STATUS_ROW_HP, STATUS_ROW_PP, … }
The rows of the status page's right side, in the order of their help
(MsgProgressHelp): the first four beside the top rows, the others under the
element icons. Without Djinn there is no Djinn row, and the rows after it
move up one.
| Enumerator | Value | Description |
|---|---|---|
STATUS_ROW_NAME | ||
STATUS_ROW_EXPERIENCE | ||
STATUS_ROW_HP | ||
STATUS_ROW_PP | ||
STATUS_ROW_DJINN | ||
STATUS_ROW_ELEMENTAL_LEVEL | ||
STATUS_ROW_POWER | ||
STATUS_ROW_RESIST | ||
STATUS_ROW_COUNT | ||
STATUS_ROW_EXPERIENCE_AT_MAX_LEVEL | STATUS_ROW_COUNT | The experience row's help at the top level, "These are your experience points." |
Definition at line 104 of file menu_status.c.
anonymous enum
enum { PSYNERGY_USABLE_IN_BATTLE, PSYNERGY_USABLE_IN_FIELD, PSYNERGY_USABLE_ANYWHERE }
Where a Psynergy can be used, as the Psynergy page tells it outside Japan.
| Enumerator | Value | Description |
|---|---|---|
PSYNERGY_USABLE_IN_BATTLE | 1 | |
PSYNERGY_USABLE_IN_FIELD | 2 | |
PSYNERGY_USABLE_ANYWHERE | PSYNERGY_USABLE_IN_BATTLE | PSYNERGY_USABLE_IN_FIELD |
Definition at line 121 of file menu_status.c.
anonymous enum
enum { EQUIP_ROW_WEAPON, EQUIP_ROW_HEAD, EQUIP_ROW_SHIELD, EQUIP_ROW_CHEST }
The equipment window's four slots, from the top, under the game's labels "Weapon", "Head", "Shield" and "Chest"; each slot's item name is on the tile row below its label.
| Enumerator | Value | Description |
|---|---|---|
EQUIP_ROW_WEAPON | ||
EQUIP_ROW_HEAD | ||
EQUIP_ROW_SHIELD | ||
EQUIP_ROW_CHEST |
Definition at line 132 of file menu_status.c.
STAT_SCREEN_STEP
enum STAT_SCREEN_STEP
The steps of the Status menu (mnStatusScreenRunPages).
| Enumerator | Value | Description |
|---|---|---|
STATUS_STEP_MEMBER | 0 | choose a party member |
STATUS_STEP_STATUS | 1 | their status page |
STATUS_STEP_PSYNERGY | 2 | their Psynergy page |
STATUS_STEP_EQUIPMENT | 3 | their equipment page |
Definition at line 304 of file menu_status.c.
anonymous enum
enum { RANGE_ICON_PAIRS, RANGE_ICON_PAIR_WORDS }
The Psynergy range icons' tiles: two sets of RANGE_ICON_PAIRS tile pairs, a
pair RANGE_ICON_PAIR_WORDS of tile data, a word to a 4bpp tile row.
RANGE_ICON_ALL, the last pair, stands for ABILITY_RANGE_ALL.
| Enumerator | Value | Description |
|---|---|---|
RANGE_ICON_PAIRS | 6 | |
RANGE_ICON_PAIR_WORDS | 2 * TILE_SIZE_4BPP / 4 |
Definition at line 1455 of file menu_status.c.
Functions in detail
mnStatusScreenLoadIconPalettes
static __inline__ void mnStatusScreenLoadIconPalettes(void)
The highlight palette, and the first sprite palette into background palettes
0 and 1 for the element icons drawn as window tiles: palette 0, for the
highlighted row, takes HIGHLIGHT_PALETTE's WINDOW_BACKGROUND_COLOR as its
TEXT_BACKGROUND_COLOR, palette 1 WINDOW_PALETTE's
(mnStatusScreenShowPsynergyRow).
References mnPaletteLightenHighlight() and syDMAXCopy().
Referenced by mnStatusScreenRun() and mnStatusScreenRunPartyRow().
Definition at line 155 of file menu_status.c.
mnPartyMemberChooserOpen
Sint32 mnPartyMemberChooserOpen(void)
Lets the player choose one party member, over the field (the Colosso scenes
use it, through stubs.s, and so does the debug test).
References gmPartyListMembersStub(), mnInitState(), mnItemMenuClose(), mnPartyMemberChooserRun(), mnStatusScreenInit(), mnWindowCreateStub(), mnWindowDrawBorderStub(), mnWindowSpriteClearListStub(), Sint32, syHeapSlotAllocate(), syHeapSlotRelease() and sySynch().
Referenced by dbMenuTestSelectCharacter() and scColossoOfferCheeringSpot().
Definition at line 177 of file menu_status.c.
mnPartyMemberChooserRun
Sint32 mnPartyMemberChooserRun(void)
The party member chooser's loop. Returns the chosen party member's id, or -1.
References mnStatusScreenSelectMember(), Sint32 and state.
Referenced by mnPartyMemberChooserOpen().
Definition at line 208 of file menu_status.c.
mnStatusScreenRun
Sint32 mnStatusScreenRun(void)
The Status screen, the field menu's Status (mnFieldMenuRun,
FIELD_MENU_STATUS), over the field: saves the first two background palettes
and the window tiles it draws over, sets up the party row and, when the party
has Djinn, the four Djinn sprites, runs the status pages, then puts
everything back.
References gmPartyListMembersStub(), gmPartySumDjinnCountsStub(), mnDjinnFiguresInitTopRow(), mnDjinnFiguresReleaseTopRow(), mnInitState(), mnItemMenuClose(), mnPageArrowsDrawStub(), mnResumeFieldEvents(), mnStartWatchingStart(), mnStatusScreenInit(), mnStatusScreenLoadIconPalettes(), mnStatusScreenRunPages(), mnStopWatchingStart(), mnSuspendFieldEvents(), mnTextUseExtraTilesStub(), mnWindowCreateStub(), mnWindowDrawBorderStub(), mnWindowEraseBorderRectStub(), mnWindowMarkVisibleTextTilesStub(), mnWindowSpriteClearListStub(), Sint32, syHeapAllocateEWRAM(), syHeapRelease(), syHeapSlotAllocate(), syHeapSlotRelease(), sySynch(), syWordsCopy() and syWordsFill().
Definition at line 231 of file menu_status.c.
mnStatusScreenRunPages
Sint32 mnStatusScreenRunPages(void)
The Status menu's pages: choose a party member, then their status page, A for their Psynergy page and A again for their equipment page, whose A goes back round to the status page; B on any page goes back to the party member row.
References gmFlagGetStub(), mnStatusScreenRunEquipmentPage(), mnStatusScreenRunPsynergyPage(), mnStatusScreenRunStatusPage(), mnStatusScreenSelectMember() and Sint32.
Referenced by mnStatusScreenRun().
Definition at line 315 of file menu_status.c.
mnStatusScreenSelectMember
Sint32 mnStatusScreenSelectMember(Sint32 slot)
Lets the player choose a party member in slot, from the one chosen last: the
party member chooser on STATUS_SCREEN_PAGE_CHOOSER, else the Status menu's
party row.
References gmFlagGetStub(), mnCursorSlide(), mnIconShow(), mnPartyMemberChooserChooseMember(), mnStatusScreenRunPartyRow(), mnWindowDrawDividerLineStub(), mnWindowSpriteRedrawSavedRectStub(), Sint32 and sySynch().
Referenced by mnPartyMemberChooserRun() and mnStatusScreenRunPages().
Definition at line 368 of file menu_status.c.
mnStatusScreenShowDjinnList
Sint32 mnStatusScreenShowDjinnList(void)
Shows every Djinn the party has found, a column of seven for each element, until A, B or Select, then puts the screen back.
References gmFlagGetStub(), mnStatusScreenHideStatusIcons(), mnTextDrawMessageAsTilesStub(), mnTextDrawMessageStub(), mnWindowDrawDividerLineStub(), mnWindowSetTilemapEntryStub(), mnWindowSpriteClearListStub(), mnWindowSpriteRedrawSavedRectStub(), PerPush, Sint32, sySoundPlayStub() and sySynch().
Referenced by mnStatusScreenRunPartyRow().
Definition at line 404 of file menu_status.c.
mnStatusScreenSetSelectedMemberRow
static __inline__ void mnStatusScreenSetSelectedMemberRow(STATUS_SCREEN_STATE *menu, Sint32 selectedMember)
Lowers the party figures, then raises the currently selected party member.
References Sint32.
Referenced by mnStatusScreenRunPartyRow().
Definition at line 487 of file menu_status.c.
mnStatusScreenRunPartyRow
Sint32 mnStatusScreenRunPartyRow(void)
The Status menu's party row: Left and Right choose a party member, showing
their status; L and R move the party member one place along the party order;
Select lists the Djinn found (once the first is caught, FLAG_DJINN_FIRST); A
chooses the party member and B backs out.
References gmFlagGetStub(), gmUnitGetStub(), mnCreatePartyFigures(), mnCursorPos(), mnReleasePartyFigures(), mnReloadMemberPortrait(), mnStatusScreenLoadIconPalettes(), mnStatusScreenMovePartyMember(), mnStatusScreenSetSelectedMemberRow(), mnStatusScreenShowDjinnList(), mnStatusScreenShowMemberStatus(), mnTextDrawMessageAsTilesStub(), mnWindowSpriteRedrawSavedRectStub(), PerPush, PerRepeat, Sint32, sySoundPlayStub() and sySynch().
Referenced by mnStatusScreenSelectMember().
Definition at line 502 of file menu_status.c.
mnPartyMemberChooserChooseMember
Sint32 mnPartyMemberChooserChooseMember(void)
The party member chooser (STATUS_SCREEN_PAGE_CHOOSER): Left and Right choose
a party member, showing their status and Psynergy icons; A chooses and B
backs out.
References gmUnitGetStub(), mnCursorPos(), mnHideEmptyEntryIcons(), mnPlaceEntryIconsInGrid(), mnPsynergyMenuCollectActions(), mnPsynergyMenuDrawPsynergyIcons(), mnReloadMemberPortrait(), mnStatusScreenShowMemberStatus(), mnTextDrawMessageAsTilesStub(), mnWindowSpriteRedrawSavedRectStub(), PerPush, PerRepeat, Sint32, sySoundPlayStub() and sySynch().
Referenced by mnStatusScreenSelectMember().
Definition at line 632 of file menu_status.c.
mnStatusScreenMovePartyMember
Bool mnStatusScreenMovePartyMember(Sint32 selectedIndex, Sint32 direction)
Moves the party member at selectedIndex one place later (direction 1) or earlier (0) in the party order. Returns 1, or 0 when it cannot move.
References gmPartyAddMemberStub(), gmPartyListMembersStub(), gmPartyRemoveMemberStub() and Sint32.
Referenced by mnStatusScreenRunPartyRow().
Definition at line 714 of file menu_status.c.
mnStatusScreenInit
void mnStatusScreenInit(Sint32 x, Sint32 y, Sint32 mode, Sint32 columns)
Sets up the Status menu's first screen: the cursor window with the party's figures, no other windows yet, and an 8 by 2 cursor grid. x, y, mode and columns are not used.
References mnCreatePartyFigures(), mnCursorCreate() and Sint32.
Referenced by mnPartyMemberChooserOpen() and mnStatusScreenRun().
Definition at line 777 of file menu_status.c.
mnStatusScreenShowMemberStatus
void mnStatusScreenShowMemberStatus(Sint32 member, Sint32 page)
Shows member's status in the status window (0, 5, 30 by 15), opening it
first with the party member's portrait (kept as the state's statusCursor),
the 32 entry icons (the chooser's Psynergy icons) on the chooser page, and
the eight status icon sprites; then draws the stats and statuses. page is not
used.
References mnPortraitCreateStub(), mnSpawnIconEntries(), mnStatusScreenCreateStatusIcons(), mnStatusScreenDrawStatusPage(), mnWindowUpdateOrCreate() and Sint32.
Referenced by mnPartyMemberChooserChooseMember() and mnStatusScreenRunPartyRow().
Definition at line 798 of file menu_status.c.
mnStatusScreenRunStatusPage
Sint32 mnStatusScreenRunStatusPage(void)
The Status menu's status page for the chosen party member: on the left their statuses, on the right their stats, a help line for the one under the cursor in the window above; Left and Right change sides, Up and Down rows, L and R party member. Returns 1 for A (on to the Psynergy page), -1 for B.
References gmFlagGetStub(), gmPartySumDjinnCountsStub(), gmUnitGetStub(), mnCursorPos(), mnCursorSlide(), mnPlacePartyFigures(), mnReloadMemberPortrait(), mnStatusScreenDrawSelectionCursor(), mnStatusScreenDrawSelectionLabels(), mnStatusScreenDrawStatusPage(), mnStatusScreenHideStatusIcons(), mnStatusScreenListStatuses(), mnStatusScreenShowMemberProgressMessage(), mnTextDrawMessageAsTilesStub(), mnWindowClearInteriorTilesStub(), mnWindowSpriteClearListStub(), mnWindowSpriteRedrawSavedRectStub(), mnWindowUpdateOrCreate(), PerPush, PerRepeat, Sint32, syCloseEvent(), sySetEvent(), sySoundPlayStub() and sySynch().
Referenced by mnStatusScreenRunPages().
Definition at line 835 of file menu_status.c.
mnStatusScreenDrawSelectionCursor
void mnStatusScreenDrawSelectionCursor(Sint32 side, Sint32 selected, Uint8 *entries, Sint32 invert)
Highlights (invert 0) or unhighlights (invert 1) the selected entry of the
status page: on side 0 the selected status row, as wide as its label
(StatusScreenCursorWidths); on side 1 one of the first four stat rows or of
the rows below.
References mnWindowSetHighlightRect(), Sint32, StatusScreenCursorWidths and width.
Referenced by mnStatusScreenRunStatusPage().
Definition at line 1013 of file menu_status.c.
mnStatusScreenDrawSelectionLabels
void mnStatusScreenDrawSelectionLabels(WINDOW *target, Sint32 selected, const Uint8 *entries)
Writes the advice for the selected status (two lines, for example how to revive a party member who is down) into window target, or that the party member is well when they have no status.
References mnTextDrawMessageStub() and Sint32.
Referenced by mnStatusScreenRunStatusPage().
Definition at line 1068 of file menu_status.c.
mnStatusScreenShowMemberProgressMessage
void mnStatusScreenShowMemberProgressMessage(WINDOW *dest, Sint32 row, Sint32 hasDjinn)
Writes the help text of the status page's right-hand row row into
destination: the rows skip the Djinn row when the party has no Djinn
(hasDjinn 0); the experience row says how many points the next level needs,
or, at level 99, gives the plain experience text.
References gmUnitGetExperienceForLevelStub(), gmUnitGetStub(), mnMessageArgumentPushStub(), mnMessageCopyExpandedStub(), mnTextDrawWideStringAtOffsetStub(), Sint32, syHeapAllocate() and syHeapRelease().
Referenced by mnStatusScreenRunStatusPage().
Definition at line 1105 of file menu_status.c.
mnStatusScreenDrawStatusPage
void mnStatusScreenDrawStatusPage(WINDOW *window, Sint32 memberId, Sint32 mode)
Draws party member memberId's status page into window: the top rows
(mnStatusScreenDrawTopRows), the status list or "Normal", and except on the
chooser page the Djinn counts by element and, on STATUS_PAGE_FULL, the
elemental levels, Power and Resist.
References gmPartySumDjinnCountsStub(), gmUnitGetElementLevelStub(), gmUnitGetStub(), MenuLvString, MenuSlashString, mnStatusScreenDrawTopRows(), mnStatusScreenListStatuses(), mnStatusScreenLoadStatusIcons(), mnStatusScreenShowStatusIcons(), mnTextDrawMessageAsTilesStub(), mnTextDrawNumberInWindowStub(), mnTextDrawStringInWindowStub(), mnTextSetColorStub(), mnWindowClearInteriorTilesStub(), mnWindowSetTilemapEntryStub(), Sint32 and sySynch().
Referenced by mnStatusScreenRunStatusPage() and mnStatusScreenShowMemberStatus().
Definition at line 1145 of file menu_status.c.
mnBusyWait
void mnBusyWait(void)
Spins for 256 loop passes (international editions only). Nothing calls it.
Definition at line 1300 of file menu_status.c.
mnStatusScreenDrawTopRows
void mnStatusScreenDrawTopRows(WINDOW *window, Sint32 memberId, Sint32 flags)
Draws the top rows of party member memberId's status page into window: name, class, level, experience, HP and PP on the left, Attack, Defense, Agility and Luck on the right.
References gmUnitGetStub(), MenuHpString, MenuLvString, MenuPpString, MenuSlashString, mnTextDrawMessageAsTilesStub(), mnTextDrawNumberInWindowStub(), mnTextDrawStringAtOffsetStub(), mnTextDrawStringInWindowStub(), mnTextSetColorStub(), mnWindowClearInteriorTilesStub(), Sint32 and sySynch().
Referenced by mnStatusScreenDrawStatusPage().
Definition at line 1319 of file menu_status.c.
mnStatusScreenListStatuses
Sint32 mnStatusScreenListStatuses(Uint8 *ailments, Sint32 includeDown, Sint32 memberId)
Fills ailments (indexed by UNIT_STAT) with party member memberId's statuses:
down (only when includeDown is 1), poison or venom, curse and haunt. Returns
how many they have.
References gmUnitGetStub() and Sint32.
Referenced by mnStatusPanelDraw(), mnStatusScreenDrawStatusPage() and mnStatusScreenRunStatusPage().
Definition at line 1370 of file menu_status.c.
mnPagedListBuild
Sint32 mnPagedListBuild(PAGED_LIST *result, Sint32 index)
Fills result with the item list of the party member in side index for the
equipment pages: their unit, the menu's item count, and the page and row of
the item chosen last for them, STATUS_EQUIP_PAGE_SIZE items to a page.
References gmUnitGetStub() and Sint32.
Referenced by mnStatusScreenRunEquipmentPage() and mnStatusScreenRunPsynergyPage().
Definition at line 1415 of file menu_status.c.
mnBuildPatternTiles
void mnBuildPatternTiles(void)
Builds the Psynergy range icons' tiles in the window tile area, each a fill
of WINDOW_BACKGROUND_COLOR with the rows of MenuPatternRowMasks XORed in, the
first set growing row by row and the second skipping its top row.
References MenuPatternRowMasks, mnXorWord(), Sint32 and syWordsFill().
Referenced by mnStatusScreenRunPsynergyPage().
Definition at line 1464 of file menu_status.c.
mnPsynergyMenuDrawRange
void mnPsynergyMenuDrawRange( WINDOW *window, Sint32 x, Sint32 y, Sint32 range, Sint32 unused)
Draws a Psynergy range icon at tile (x, y) of window: three tiles from pair
range of the range icon tiles (mnBuildPatternTiles), the side tile on both
ends, mirrored on the left, and the centre tile between. range is the
ability's range less one (0 for the aimed unit alone), or RANGE_ICON_ALL for
ABILITY_RANGE_ALL (mnStatusScreenDrawPsynergyPage).
References mnWindowSetTilemapEntryStub() and Sint32.
Referenced by mnStatusScreenDrawPsynergyPage().
Definition at line 1511 of file menu_status.c.
mnStatusScreenShowPsynergyRow
Sint32 mnStatusScreenShowPsynergyRow(WINDOW *window, Sint32 unused, PAGED_LIST *state)
Updates the Psynergy page for the row under the cursor: the Psynergy's description in the info window, where it can be used (in the field, in battle, or anywhere), and the row highlights with the range icons.
References gmAbilityGetDefinitionStub(), mnTextDrawMessageAsTilesStub(), mnWindowClearInteriorTilesStub(), mnWindowSetHighlightRect(), mnWindowSetTilemapEntryStub(), mnWindowSpriteRedrawSavedRectStub(), Sint32, state and sySynch().
Referenced by mnStatusScreenRunPsynergyPage().
Definition at line 1531 of file menu_status.c.
mnStatusScreenDrawPsynergyPage
Sint32 mnStatusScreenDrawPsynergyPage(WINDOW *window, Sint32 unused, const PAGED_LIST *res)
Draws one page of the Status menu's Psynergy list into window: up to
STATUS_LIST_PAGE_ROWS names with their icons, PP costs and range icons, the
page numbers or "no Psynergy", and the party member's name, class and level.
References gmAbilityGetDefinitionStub(), gmUnitGetStub(), MenuLvString, mnPagedListDrawPageNumbers(), mnPsynergyMenuDrawRange(), mnSetPageIcons(), mnTextDrawMessageAsTilesStub(), mnTextDrawNumberAtOffsetStub(), mnTextDrawNumberInWindowStub(), mnTextDrawStringAtOffsetStub(), mnWindowSpriteRedrawSavedRectStub() and Sint32.
Referenced by mnStatusScreenRunPsynergyPage().
Definition at line 1691 of file menu_status.c.
mnStatusScreenRunPsynergyPage
Sint32 mnStatusScreenRunPsynergyPage(void)
The Status menu's Psynergy page: the party member's Psynergy,
STATUS_LIST_PAGE_ROWS to a page, each with its PP cost and range icon; the
cursor's Psynergy is described in the info window with where it can be used.
The page lists and draws the Psynergy with the Psynergy menu's own routines
and keeps each party member's row in selectedIndexByMember, which lies past
STATUS_SCREEN_STATE's end, so it and its helpers read the state as
PSYNERGY_MENU_STATE. There tabIndex, sideMemberCount, memberTable,
memberCount and memberIds are STATUS_SCREEN_STATE's memberIndex, memberCount,
memberIds, partyCount and selectedIds, and infoWindow and msgWindow its
helpWindow and selectorWindow.
References gmFlagGetStub(), gmUnitGetStub(), mnBuildPatternTiles(), mnCursorPos(), mnHideEntryIcons(), mnItemMenuHideAllIcons(), mnPagedListBuild(), mnPagedListHandleInput(), mnPlacePartyFigures(), mnPsynergyMenuCollectActions(), mnPsynergyMenuDrawPreparedPsynergyIcons(), mnReloadMemberPortrait(), mnSpawnIconEntries(), mnStatusScreenDrawPsynergyPage(), mnStatusScreenShowPsynergyRow(), mnTextDrawMessageAsTilesStub(), mnWindowSpriteClearListStub(), mnWindowSpriteRedrawSavedRectStub(), mnWindowUpdateOrCreate(), PerPush, PerRepeat, Sint32, state, syCloseEvent(), sySetEvent(), sySoundPlayStub() and sySynch().
Referenced by mnStatusScreenRunPages().
Definition at line 1793 of file menu_status.c.
mnStatusScreenPsynergyPageReturnTrue
Sint32 mnStatusScreenPsynergyPageReturnTrue(void)
Unused: returns 1.
References Sint32.
Definition at line 1930 of file menu_status.c.
mnPsynergyMenuDrawPreparedPsynergyIcons
void mnPsynergyMenuDrawPreparedPsynergyIcons(const void *unused, Sint32 memberId)
Hides every entry icon, then loads the icons of the Psynergy already listed in the state (psynergies) into them. memberId is only looked up.
References gmUnitGetStub(), mnItemMenuHideAllIcons(), mnPsynergyMenuDrawPsynergyIcons() and Sint32.
Referenced by mnStatusScreenRunPsynergyPage().
Definition at line 1937 of file menu_status.c.
mnPsynergyMenuPreparedIconsNoOperation
void mnPsynergyMenuPreparedIconsNoOperation(void)
Unused: two functions that do nothing.
Definition at line 1948 of file menu_status.c.
mnPsynergyMenuPreparedIconsSecondNoOperation
void mnPsynergyMenuPreparedIconsSecondNoOperation(void)
Definition at line 1952 of file menu_status.c.
mnStatusScreenShowEquipmentRow
Sint32 mnStatusScreenShowEquipmentRow(WINDOW *window, Sint32 unused, PAGED_LIST *state)
Updates the Status menu's equipment page for the row under the cursor: the item's plain name in the info window, the row highlights, and in the equipment window the highlight of the slot the item is worn in, if it is.
References gmItemGetDefinitionStub(), mnWindowSetHighlightRect(), mnWindowSetTilemapEntryStub(), mnWindowSpriteRedrawSavedRectStub(), Sint32, state and sySynch().
Referenced by mnStatusScreenRunEquipmentPage().
Definition at line 1959 of file menu_status.c.
mnStatusScreenDrawEquipmentPage
Sint32 mnStatusScreenDrawEquipmentPage(WINDOW *window, Sint32 unused, PAGED_LIST *state)
Draws one page of the Status menu's equipment page into window: up to
STATUS_LIST_PAGE_ROWS item names with their icons and the page numbers, or
"no items", and the party member's name with their Attack and Defense.
Returns 1.
References gmUnitGetStub(), mnPagedListDrawPageNumbers(), mnSetPageIcons(), mnTextDrawMessageAsTilesStub(), mnTextDrawNumberInWindowStub(), mnTextDrawStringAtOffsetStub(), mnWindowClearInteriorTilesStub(), Sint32 and state.
Referenced by mnStatusScreenRunEquipmentPage().
Definition at line 2100 of file menu_status.c.
mnStatusScreenRunEquipmentPage
Sint32 mnStatusScreenRunEquipmentPage(void)
The Status menu's equipment page: the party member's items in the first list
order (LIST_SORT_EQUIPPED_THEN_ITEMS), STATUS_LIST_PAGE_ROWS to a page,
beside the equipment window of what they wear.
References gmFlagGetStub(), gmUnitGetStub(), mnCursorPos(), mnHideEntryIcons(), mnItemMenuCollectItems(), mnItemMenuDrawEquipment(), mnItemMenuDrawIcons(), mnItemMenuHideAllIcons(), mnItemMenuSort(), mnPagedListBuild(), mnPagedListHandleInput(), mnPlacePartyFigures(), mnReloadMemberPortrait(), mnSpawnIconEntries(), mnStatusScreenDrawEquipmentPage(), mnStatusScreenShowEquipmentRow(), mnTextDrawMessageAsTilesStub(), mnWindowSpriteClearListStub(), mnWindowSpriteRedrawSavedRectStub(), mnWindowUpdateOrCreate(), PerPush, PerRepeat, Sint32, state, syCloseEvent(), sySetEvent(), sySoundPlayStub() and sySynch().
Referenced by mnStatusScreenRunPages().
Definition at line 2163 of file menu_status.c.
mnMoveGridCursor
Sint32 mnMoveGridCursor(Sint32 *columnOut, Sint32 *rowOut, Sint32 direction)
Moves through the status grid's irregular rows and returns row * 9 + column. Nothing calls it.
References Sint32.
Definition at line 2312 of file menu_status.c.
mnGridCursorReturnTrue
Sint32 mnGridCursorReturnTrue(void)
Unused: returns 1.
References Sint32.
Definition at line 2408 of file menu_status.c.
mnItemMenuDrawEquipment
void mnItemMenuDrawEquipment(WINDOW *window, Sint32 memberId, Sint32 mode)
Writes the four equipment slot labels (Weapon, Head, Shield and Chest, one a 16-pixel row) and the names of the items worn in them into window; mode 0 also shows their icons at the right.
References gmUnitGetStub(), mnHideEntryIcons(), mnItemMenuDrawEquippedItemNames(), mnItemMenuDrawIcons(), mnItemMenuHideAllIcons(), mnItemMenuPlaceEquippedIcons(), mnTextDrawMessageAsTilesStub(), Sint32 and sySynch().
Referenced by mnItemMenuShowEquipment() and mnStatusScreenRunEquipmentPage().
Definition at line 2423 of file menu_status.c.
mnItemMenuDrawEquippedItemNames
void mnItemMenuDrawEquippedItemNames(WINDOW *window, Uint16 *items)
Writes the name of each worn weapon, armor, shield and helm under its slot
label (mnItemMenuDrawEquipment). Other worn items are not listed.
References gmItemGetDefinitionStub(), mnTextDrawMessageAsTilesStub() and Sint32.
Referenced by mnItemMenuDrawEquipment().
Definition at line 2453 of file menu_status.c.
mnPlaceEntryIconsInGrid
void mnPlaceEntryIconsInGrid(Sint32 originX, Sint32 originY, Sint32 columns)
Places the 32 entry icons in a grid of 16x16 cells, columns wide, from (originX, originY), and shows them: the party member chooser's Psynergy icons.
References mnPlaceEntryIconInGrid() and Sint32.
Referenced by mnPartyMemberChooserChooseMember().
Definition at line 2501 of file menu_status.c.
mnPlaceEntryIconInGrid
void mnPlaceEntryIconInGrid(WINDOW_SPR *icon, Sint32 index, Sint32 originX, Sint32 originY, Sint32 columns)
Places icon at cell index (an index above 31 is taken as 0) of a grid of
ENTRY_ICON_CELL_SIZE square cells, columns wide, from (originX, originY), and
shows it.
References mnIconShow() and Sint32.
Referenced by mnPlaceEntryIconsInGrid().
Definition at line 2525 of file menu_status.c.
mnItemMenuPlaceEquippedIcons
void mnItemMenuPlaceEquippedIcons(Uint16 *items)
Places the icon of each worn weapon, armor, shield and helm at
EQUIPPED_ICON_X, on its slot's row; the others stay off screen.
References gmItemGetDefinitionStub(), mnHideEntryIcons(), mnIconShow() and Sint32.
Referenced by mnItemMenuDrawEquipment().
Definition at line 2545 of file menu_status.c.
mnHideEntryIcons
void mnHideEntryIcons(void)
Moves all 32 entry icons off screen, to MENU_ICON_HIDDEN_X and _Y, before a
screen lays them out again.
References mnIconShow() and Sint32.
Referenced by mnItemMenuDrawEquipment(), mnItemMenuPlaceEquippedIcons(), mnItemMenuShowEquipment(), mnPsynergyMenuRunSteps(), mnStatusScreenRunEquipmentPage() and mnStatusScreenRunPsynergyPage().
Definition at line 2590 of file menu_status.c.
mnStatusScreenCreateStatusIcons
Sint32 mnStatusScreenCreateStatusIcons(WINDOW *window)
Creates the eight status icon sprites in window, off screen at
MENU_ICON_HIDDEN_X and _Y, each on item graphic slot of the same number; the
Status menu shows the status icons with the first five
(mnStatusScreenLoadStatusIcons).
References mnWindowSpriteCreateFromResourceStub() and Sint32.
Referenced by mnStatusScreenShowMemberStatus().
Definition at line 2615 of file menu_status.c.
mnStatusScreenShowStatusIcons
void mnStatusScreenShowStatusIcons(const Uint8 *flags)
Shows the icon of each status that flags marks (mnStatusScreenListStatuses)
down the left edge from y 88, 16 pixels apart, beside the status labels of
mnStatusScreenDrawStatusPage.
References mnIconShow(), mnStatusScreenHideStatusIcons() and Sint32.
Referenced by mnStatusScreenDrawStatusPage().
Definition at line 2643 of file menu_status.c.
mnStatusScreenHideStatusIcons
void mnStatusScreenHideStatusIcons(void)
Moves the five status icons off screen, before they are shown again or while another view covers them.
References mnIconShow() and Sint32.
Referenced by mnStatusScreenRunStatusPage(), mnStatusScreenShowDjinnList() and mnStatusScreenShowStatusIcons().
Definition at line 2671 of file menu_status.c.
mnStatusScreenLoadStatusIcons
Sint32 mnStatusScreenLoadStatusIcons(const Uint8 *enabled)
Loads each enabled status's icon into its sprite's tile slot: kind is the
icon's number in IconMiscellaneousIconPointers, which the battle Status
screen shows for the same status.
References mnSelectionIconLoadIntoSlotStub() and Sint32.
Referenced by mnStatusScreenDrawStatusPage().
Definition at line 2693 of file menu_status.c.