Skip to Content
The Alchemy Project

src/window/screens_battle_item_menu.c

The battle item menu. More…

Included by screens.c.

Macros

NameDescription
#defineREFUSAL_TEXT_LENGTH WHEN(LONG_BATTLE_ITEM_REFUSAL, 52, 32)How much of a refusal is copied: more in German, Spanish, French and Italian.

Functions

NameDescription
Sint32mnItemCheckBattleUse (Sint32 unit, Sint32 itemId)Says whether party member unit can use inventory entry itemId in battle: ITEM_BATTLE_USE_OK; ITEM_BATTLE_USE_NO_EFFECT, "Using this will have no effect." (no item, an item that only teaches Psynergy while equipped, one with no action, or equipment the party member cannot equip); or ITEM_BATTLE_USE_NOT_IN_BATTLE, "Cannot be used during battle." (its action lacks ABILITY_USABLE_IN_BATTLE).
voidmnVRAMCopyTile (Uint32 srcTile, Uint32 destTile)Copies one 4bpp tile of BG character block 0 to another, each given as a tilemap entry whose palette and flip bits are ignored.
Sint32mnBattleItemMenuRun (Sint32 member, Uint16 *entries, Sint32 count)The battle item list for unit member: count inventory entries (ended by 0), five to a page, each with its icon and name: plain when usable, TEXT_COLOR_YELLOW when mnItemCheckBattleUse refuses it, TEXT_COLOR_RED when broken; the window above names the one under the cursor (MsgItemDescription), or says it cannot be used in battle.

Description

The battle item menu. Part of screens.c.

Macros in detail

REFUSAL_TEXT_LENGTH

#define REFUSAL_TEXT_LENGTH WHEN(LONG_BATTLE_ITEM_REFUSAL, 52, 32)

How much of a refusal is copied: more in German, Spanish, French and Italian.

Referenced by mnBattleItemMenuRun().

Definition at line 52 of file screens_battle_item_menu.c.

Functions in detail

mnItemCheckBattleUse

Sint32 mnItemCheckBattleUse(Sint32 unit, Sint32 itemId)

Says whether party member unit can use inventory entry itemId in battle: ITEM_BATTLE_USE_OK; ITEM_BATTLE_USE_NO_EFFECT, "Using this will have no effect." (no item, an item that only teaches Psynergy while equipped, one with no action, or equipment the party member cannot equip); or ITEM_BATTLE_USE_NOT_IN_BATTLE, "Cannot be used during battle." (its action lacks ABILITY_USABLE_IN_BATTLE).

References gmAbilityGetDefinitionStub(), gmItemCanUnitEquipStub(), gmItemGetDefinitionStub() and Sint32.

Referenced by mnBattleCollectPartyCommands(), mnBattleItemMenuRun() and mnBattleStatusScreenRun().

Definition at line 9 of file screens_battle_item_menu.c.

mnVRAMCopyTile

void mnVRAMCopyTile(Uint32 srcTile, Uint32 destTile)

Copies one 4bpp tile of BG character block 0 to another, each given as a tilemap entry whose palette and flip bits are ignored.

References syDMAXCopy().

Referenced by mnBattleItemMenuRun() and mnBattlePsynergyMenuRun().

Definition at line 42 of file screens_battle_item_menu.c.

mnBattleItemMenuRun

Sint32 mnBattleItemMenuRun(Sint32 member, Uint16 *entries, Sint32 count)

The battle item list for unit member: count inventory entries (ended by 0), five to a page, each with its icon and name: plain when usable, TEXT_COLOR_YELLOW when mnItemCheckBattleUse refuses it, TEXT_COLOR_RED when broken; the window above names the one under the cursor (MsgItemDescription), or says it cannot be used in battle.

References gmItemGetDefinitionStub(), mnItemCheckBattleUse(), mnItemIconLoadIntoSlot(), mnTextDrawMessageAsTiles(), mnTextDrawWideStringAtOffset(), mnTextFillCanvasBackground(), mnTextSetColor(), mnVRAMCopyTile(), mnWindowClose(), mnWindowCreate(), mnWindowHighlightRect(), mnWindowSetTilemapEntry(), mnWindowSpriteRedrawSavedRect(), PerWork, PointingHandTiles, result, Sint32, syInputResetKeyRepeat(), syOAMAddSpriteAtDepth(), sySoundPlayStub(), sySynch(), syVRAMCacheAllocateEntry(), syVRAMCacheFreeEntry(), syVRAMCacheReload() and TickCount.

Referenced by mnBattleCollectPartyCommands().

Definition at line 59 of file screens_battle_item_menu.c.