src/itemUtils.c file

Item Utils.

Functions

auto GetSaleItemConfirmMessageID(u32 item) -> u32
Get the item purchase enquiry message.
auto GetItemPrice(u32 item) -> s32
Get item price.
auto GiveItem(Item item, u32 param_2) -> u32
void sub_08054288(s32 param_1)
auto getItemMetaDataGetTextIndex(s32 itemIndex) -> u32
auto IsMinishItem(u32 param_1) -> u32
void ModShells(s32 shells)
void ModBombs(s32 bombs)
void ModArrows(s32 arrows)
auto IsItemEquipped(u32 itemId) -> EquipSlot
Returns the slot the item is equipped in.
void PutItemOnSlot(u32 item)
Put an item in A or B slot.
void ForceEquipItem(u32 item, u32 slot)
Force equip an item.
auto SetBottleContents(u32 itemId, u32 bottleIndex) -> u32
auto ItemIsSword(u32 item) -> bool32
Check if item is a sword.
auto ItemIsShield(u32 item) -> bool32
Check if item is a shield.
auto ItemIsBottle(u32 id) -> bool32
auto GetBottleContaining(u32 item) -> u32
Get the index of the bottle containing the specified item.
void sub_08054524(void)
void DisableRandomDrops(void)
void EnableRandomDrops(void)
void SumDropProbabilities(s16*, const s16*, const s16*, const s16*)
auto SumDropProbabilities2(s16*, const s16*, const s16*, const s16*) -> u32
auto CreateItemDrop(Entity* arg0, u32 itemId, u32 itemParameter) -> u32
auto CreateRandomItemDrop(Entity* arg0, u32 arg1) -> u32

Variables

const Wallet gWalletSizes
const u8 gBombBagSizes
const u8 gQuiverSizes
const u16 gUnk_080FD5A8
u8 gUnk_080FE1C6
u8 gUnk_080FE1DD

Function documentation

u32 GetSaleItemConfirmMessageID(u32 item)

Get the item purchase enquiry message.

Parameters
item The item to get the message for.
Returns The message index.

s32 GetItemPrice(u32 item)

Get item price.

Parameters
item The item to get the price of.
Returns The price of the item.

EquipSlot IsItemEquipped(u32 itemId)

Returns the slot the item is equipped in.

0: A 1: B 2: Not equipped

void PutItemOnSlot(u32 item)

Put an item in A or B slot.

Parameters
item The item to put.

void ForceEquipItem(u32 item, u32 slot)

Force equip an item.

Parameters
item The item to equip.
slot The slot to equip the item in.

bool32 ItemIsSword(u32 item)

Check if item is a sword.

Parameters
item The item to check.
Returns True if the item is a sword.

bool32 ItemIsShield(u32 item)

Check if item is a shield.

Returns True if the item is a shield.

u32 GetBottleContaining(u32 item)

Get the index of the bottle containing the specified item.

Parameters
item The item to check.
Returns Bottle index, or 0 if the item is not in a bottle.