diff options
author | Cameron Hall <camthesaxman@users.noreply.github.com> | 2018-02-18 19:20:50 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-18 19:20:50 -0600 |
commit | 2e21a867487e2187a954a351f775bd3f3a9535b1 (patch) | |
tree | e57f9f6851404a7591cffa7bb7842d2fc6b2d8da /src/field/item.c | |
parent | adac76c8370b86176a52d8ecb2e349e2be13f8ba (diff) | |
parent | b47dffc5df147adcd241df4bf11fa161d84af4f4 (diff) |
Merge pull request #564 from camthesaxman/decompile_debug
decompile debug code
Diffstat (limited to 'src/field/item.c')
-rw-r--r-- | src/field/item.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/field/item.c b/src/field/item.c index 78f5ce12d..af05c0a21 100644 --- a/src/field/item.c +++ b/src/field/item.c @@ -8,6 +8,24 @@ #include "string_util.h" #include "strings.h" +struct Item +{ + u8 name[14]; + u16 itemId; + u16 price; + u8 holdEffect; + u8 holdEffectParam; + const u8 *description; + u8 importance; + u8 unk19; + u8 pocket; + u8 type; + ItemUseFunc fieldUseFunc; + u8 battleUsage; + ItemUseFunc battleUseFunc; + u8 secondaryId; +}; + extern u8 gUnknown_02038560; extern struct BagPocket gBagPockets[NUM_BAG_POCKETS]; @@ -49,7 +67,9 @@ void CopyItemName(u16 itemId, u8 *string) StringAppend(string, gOtherText_Berry2); } else - StringCopy(string, ItemId_GetItem(itemId)->name); + { + StringCopy(string, ItemId_GetName(itemId)); + } } //Unreferenced @@ -579,9 +599,9 @@ static u16 SanitizeItemId(u16 itemId) return itemId; } -const struct Item *ItemId_GetItem(u16 itemId) +const u8 *ItemId_GetName(u16 itemId) { - return &gItems[SanitizeItemId(itemId)]; + return gItems[SanitizeItemId(itemId)].name; } u16 ItemId_GetId(u16 itemId) @@ -640,6 +660,7 @@ u8 ItemId_GetImportance(u16 itemId) return gItems[SanitizeItemId(itemId)].importance; } +// unused u8 ItemId_GetUnknownValue(u16 itemId) { return gItems[SanitizeItemId(itemId)].unk19; |