Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
inventory.h
Go to the documentation of this file.
1#ifndef _INVENTORY_H_
2#define _INVENTORY_H_
3
4#include "common.h"
5
8s32 add_item(s32 itemID);
9
12s32 remove_item(s32 itemID);
13
16b32 has_item(s32 itemID);
17
20s32 find_item(s32 itemID);
21
24s32 count_item(s32 itemID);
25
27b32 is_badge_equipped(s32 itemID);
28
30s32 get_consumables_count(void);
31
33s32 get_consumables_empty(void);
34
37s32 store_item(s32 itemID);
38
40s32 get_stored_count(void);
41
43s32 get_stored_empty(void);
44
46static ALWAYS_INLINE b32 item_is_consumable(s32 itemID) {
48}
49
51static ALWAYS_INLINE b32 item_is_badge(s32 itemID) {
53}
54
56static ALWAYS_INLINE b32 item_is_key(s32 itemID) {
58}
59
63s32 recover_hp(s32 amt);
64
68s32 recover_fp(s32 amt);
69
70#endif
s32 b32
@ ITEM_TYPE_FLAG_BADGE
Definition enums.h:1839
@ ITEM_TYPE_FLAG_CONSUMABLE
Definition enums.h:1836
@ ITEM_TYPE_FLAG_KEY
Definition enums.h:1837
s32 find_item(s32 itemID)
Search player inventory for itemID and return first matching array index.
Definition inventory.c:258
s32 recover_hp(s32 amt)
Recover player HP.
Definition inventory.c:2175
s32 store_item(s32 itemID)
Add itemID to player storage and return slot in which it was placed.
Definition inventory.c:369
s32 recover_fp(s32 amt)
Recover player FP.
Definition inventory.c:2158
s32 get_consumables_empty(void)
Definition inventory.c:436
s32 count_item(s32 itemID)
Search player inventory for itemID and count the number matches.
Definition inventory.c:304
b32 is_badge_equipped(s32 itemID)
Definition inventory.c:387
s32 remove_item(s32 itemID)
Remove first instance of itemID found in player inventory.
Definition inventory.c:198
s32 get_stored_empty(void)
Definition inventory.c:453
s32 get_stored_count(void)
Definition inventory.c:440
s32 get_consumables_count(void)
Definition inventory.c:423
b32 has_item(s32 itemID)
Check whether player has itemID in their inventory.
Definition inventory.c:337
s32 add_item(s32 itemID)
Add itemID to player inventory and return inventory slot in which it was placed.
Definition inventory.c:146
#define ALWAYS_INLINE
Definition macros.h:551
ItemData gItemTable[]