mirror of
https://github.com/pret/pokeruby.git
synced 2026-03-21 17:54:19 -05:00
54 lines
1.4 KiB
C
54 lines
1.4 KiB
C
#ifndef GUARD_ITEM_H
|
|
#define GUARD_ITEM_H
|
|
|
|
// These constants are used in gItems
|
|
enum
|
|
{
|
|
POCKET_ITEMS = 1,
|
|
POCKET_POKE_BALLS,
|
|
POCKET_TM_HM,
|
|
POCKET_BERRIES,
|
|
POCKET_KEY_ITEMS,
|
|
};
|
|
|
|
typedef void (*ItemUseFunc)(u8);
|
|
|
|
struct BagPocket
|
|
{
|
|
struct ItemSlot *itemSlots;
|
|
u8 capacity;
|
|
};
|
|
|
|
#define NUM_BAG_POCKETS 5
|
|
|
|
void CopyItemName(u16 itemId, u8 *string);
|
|
bool8 IsBagPocketNonEmpty(u8 pocket);
|
|
bool8 CheckBagHasItem(u16 itemId, u16 count);
|
|
bool8 CheckBagHasSpace(u16 itemId, u16 count);
|
|
bool8 AddBagItem(u16 itemId, u16 count);
|
|
bool8 RemoveBagItem(u16 itemId, u16 count);
|
|
u8 GetPocketByItemId(u16 itemId);
|
|
void ClearItemSlots(struct ItemSlot *itemSlots, u8 b);
|
|
u8 CountUsedPCItemSlots(void);
|
|
bool8 CheckPCHasItem(u16 itemId, u16 count);
|
|
bool8 AddPCItem(u16 itemId, u16 count);
|
|
void RemovePCItem(u8 index, u16 count);
|
|
void SwapRegisteredBike(void);
|
|
const u8 *ItemId_GetName(u16 itemId);
|
|
u16 ItemId_GetId(u16 itemId);
|
|
u16 ItemId_GetPrice(u16 itemId);
|
|
u8 ItemId_GetHoldEffect(u16 itemId);
|
|
u8 ItemId_GetHoldEffectParam(u16 itemId);
|
|
const u8 *ItemId_GetDescription(u16 itemId);
|
|
bool32 ItemId_CopyDescription(u8 *a, u32 itemId, u32 c);
|
|
u8 ItemId_GetImportance(u16 itemId);
|
|
u8 ItemId_GetExitsBagOnUse(u16 itemId);
|
|
u8 ItemId_GetPocket(u16 itemId);
|
|
u8 ItemId_GetType(u16 itemId);
|
|
ItemUseFunc ItemId_GetFieldFunc(u16 itemId);
|
|
u8 ItemId_GetBattleUsage(u16 itemId);
|
|
ItemUseFunc ItemId_GetBattleFunc(u16 itemId);
|
|
u8 ItemId_GetSecondaryId(u16 itemId);
|
|
|
|
#endif // GUARD_ITEM_H
|