Skip to Content
The Alchemy Project

src/window/screens_battle_command_row.c

The row of command icons the player picks a command from. More…

Included by screens.c.

Macros

NameDescription
#defineWINDOW_X JAPANESE_OR(23, 22)The tile column where a party member's command row ends and its name window begins.
#defineCOMMAND_ICON_SPACING 24The command icons stand 24 pixels apart on the row.

Functions

NameDescription
WINDOW *mnMessageShowAndWait (Sint32 msg, Sint32 x, Sint32 y)Opens a message at (x, y), waits for its text to finish, and returns its window so the caller can hold it open for a separate prompt.
Sint32mnBattleCommandRowRun (Sint32 mode)Runs a battle command row: the commands as icons along the bottom of the screen, the selected one pulsing as a sprite and named in a window, until a command is chosen: returns its icon (COMMAND_ICON), COMMAND_ROW_CANCELLED or COMMAND_ROW_STATUS.
voidmnWindowHighlightRect ( Sint32 x, Sint32 y, Sint32 width, Sint32 height, Sint32 paletteBit)Switches the UI tilemap entries of the width x height tile rectangle at screen tile (x, y) to WINDOW_PALETTE or HIGHLIGHT_PALETTE by bit 12, keeping the rest of each entry: the menus' row highlight.
Sint32mnPartyStatusHighlightMembers (Uint16 *ids)Clears the highlight from the party status window's party member columns, then highlights the columns of the units in ids (up to four, ended by BATTLE_UNIT_LIST_END): the party member whose commands are being chosen.

Description

The row of command icons the player picks a command from. Part of screens.c.

Macros in detail

WINDOW_X

#define WINDOW_X JAPANESE_OR(23, 22)

The tile column where a party member's command row ends and its name window begins.

Referenced by mnBattleCommandRowRun().

Definition at line 17 of file screens_battle_command_row.c.

COMMAND_ICON_SPACING

#define COMMAND_ICON_SPACING 24

The command icons stand 24 pixels apart on the row.

Referenced by mnBattleCommandRowRun().

Definition at line 20 of file screens_battle_command_row.c.

Functions in detail

mnMessageShowAndWait

WINDOW *mnMessageShowAndWait(Sint32 msg, Sint32 x, Sint32 y)

Opens a message at (x, y), waits for its text to finish, and returns its window so the caller can hold it open for a separate prompt.

References mnMessageAllTyped(), mnMessageOpenWindow(), Sint32 and sySynch().

Referenced by mnBattleCollectPartyCommands() and mnBattleCommandRowRun().

Definition at line 5 of file screens_battle_command_row.c.

mnBattleCommandRowRun

Sint32 mnBattleCommandRowRun(Sint32 mode)

Runs a battle command row: the commands as icons along the bottom of the screen, the selected one pulsing as a sprite and named in a window, until a command is chosen: returns its icon (COMMAND_ICON), COMMAND_ROW_CANCELLED or COMMAND_ROW_STATUS.

References BgScrollWork, btDjinnCountStandbyStub(), btMessageWaitForAdvanceAtStub(), gmDjinnGetRecoveryTableStub(), mnBattleCommandRowLoadIcon(), mnCommandRowPutBg1Behind(), mnCommandRowPutBg1InFront(), mnMessageShowAndWait(), mnTextDrawMessageAsTiles(), mnWindowClose(), mnWindowCreate(), mnWindowSpritePrepareForRedraw(), PerPush, PerRepeat, Sint32, state, syCloseEvent(), syHeapAllocateEWRAM(), syHeapRelease(), syIntFunction(), syIOWriteQueueStore16(), syOAMAddSpriteAtDepth(), syOAMMatrixAllocateFromTransform(), sySetEvent(), sySoundPlayStub(), sySynch(), syVRAMCacheAllocateEntry(), syVRAMCacheFreeEntry(), TickCount and WindowSpriteBounceScales.

Referenced by mnBattleCollectPartyCommands().

Definition at line 26 of file screens_battle_command_row.c.

mnWindowHighlightRect

void mnWindowHighlightRect( Sint32 x, Sint32 y, Sint32 width, Sint32 height, Sint32 paletteBit)

Switches the UI tilemap entries of the width x height tile rectangle at screen tile (x, y) to WINDOW_PALETTE or HIGHLIGHT_PALETTE by bit 12, keeping the rest of each entry: the menus' row highlight. paletteBit is the palette, of which only the low bit counts.

References Sint32, state and width.

Referenced by mnBattleDjinnMenuRun(), mnBattleItemMenuRun(), mnBattlePsynergyMenuRun(), mnBattleStatusScreenRun(), mnBattleSummonMenuRun() and mnPartyStatusHighlightMembers().

Definition at line 417 of file screens_battle_command_row.c.

mnPartyStatusHighlightMembers

Sint32 mnPartyStatusHighlightMembers(Uint16 *ids)

Clears the highlight from the party status window's party member columns, then highlights the columns of the units in ids (up to four, ended by BATTLE_UNIT_LIST_END): the party member whose commands are being chosen.

References btUnitListIdsStub(), mnWindowHighlightRect() and Sint32.

Referenced by mnBattleCollectPartyCommands().

Definition at line 477 of file screens_battle_command_row.c.