Skip to Content
The Alchemy Project

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

NameDescription
#defineMEMBER_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.
#defineSTATUS_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.
#defineSTATUS_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.
#defineSTATUS_PAGE_NO_CLEAR (1 << 8)A bit over the page mode: draw without clearing the window first, as for a window just opened.
#defineSTATUS_PAGE_MODE_MASK (STATUS_PAGE_NO_CLEAR - 1)
#defineSTATUS_HELP_TEXT_MAX JAPANESE_OR(64, 128)The longest status help text, in characters.
#defineSTATUS_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.
#defineSTATUS_STAT_X JAPANESE_OR(192, 200)
#defineSTATUS_EQUIP_PAGE_SIZE JAPANESE_OR(6, 5)Items to a page of the equipment page's list.
#defineSTATUS_PSYNERGY_CURSOR_X JAPANESE_OR(58, 55)The hand cursor on the Psynergy page.
#defineSTATUS_PSYNERGY_CURSOR_Y JAPANESE_OR(52, 60)
#defineSTATUS_EQUIP_SLOT_X JAPANESE_OR(2, 1)The highlight over the equipment window's four slot rows.
#defineSTATUS_EQUIP_SLOT_WIDTH JAPANESE_OR(9, 12)
#defineSTATUS_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.
#defineSTATUS_ITEM_NAME_X JAPANESE_OR(136, 128)
#defineSTATUS_ITEM_STAT_X JAPANESE_OR(72, 80)
#defineSTATUS_ITEM_EMPTY_MESSAGE_X GERMAN_OR(112, 120)The x of "You have no items." in the equipment page's list, in pixels.
#defineSTATUS_EQUIP_WINDOW_WIDTH JAPANESE_OR(13, 15)The equipment window, and the equipped items' names in it.
#defineSTATUS_EQUIPPED_NAME_X JAPANESE_OR(16, 8)
#defineSTATUS_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.
#defineSTATUS_FIGURE_ROW_Y 128
#defineSTATUS_FIGURE_FULL_PAGE_ROW_Y 104
#defineSTATUS_FIGURE_ABOVE_SCREEN_Y -16
#defineDJINN_LIST_COLUMN_WIDTH 56The Djinn list (mnStatusScreenShowDjinnList): a column for each element, its Djinni figure standing over it.
#defineDJINN_LIST_FIGURE_X (element) (32 + (element) * DJINN_LIST_COLUMN_WIDTH)
#defineDJINN_LIST_FIGURE_Y 70
#defineELEMENT_ICON_FIRST_TILE 1The window tile of the first element icon, Venus's; the four elements follow it in order.
#defineSTATUS_ELEMENT_TILE (BG_TILE_PALETTE(1) | ELEMENT_ICON_FIRST_TILE)
#defineSWITCH_HELP_Y -24The switch help's two lines, drawn above the status window's interior.
#defineSTATUS_AILMENT_Y (row) ((row) * 16 + 40)The status page's ailments, one a row of 16 pixels from y 40.
#defineEQUIP_ROW_NAME_TILE_ROW (row) ((row) * 2 + 1)
#defineDJINN_LIST_DJINN_PER_ELEMENT 7Each element's column of the Djinn list holds its seven Djinn.
#defineSTATUS_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.
#defineSTATUS_ELEMENT_X (element) (STATUS_ELEMENT_COLUMN(element) * 8)
#defineSTAT_LABEL (n)Stat label n of "Attack", "Defense", "Agility" and "Luck" (MsgStatLabel + n), counted back from "Exp" (MsgExpLabel), which the status page also shows.
#defineEQUIPPED_ROW_Y (row) ((row) * 16)The equipment slots' rows (EQUIP_ROW_) in mnItemMenuDrawEquipment's window, 16 pixels apart.
#defineEQUIPPED_ICON_X 216
#defineEQUIPPED_ICON_Y (row) (EQUIPPED_ROW_Y(row) + 32)
#defineENTRY_ICON_CELL_SIZE 16The side of a cell of the grids mnPlaceEntryIconInGrid places icons in.

Typedefs

NameDescription
typedef Uint64EXPERIENCE_DIFFERENCE ;

Enumerations

