Alchemy
Loading...
Searching...
No Matches

item_menu.c File Reference

The battle item menu. More...

Go to the source code of this file.

Functions

s32 Item_ClassifyUseAbility (s32 unit, s32 item)
 Checks whether an item can be used in battle.
void Vram_CopyTile (u32 sourceTile, u32 destinationTile)
 Copies one 4bpp VRAM tile, ignoring the palette and flip bits of each entry.
s32 ItemList_SelectEntry (s32 owner, u16 *entries, s32 count)
 Chooses an inventory-list position for battle use, or -1 on cancel.

Detailed Description

The battle item menu.

Part of battle_command.c, the menu object, compiled only through it.

Definition in file item_menu.c.

Function Documentation

◆ Item_ClassifyUseAbility()

s32 Item_ClassifyUseAbility ( s32 unit,
s32 item )

Checks whether an item can be used in battle.

Return: 0 usable, 1 unusable, 2 unusable in battle. unit: character index item: inventory item value

Definition at line 11 of file item_menu.c.

Referenced by Battle_CollectPartyCommands(), Item_ClassifyUseAbility(), ItemList_SelectEntry(), and NameEntry_CountLetters().

◆ Vram_CopyTile()

void Vram_CopyTile ( u32 sourceTile,
u32 destinationTile )

Copies one 4bpp VRAM tile, ignoring the palette and flip bits of each entry.

Definition at line 38 of file item_menu.c.

Referenced by BattleMenu_RunActionSelection(), ItemList_SelectEntry(), NameEntry_CountLetters(), and Vram_CopyTile().

◆ ItemList_SelectEntry()

s32 ItemList_SelectEntry ( s32 owner,
u16 * entries,
s32 count )

Chooses an inventory-list position for battle use, or -1 on cancel.

Keeps unavailable items visible with their help text, but rejects confirmation.

Definition at line 46 of file item_menu.c.

Referenced by Battle_CollectPartyCommands(), ItemList_SelectEntry(), and NameEntry_CountLetters().