more item funcs

This commit is contained in:
Seth Barberee
2026-01-19 11:19:06 -08:00
parent 74f0a49c5a
commit 2a478bc062
5 changed files with 54 additions and 69 deletions

View File

@@ -1634,15 +1634,24 @@ struct item_volatile {
};
struct bag_items_inner {
/* 0x0 */ struct item bag_items[INVENTORY_SIZE];
/* 0x0 */ struct item bag_items[INVENTORY_SIZE - 2];
// NOTE: I don't know why we have to do the subtraction - Seth
};
#define MAIN_INVENTORY_INDEX 0
#define SPECIAL_EPISODE_INVENTORY_INDEX 1
#define RESCUE_INVENTORY_INDEX 2
struct bag_items {
u8 fill0[0x384];
// Indexes:
// 0x0 - Main, default
// 0x1 - Special Episode
// 0x2 - Rescue
/* 0x0 */ struct bag_items_inner inventories[3];
/* 0x384 */ struct bag_items_inner *bag_items;
u8 unk388;
/* 0x388 */ u8 active_inventory_idx;
u8 fill2[0x1009];
u32 maybeMoney[]; // Unknown size, but indexed with an u8
u32 maybeMoney[3]; // indexed with an u8, uses same indexes as Inventory
};
struct bulk_item

View File

@@ -1,6 +1,15 @@
#ifndef PMDSKY_MAIN_0200ECFC_H
#define PMDSKY_MAIN_0200ECFC_H
// Init the special episode inventory and money the player is carrying
void SpecialEpisodeInventoryZInit(void);
// Init the rescue inventory and money the player is carrying
void RescueInventoryZInit(void);
// Set the active inventory to the current index
void SetActiveInventory(s8 index);
// Gets the amount of money the player is carrying.
// return: value
u32 GetMoneyCarried(void);