Skip to Content
The Alchemy Project

src/window/screens_battle_djinn_menu.c

The battle Djinn menu. More…

Included by screens.c.

Macros

NameDescription
#defineDJINN_RECOVERY_DIGITS JAPANESE_OR(2, 1)A recovering Djinni's turns left: its digits and their x in the list, in pixels.
#defineDJINN_RECOVERY_X JAPANESE_OR(40, 48)
#definePARTY_STATUS_LAYOUT (*(PARTY_STAT_WINDOW **)PartyStatusState)The party status window's layout, whose Djinn column the menu blinks.
#defineBATTLE_DJINN_ENTRY_ELEMENT (entry) (((entry) & 0xf00) >> 8)A battle Djinn entry packs a Djinni's DJINN_COMMAND (bits 11..8 its element, 7..0 its number in the element, DJINN_COMMAND_INDEX), its standby bit and its recovery turns.
#defineBATTLE_DJINN_ENTRY_STANDBY 0x10000The Djinni is on standby or recovering, not Set.
#defineBATTLE_DJINN_ENTRY_RECOVERY_MASK 0x3e0000bits 21..17: turns until a recovering Djinni is back; 0 when ready.
#defineBATTLE_DJINN_ENTRY_RECOVERY_SHIFT 17
#defineBATTLE_DJINN_ENTRY_END 0x80000000ends the list

Functions

NameDescription
Sint32mnBattleDjinnMenuRun (Sint32 member, Sint32 unused)The battle Djinn menu for unit member: its Djinn in element and number order, five to a page, set ones plain, standby ones in TEXT_COLOR_RED and recovering ones in TEXT_COLOR_YELLOW with their turns, the one under the cursor described above the list with its change preview beside it (mnBattleDjinnMenuShowChangePreview; holding R shows the Psynergy pages, Left and Right turn them).

Description

The battle Djinn menu. Part of screens.c.

Macros in detail

DJINN_RECOVERY_DIGITS

#define DJINN_RECOVERY_DIGITS JAPANESE_OR(2, 1)

A recovering Djinni's turns left: its digits and their x in the list, in pixels.

Referenced by mnBattleDjinnMenuRun().

Definition at line 5 of file screens_battle_djinn_menu.c.

DJINN_RECOVERY_X

#define DJINN_RECOVERY_X JAPANESE_OR(40, 48)

Referenced by mnBattleDjinnMenuRun().

Definition at line 6 of file screens_battle_djinn_menu.c.

PARTY_STATUS_LAYOUT

#define PARTY_STATUS_LAYOUT (*(PARTY_STAT_WINDOW **)PartyStatusState)

The party status window's layout, whose Djinn column the menu blinks.

Referenced by mnBattleDjinnMenuRun().

Definition at line 9 of file screens_battle_djinn_menu.c.

BATTLE_DJINN_ENTRY_ELEMENT

#define BATTLE_DJINN_ENTRY_ELEMENT(entry) (((entry) & 0xf00) >> 8)

A battle Djinn entry packs a Djinni's DJINN_COMMAND (bits 11..8 its element, 7..0 its number in the element, DJINN_COMMAND_INDEX), its standby bit and its recovery turns.

Referenced by mnBattleDjinnMenuRun().

Definition at line 14 of file screens_battle_djinn_menu.c.

BATTLE_DJINN_ENTRY_STANDBY

#define BATTLE_DJINN_ENTRY_STANDBY 0x10000

The Djinni is on standby or recovering, not Set.

Referenced by mnBattleDjinnMenuRun().

Definition at line 16 of file screens_battle_djinn_menu.c.

BATTLE_DJINN_ENTRY_RECOVERY_MASK

#define BATTLE_DJINN_ENTRY_RECOVERY_MASK 0x3e0000

bits 21..17: turns until a recovering Djinni is back; 0 when ready.

Referenced by mnBattleDjinnMenuRun().

Definition at line 18 of file screens_battle_djinn_menu.c.

BATTLE_DJINN_ENTRY_RECOVERY_SHIFT

#define BATTLE_DJINN_ENTRY_RECOVERY_SHIFT 17

Referenced by mnBattleDjinnMenuRun().

Definition at line 19 of file screens_battle_djinn_menu.c.

BATTLE_DJINN_ENTRY_END

#define BATTLE_DJINN_ENTRY_END 0x80000000

ends the list

Referenced by mnBattleDjinnMenuRun().

Definition at line 20 of file screens_battle_djinn_menu.c.

Functions in detail

mnBattleDjinnMenuRun

Sint32 mnBattleDjinnMenuRun(Sint32 member, Sint32 unused)

The battle Djinn menu for unit member: its Djinn in element and number order, five to a page, set ones plain, standby ones in TEXT_COLOR_RED and recovering ones in TEXT_COLOR_YELLOW with their turns, the one under the cursor described above the list with its change preview beside it (mnBattleDjinnMenuShowChangePreview; holding R shows the Psynergy pages, Left and Right turn them).

References DjinnMenuBlinkTile, DjinnMenuElementXOffsets, DjinnMenuElementYOffsets, gmDjinnGetRecoveryTableStub(), gmUnitGetStub(), mnBattleDjinnMenuShowChangePreview(), mnMessageArgumentClearAll(), mnMessageArgumentPush(), mnMessageCopyExpanded(), mnTextDrawMessageAsTiles(), mnTextDrawNumberAtOffset(), mnTextDrawWideStringAtOffset(), mnTextFillCanvasBackground(), mnTextSetColor(), mnTextUseExtraTiles(), mnWindowClose(), mnWindowCreate(), mnWindowHighlightRect(), mnWindowMarkVisibleTextTiles(), mnWindowSetTilemapEntry(), mnWindowSpriteClearList(), mnWindowSpriteRedrawSavedRect(), PerData, PerPush, PerRepeat, PointingHandTiles, Sint32, state, syHeapAllocateEWRAM(), syHeapRelease(), syInputResetKeyRepeat(), syOAMAddSpriteAtDepth(), sySoundPlayStub(), sySynch(), syVRAMCacheAllocateEntry(), syVRAMCacheFreeEntry(), syVRAMCacheReload(), syWordsCopy(), syWordsFill() and TickCount.

Referenced by mnBattleCollectPartyCommands().

Definition at line 28 of file screens_battle_djinn_menu.c.