Skip to Content
The Alchemy Project

src/window/screens_internal.h

What every part of the screens object shares: its includes, macros, local types and tables. More…

Included by screens.c.

Structures

NameDescription
structBATTLE_COMMAND_ROW_ICONOne icon of the command row (BATTLE_COMMAND_ROW_STATE): its sprite, where it stands and the command it stands for.
structCOMMAND_ROW_AFFINEThe pulsing icon's transform: its scale, 8.8 fixed point, and angle.
structBATTLE_COMMAND_ROW_STATEThe command row's state: the icons' shared palette, up to six icons, the label window, the pulsing icon's transform and the selection.
structSUMMARY_OAMA sprite as the summary screen queues it (syOAMAddSpriteAtDepth): the depth queue's link, then its OAM attributes as words or as fields.
structSUMMARY_POINTWhere the Status screen's cursor points, in pixels.
structSTAT_CURSORThe Status screen's cursor: its place in each group, the help entry it shows and where it points.
structFILE_LIST_STATEThe menus' state (heap slot HEAP_SLOT_MENU) as the file list reads it: the party row of the shop's SHOP_STATE (shop/shop_internal.h), holding the party sprites of the file under the cursor, where each stands and its scale.
structTARGET_POINTA unit's place projected onto the screen, as the target cursor reads it.
structTARGET_TRACKOne of the target cursor's markers: where it stands, whether it shows and which listed unit it marks.
structWINDOW_LINEOne line's horizontal window edges, each a WIN_RANGE value.
structWINDOW_BUFFERA page of the icon menu's window shape: one WINDOW_LINE for each of the screen's 160 lines.

Macros

NameDescription
#defineBATTLE_MENU_MESSAGE_CAPACITY JAPANESE_OR(32, 52)The battle menus' message buffers, in halfwords, and the copier that fills them: the Japanese edition decodes the message (mnMessageDecodeRaw), the others copy its text (mnMessageCopyExpanded).
#defineBATTLE_MENU_MESSAGE_COPY
#defineDJINN_MENU_ARROW_TILE 808The two BG tiles of the Djinn menu's arrow: DJINN_MENU_ARROW_TILE blinks, the one after it stays (DjinnMenuBlinkTile).
#defineDJINN_COUNT_TENS_TILE 416That tile, and its place in VRAM.
#defineDJINN_COUNT_TENS_VRAM
#defineDJINN_COUNT_TILE (n)The window tilemap entry of standby count n: a digit, or a tile from DJINN_COUNT_TENS_TILE for 10 on.

Functions

NameDescription
WINDOW_SPR *mnWindowSpriteAcquireFree (void)The screens object calls these window functions with no declaration in scope, as its bytes need; a current GCC gets them here.
voidmnWindowSpriteReleaseFree (WINDOW_SPR *sprite)Returns a window sprite to the end of the free list.
voidmnWindowSpriteAppendToList (WINDOW_SPR_LIST *list, WINDOW_SPR *sprite)Adds a window sprite to the end of a list; NULL lists are ignored.
voidmnWindowMapTextCanvasTiles ( Sint32 x, Sint32 y, Uint32 width, Uint32 height, Sint32 whole)Maps the text canvas tiles into the interior of a window at tile (x, y).

Variables

