diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/bag.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/include/bag.h b/include/bag.h index d4b4ff3c..00adbe58 100644 --- a/include/bag.h +++ b/include/bag.h @@ -2,6 +2,7 @@ #define POKEDIAMOND_BAG_H #include "itemtool.h" +#include "save_block_2.h" struct Bag { @@ -16,4 +17,63 @@ struct Bag u32 registeredItem; }; +struct BagView +{ + struct ItemSlot * slots; + u32 count; + u8 pocket; +}; + +struct UnkStruct_0206F164 +{ + u8 unk_00[8]; + u8 unk_08[8]; + u16 unk_10; + u8 filler_12[2]; + u8 unk_14[5]; + u8 unk_19[5]; + u16 unk_1e; + u16 unk_20; + u16 unk_22; +}; + +u32 Sav2_Bag_sizeof(void); +struct Bag * Sav2_Bag_new(u32 heap_id); +void Sav2_Bag_init(struct Bag * bag); +void Sav2_Bag_copy(const struct Bag * src, struct Bag * dest); +u32 Bag_GetRegisteredItem(struct Bag * bag); +void Bag_SetRegisteredItem(struct Bag * bag, u32 item); +u32 GetItemPocket(struct Bag * bag, u16 item_id, struct ItemSlot ** slot_p, u32 * count_p, u32 heap_id); +struct ItemSlot * BagGetItemSlotForAddInternal(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity, u16 maxquantity); +struct ItemSlot * PocketGetItemSlotForAdd(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id); +BOOL BagHasSpaceForItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id); +BOOL BagAddItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id); +struct ItemSlot * PocketGetItemSlotForRemove(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity); +struct ItemSlot * BagGetItemSlotForRemove(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id); +BOOL BagTakeItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id); +BOOL PocketTakeItem(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity); +BOOL BagHasItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id); +BOOL BagPocketNotEmpty(struct Bag * bag, u32 pocket); +u16 BagGetQuantity(struct Bag * bag, u16 item_id, u32 heap_id); +u16 PocketGetQuantity(struct ItemSlot * slots, u32 count, u16 item_id); +void SwapItemSlots(struct ItemSlot * a, struct ItemSlot * b); +void PocketCompaction(struct ItemSlot * slots, u32 count); +void SortPocket(struct ItemSlot * slots, u32 count); +struct BagView * CreateBagView(struct Bag * bag, const u8 * pockets, u32 heap_id); +struct ItemSlot * BagGetPocketSlotN(struct Bag * bag, u32 pocket, u32 slot); +struct Bag * Sav2_Bag_get(struct SaveBlock2 * sav2); +struct UnkStruct_0206F164 * FUN_0206F164(u32 heap_id); +void FUN_0206F17C(struct UnkStruct_0206F164 * a0, u32 a1, u8 * a2, u8 * a3); +u16 FUN_0206F18C(struct UnkStruct_0206F164 * a0); +void FUN_0206F190(struct UnkStruct_0206F164 * a0, u32 a1, u8 a2, u8 a3); +void FUN_0206F19C(struct UnkStruct_0206F164 * a0, u16 a1); +void FUN_0206F1A0(struct UnkStruct_0206F164 * a0, u32 a1, u8 * a2, u8 * a3); +u16 FUN_0206F1AC(struct UnkStruct_0206F164 * a0); +u16 FUN_0206F1B0(struct UnkStruct_0206F164 * a0); +u16 FUN_0206F1B4(struct UnkStruct_0206F164 * a0); +void FUN_0206F1B8(struct UnkStruct_0206F164 * a0, u32 a1, u8 a2, u8 a3); +void FUN_0206F1C0(struct UnkStruct_0206F164 * a0); +void FUN_0206F1E4(struct UnkStruct_0206F164 * a0, u16 a1, u16 a2); +void FUN_0206F1EC(struct UnkStruct_0206F164 * a0, u16 a1); + #endif //POKEDIAMOND_BAG_H |