NameDescription
enumanonymous 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.
enumanonymous 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.
enumanonymous 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.
enumanonymous enum { PSYNERGY_USABLE_IN_BATTLE, PSYNERGY_USABLE_IN_FIELD, PSYNERG … }Where a Psynergy can be used, as the Psynergy page tells it outside Japan.
enumanonymous 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.
enumSTAT_SCREEN_STEP { STATUS_STEP_MEMBER, STATUS_STEP_STATUS, STATUS_STEP_PSYNERGY … }The steps of the Status menu (mnStatusScreenRunPages).
enumanonymous 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

NameDescription
static __inline__ voidmnStatusScreenLoadIconPalettes (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).
Sint32mnPartyMemberChooserOpen (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).
Sint32mnPartyMemberChooserRun (void)The party member chooser's loop.
Sint32mnStatusScreenRun (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.
Sint32mnStatusScreenRunPages (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.
Sint32mnStatusScreenSelectMember (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.
Sint32mnStatusScreenShowDjinnList (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__ voidmnStatusScreenSetSelectedMemberRow (STATUS_SCREEN_STATE *menu, Sint32 selectedMember)Lowers the party figures, then raises the currently selected party member.
Sint32mnStatusScreenRunPartyRow (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.
Sint32mnPartyMemberChooserChooseMember (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.
BoolmnStatusScreenMovePartyMember (Sint32 selectedIndex, Sint32 direction)Moves the party member at selectedIndex one place later (direction 1) or earlier (0) in the party order.
voidmnStatusScreenInit (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.
voidmnStatusScreenShowMemberStatus (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.
Sint32mnStatusScreenRunStatusPage (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.
voidmnStatusScreenDrawSelectionCursor (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.
voidmnStatusScreenDrawSelectionLabels (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.
voidmnStatusScreenShowMemberProgressMessage (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.
voidmnStatusScreenDrawStatusPage (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.
voidmnBusyWait (void)Spins for 256 loop passes (international editions only).
voidmnStatusScreenDrawTopRows (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.
Sint32mnStatusScreenListStatuses (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.
Sint32mnPagedListBuild (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.
voidmnBuildPatternTiles (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.
voidmnPsynergyMenuDrawRange ( 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).
Sint32mnStatusScreenShowPsynergyRow (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.
Sint32mnStatusScreenDrawPsynergyPage (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.
Sint32mnStatusScreenRunPsynergyPage (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.
Sint32mnStatusScreenPsynergyPageReturnTrue (void)Unused: returns 1.
voidmnPsynergyMenuDrawPreparedPsynergyIcons (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.
voidmnPsynergyMenuPreparedIconsNoOperation (void)Unused: two functions that do nothing.
voidmnPsynergyMenuPreparedIconsSecondNoOperation (void)
Sint32mnStatusScreenShowEquipmentRow (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.
Sint32mnStatusScreenDrawEquipmentPage (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.
Sint32mnStatusScreenRunEquipmentPage (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.
Sint32mnMoveGridCursor (Sint32 *columnOut, Sint32 *rowOut, Sint32 direction)Moves through the status grid's irregular rows and returns row * 9 + column.
Sint32mnGridCursorReturnTrue (void)Unused: returns 1.
voidmnItemMenuDrawEquipment (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.
voidmnItemMenuDrawEquippedItemNames (WINDOW *window, Uint16 *items)Writes the name of each worn weapon, armor, shield and helm under its slot label (mnItemMenuDrawEquipment).
voidmnPlaceEntryIconsInGrid (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.
voidmnPlaceEntryIconInGrid (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.
voidmnItemMenuPlaceEquippedIcons (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.
voidmnHideEntryIcons (void)Moves all 32 entry icons off screen, to MENU_ICON_HIDDEN_X and _Y, before a screen lays them out again.
Sint32mnStatusScreenCreateStatusIcons (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).
voidmnStatusScreenShowStatusIcons (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.
voidmnStatusScreenHideStatusIcons (void)Moves the five status icons off screen, before they are shown again or while another view covers them.
Sint32mnStatusScreenLoadStatusIcons (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.

EnumeratorValueDescription
STATUS_PAGE_SUMMARY0
STATUS_PAGE_FULL1

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.

EnumeratorValueDescription
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.

EnumeratorValueDescription
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_LEVELSTATUS_ROW_COUNTThe 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.

EnumeratorValueDescription
PSYNERGY_USABLE_IN_BATTLE1
PSYNERGY_USABLE_IN_FIELD2
PSYNERGY_USABLE_ANYWHEREPSYNERGY_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.

EnumeratorValueDescription
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).

EnumeratorValueDescription
STATUS_STEP_MEMBER0choose a party member
STATUS_STEP_STATUS1their status page
STATUS_STEP_PSYNERGY2their Psynergy page
STATUS_STEP_EQUIPMENT3their 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.

EnumeratorValueDescription
RANGE_ICON_PAIRS6
RANGE_ICON_PAIR_WORDS2 * 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.

On this page

MacrosTypedefsEnumerationsFunctionsDescriptionMacros in detailMEMBER_CHOOSER_MEMBER_COUNTSTATUS_SAVED_TILE_BYTESSTATUS_SAVED_PALETTE_BYTESSTATUS_PAGE_NO_CLEARSTATUS_PAGE_MODE_MASKSTATUS_HELP_TEXT_MAXSTATUS_STAT_DIGITSSTATUS_STAT_XSTATUS_EQUIP_PAGE_SIZESTATUS_PSYNERGY_CURSOR_XSTATUS_PSYNERGY_CURSOR_YSTATUS_EQUIP_SLOT_XSTATUS_EQUIP_SLOT_WIDTHSTATUS_ITEM_PAGE_ICONS_XSTATUS_ITEM_NAME_XSTATUS_ITEM_STAT_XSTATUS_ITEM_EMPTY_MESSAGE_XSTATUS_EQUIP_WINDOW_WIDTHSTATUS_EQUIPPED_NAME_XSTATUS_FIGURE_XSTATUS_FIGURE_ROW_YSTATUS_FIGURE_FULL_PAGE_ROW_YSTATUS_FIGURE_ABOVE_SCREEN_YDJINN_LIST_COLUMN_WIDTHDJINN_LIST_FIGURE_XDJINN_LIST_FIGURE_YELEMENT_ICON_FIRST_TILESTATUS_ELEMENT_TILESWITCH_HELP_YSTATUS_AILMENT_YEQUIP_ROW_NAME_TILE_ROWDJINN_LIST_DJINN_PER_ELEMENTSTATUS_ELEMENT_COLUMNSTATUS_ELEMENT_XSTAT_LABELEQUIPPED_ROW_YEQUIPPED_ICON_XEQUIPPED_ICON_YENTRY_ICON_CELL_SIZETypedefs in detailEXPERIENCE_DIFFERENCEEnumerations in detailanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumSTAT_SCREEN_STEPanonymous enumFunctions in detailmnStatusScreenLoadIconPalettesmnPartyMemberChooserOpenmnPartyMemberChooserRunmnStatusScreenRunmnStatusScreenRunPagesmnStatusScreenSelectMembermnStatusScreenShowDjinnListmnStatusScreenSetSelectedMemberRowmnStatusScreenRunPartyRowmnPartyMemberChooserChooseMembermnStatusScreenMovePartyMembermnStatusScreenInitmnStatusScreenShowMemberStatusmnStatusScreenRunStatusPagemnStatusScreenDrawSelectionCursormnStatusScreenDrawSelectionLabelsmnStatusScreenShowMemberProgressMessagemnStatusScreenDrawStatusPagemnBusyWaitmnStatusScreenDrawTopRowsmnStatusScreenListStatusesmnPagedListBuildmnBuildPatternTilesmnPsynergyMenuDrawRangemnStatusScreenShowPsynergyRowmnStatusScreenDrawPsynergyPagemnStatusScreenRunPsynergyPagemnStatusScreenPsynergyPageReturnTruemnPsynergyMenuDrawPreparedPsynergyIconsmnPsynergyMenuPreparedIconsNoOperationmnPsynergyMenuPreparedIconsSecondNoOperationmnStatusScreenShowEquipmentRowmnStatusScreenDrawEquipmentPagemnStatusScreenRunEquipmentPagemnMoveGridCursormnGridCursorReturnTruemnItemMenuDrawEquipmentmnItemMenuDrawEquippedItemNamesmnPlaceEntryIconsInGridmnPlaceEntryIconInGridmnItemMenuPlaceEquippedIconsmnHideEntryIconsmnStatusScreenCreateStatusIconsmnStatusScreenShowStatusIconsmnStatusScreenHideStatusIconsmnStatusScreenLoadStatusIcons