NameDescription
extern const Uint8DjinnMenuBlinkTile [32]The arrow tile mnBattleDjinnMenuRun copies to the two BG tiles from DJINN_MENU_ARROW_TILE each tick: the first blinks (four ticks shown, four blank), the second stays.
extern Uint8DjinnMenuElementXOffsets [4]Where each element's icon and standby count sit in the party status window's Djinn column, in tiles, for the Djinn menu to blink them.
extern Uint8DjinnMenuElementYOffsets [4]Each element's icon row in the Djinn menu, in tiles.
extern const Uint16SummonAbilities []The ability of each summon, by its number.
extern const Uint8MenuTitleBobOffsets []The heading pair's bob (mnTitleBob), in pixels, a step every four frames.
extern const BAR_PATTERN_ROWMenuBarPatternRows []The rows the range icons are marked with (mnRangeIconBuildTiles).
extern const Uint8PartyStatusDigitTiles []The standby Djinn counts 10 to 18, one tile each, from BG tile DJINN_COUNT_TENS_TILE: the party status window loads them (PartyStatusDigitTiles) when a count passes 9.
extern const Uint8WindowProgressBarRows []The saving screen's progress bar: its seven stages, a row of tile numbers each.
extern const Uint8WindowProgressBarTiles []The progress bar's tiles, compressed.
extern Uint8mnScanlineWindowBuildSpansCode []The ARM function that reads the windows' edges off the UI tilemap for each scan line (window_spans.c), copied to RAM before it runs.
extern const Uint8IconBrowserItemTitle []The debug icon browser's headings and page label.
extern const Uint8IconBrowserEnergyTitle []
extern const Uint8IconBrowserStatusTitle []
extern const Uint8IconBrowserPageLabel []The page number's label.
extern const Uint8IconBrowserRangeDash []Between the first and last number of a page's range.
extern Sint8MenuSaveSlotActionByPosition []The File Screen's icon menu: the action at each icon position.

Description

What every part of the screens object shares: its includes, macros, local types and tables. screens.c includes it before the parts, and each part can resolve against it.

Macros in detail

BATTLE_MENU_MESSAGE_CAPACITY

#define BATTLE_MENU_MESSAGE_CAPACITY JAPANESE_OR(32, 52)

The battle menus' message buffers, in halfwords, and the copier that fills them: the Japanese edition decodes the message (mnMessageDecodeRaw), the others copy its text (mnMessageCopyExpanded).

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

Definition at line 161 of file screens_internal.h.

BATTLE_MENU_MESSAGE_COPY

#define BATTLE_MENU_MESSAGE_COPY

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

Definition at line 162 of file screens_internal.h.

DJINN_MENU_ARROW_TILE

#define DJINN_MENU_ARROW_TILE 808

The two BG tiles of the Djinn menu's arrow: DJINN_MENU_ARROW_TILE blinks, the one after it stays (DjinnMenuBlinkTile).

Referenced by mnBattleDjinnMenuShowChangePreview().

Definition at line 167 of file screens_internal.h.

DJINN_COUNT_TENS_TILE

#define DJINN_COUNT_TENS_TILE 416

That tile, and its place in VRAM.

Definition at line 194 of file screens_internal.h.

DJINN_COUNT_TENS_VRAM

#define DJINN_COUNT_TENS_VRAM

Referenced by mnPartyStatusDraw().

Definition at line 195 of file screens_internal.h.

DJINN_COUNT_TILE

#define DJINN_COUNT_TILE(n)

The window tilemap entry of standby count n: a digit, or a tile from DJINN_COUNT_TENS_TILE for 10 on.

Referenced by mnBattleSummonMenuRun() and mnPartyStatusDraw().

Definition at line 200 of file screens_internal.h.

Variables in detail

DjinnMenuBlinkTile

extern const Uint8 DjinnMenuBlinkTile[32]

The arrow tile mnBattleDjinnMenuRun copies to the two BG tiles from DJINN_MENU_ARROW_TILE each tick: the first blinks (four ticks shown, four blank), the second stays.

Referenced by mnBattleDjinnMenuRun().

Definition at line 172 of file screens_internal.h.

PartyStatusDigitTiles

extern const Uint8 PartyStatusDigitTiles[]

The standby Djinn counts 10 to 18, one tile each, from BG tile DJINN_COUNT_TENS_TILE: the party status window loads them (PartyStatusDigitTiles) when a count passes 9.

Referenced by mnPartyStatusDraw().

Definition at line 191 of file screens_internal.h.

WindowProgressBarTiles

extern const Uint8 WindowProgressBarTiles[]

The progress bar's tiles, compressed.

Referenced by mnSaveProgressOpen().

Definition at line 209 of file screens_internal.h.

mnScanlineWindowBuildSpansCode

extern Uint8 mnScanlineWindowBuildSpansCode[]

The ARM function that reads the windows' edges off the UI tilemap for each scan line (window_spans.c), copied to RAM before it runs.

Referenced by mnScanlineWindowFillSpans().

Definition at line 213 of file screens_internal.h.