2021-07-07 16:39:34 +00:00
|
|
|
#ifndef GUARD_ITEMS_H
|
|
|
|
#define GUARD_ITEMS_H
|
2021-05-15 23:59:55 +00:00
|
|
|
|
2021-07-17 16:45:13 +00:00
|
|
|
#include "code_8092334.h"
|
2023-09-21 02:26:35 +00:00
|
|
|
#include "structs/str_items.h"
|
|
|
|
#include "structs/str_pokemon.h"
|
|
|
|
#include "structs/subStruct_203B240.h"
|
2021-11-14 00:59:20 +00:00
|
|
|
|
2023-09-02 05:46:26 +00:00
|
|
|
extern TeamInventory *gTeamInventoryRef;
|
2023-01-28 23:29:52 +00:00
|
|
|
|
2021-06-10 03:54:21 +00:00
|
|
|
void LoadItemParameters(void);
|
2023-09-02 05:46:26 +00:00
|
|
|
TeamInventory *GetMoneyItemsInfo(void);
|
2021-06-10 03:54:21 +00:00
|
|
|
void InitializeMoneyItems(void);
|
2021-10-20 00:48:38 +00:00
|
|
|
s32 GetNumberOfFilledInventorySlots(void);
|
2023-01-08 09:23:00 +00:00
|
|
|
bool8 IsThrowableItem(u8 id);
|
2023-09-02 05:46:26 +00:00
|
|
|
void xxx_init_itemslot_8090A8C(Item *param_1,u8 id,u8 param_3);
|
|
|
|
void xxx_init_helditem_8090B08(BulkItem *param_1,u8 id);
|
|
|
|
void HeldItemToSlot(Item *param_1, BulkItem *param_2);
|
|
|
|
void SlotToHeldItem(BulkItem *held, Item *slot);
|
2023-01-08 09:23:00 +00:00
|
|
|
u8 GetItemCategory(u8 index);
|
2023-09-02 05:46:26 +00:00
|
|
|
s32 GetStackBuyValue(Item *param_1);
|
|
|
|
s32 GetStackSellValue(Item *param_1);
|
|
|
|
s32 GetStackBuyPrice(Item *param_1);
|
|
|
|
s32 GetStackSellPrice(Item *param_1);
|
2023-01-08 09:23:00 +00:00
|
|
|
s32 GetItemBuyPrice(u8 id);
|
|
|
|
s32 GetItemSellPrice(u8 id);
|
|
|
|
s32 GetItemOrder(u8 id);
|
|
|
|
u8 GetItemPalette(u8 id);
|
|
|
|
u32 GetItemActionType(u8 id);
|
2023-01-28 23:29:52 +00:00
|
|
|
u32 GetSpawnAmountRange(u8 id, u32 r1);
|
2023-01-08 09:23:00 +00:00
|
|
|
u8 *GetItemDescription(u8 id);
|
|
|
|
bool8 GetItemAIFlag(u8 id, u32 r1);
|
2023-09-09 23:53:10 +00:00
|
|
|
void BufferItemName(u8 *, u8 id, unkStruct_8090F58 *);
|
2024-07-24 13:08:15 +00:00
|
|
|
void sub_8090E14(u8 *ext_buffer, Item *slot, const unkStruct_8090F58 *);
|
2023-09-02 05:46:26 +00:00
|
|
|
bool8 AddItemToInventory(const Item* slot);
|
2021-07-10 16:23:20 +00:00
|
|
|
void ConvertMoneyItemToMoney();
|
|
|
|
void AddToTeamMoney(s32 amount);
|
2023-09-02 05:46:26 +00:00
|
|
|
u32 GetMoneyValue(Item* slot);
|
2023-01-08 09:23:00 +00:00
|
|
|
u16 GetItemMoveID(u8 index);
|
2021-07-17 16:45:13 +00:00
|
|
|
bool8 CanSellItem(u32 id);
|
2021-07-12 19:10:32 +00:00
|
|
|
bool8 IsGummiItem(u8);
|
2021-10-20 00:48:38 +00:00
|
|
|
void ShiftItemsDownFrom(s32 start);
|
2022-03-14 00:48:04 +00:00
|
|
|
void ClearItemSlotAt(u32 index);
|
2023-09-02 05:46:26 +00:00
|
|
|
void MoveToStorage(Item *slot);
|
2023-01-14 01:41:45 +00:00
|
|
|
s32 CountKecleonShopItems(void);
|
|
|
|
void InitKecleonShopItem(u8 index);
|
2023-09-02 05:46:26 +00:00
|
|
|
BulkItem *GetKecleonShopItem(u8 index);
|
2023-01-14 01:41:45 +00:00
|
|
|
void FillKecleonShopGaps(void);
|
|
|
|
void SortKecleonShopInventory(void);
|
2022-12-27 18:28:32 +00:00
|
|
|
void ChooseKecleonShopInventory(u8 index);
|
2023-01-14 01:41:45 +00:00
|
|
|
bool8 AddKecleonShopItem(u8 itemIndex);
|
|
|
|
u32 CountKecleonWareItems(void);
|
|
|
|
void InitKecleonWareItem(u8 index);
|
2023-09-02 05:46:26 +00:00
|
|
|
BulkItem* GetKecleonWareItem(u8 index);
|
2023-01-14 01:41:45 +00:00
|
|
|
void FillKecleonWareGaps(void);
|
|
|
|
void SortKecleonWareInventory(void);
|
|
|
|
void ChooseKecleonWareInventory(u8 index);
|
|
|
|
bool8 AddKecleonWareItem(u8 itemIndex);
|
2021-10-20 00:48:38 +00:00
|
|
|
void FillInventoryGaps();
|
2023-09-02 05:46:26 +00:00
|
|
|
bool8 AddHeldItemToInventory(BulkItem* slot);
|
2021-11-10 16:43:51 +00:00
|
|
|
bool8 IsNotMoneyOrUsedTMItem(u8 id);
|
2024-01-13 04:22:32 +00:00
|
|
|
bool8 IsNotSpecialItem(u8 id);
|
2023-01-08 09:23:00 +00:00
|
|
|
s32 FindItemInInventory(u8 id);
|
2022-04-26 01:27:33 +00:00
|
|
|
bool8 IsHMItem(u8 id);
|
2022-05-29 19:03:10 +00:00
|
|
|
bool8 IsEdibleItem(u8 id);
|
2023-01-15 19:14:20 +00:00
|
|
|
u8 xxx_bit_lut_lookup_8091E50(u8 i0, u8 i1);
|
2023-06-10 17:03:13 +00:00
|
|
|
bool8 IsInvalidItemReward(u8 itemID);
|
2023-09-21 02:26:35 +00:00
|
|
|
bool8 HasGummiItem(void);
|
|
|
|
void GetGummiItemStatBoost(PokemonStruct1* pokemon, u8 id, bool8 checkBoostFlags, Gummi *gummi);
|
2021-07-17 16:45:13 +00:00
|
|
|
|
2023-09-02 05:46:26 +00:00
|
|
|
void RestoreHeldItem(unkStruct_8094924 *, BulkItem *);
|
|
|
|
void SaveHeldItem(unkStruct_8094924 *, BulkItem *);
|
|
|
|
void RestoreItemSlot(unkStruct_8094924 *, Item *);
|
|
|
|
void SaveItemSlot(unkStruct_8094924 *, Item *);
|
2023-09-09 23:53:10 +00:00
|
|
|
s32 RestoreTeamInventory(u8 *, u32 size);
|
|
|
|
s32 SaveTeamInventory(u8 *, u32 size);
|
2021-06-10 03:54:21 +00:00
|
|
|
|
2023-09-04 05:32:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-15 18:29:02 +00:00
|
|
|
s32 WriteHighDecimal(s32, u8 *strbuf, u8);
|
2023-09-09 23:53:10 +00:00
|
|
|
u32 sub_80913E0(Item *slot, u32, struct subStruct_203B240 **);
|
2023-09-04 05:32:49 +00:00
|
|
|
|
2024-10-12 19:08:16 +00:00
|
|
|
static inline void ZeroOutItem(Item *item)
|
|
|
|
{
|
|
|
|
item->id = 0;
|
|
|
|
item->quantity = 0;
|
|
|
|
item->flags = 0;
|
|
|
|
}
|
|
|
|
|
2024-10-13 13:32:58 +00:00
|
|
|
static inline bool8 ItemSticky(Item *item)
|
|
|
|
{
|
|
|
|
return (item->flags & ITEM_FLAG_STICKY);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline bool8 ItemExists(Item *item)
|
|
|
|
{
|
|
|
|
return (item->flags & ITEM_FLAG_EXISTS);
|
|
|
|
}
|
|
|
|
|
2024-10-15 14:27:41 +00:00
|
|
|
static inline bool8 ItemSet(Item *item)
|
|
|
|
{
|
|
|
|
return (item->flags & ITEM_FLAG_SET);
|
|
|
|
}
|
|
|
|
|
2024-10-13 13:32:58 +00:00
|
|
|
static inline bool8 ItemInShop(Item *item)
|
|
|
|
{
|
|
|
|
return (item->flags & ITEM_FLAG_IN_SHOP);
|
|
|
|
}
|
|
|
|
|
2024-01-13 04:22:32 +00:00
|
|
|
#endif // GUARD_ITEMS_H
|