diff --git a/include/battle/ai_context.h b/include/battle/ai_context.h index 2c6754215e..f8d240e8e1 100644 --- a/include/battle/ai_context.h +++ b/include/battle/ai_context.h @@ -4,10 +4,8 @@ #include "constants/battle.h" #include "constants/moves.h" +#include "item.h" #include "move_table.h" - -#include "struct_decls/struct_itemdata_decl.h" - typedef struct AIContext { u8 scriptCursor; u8 moveSlot; diff --git a/include/berry_data.h b/include/berry_data.h index 49f6033cf2..07d0698c54 100644 --- a/include/berry_data.h +++ b/include/berry_data.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_BERRY_DATA_H #include "struct_decls/struct_02006C24_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_berry_data_decl.h" #define FIRMNESS_VERY_SOFT 1 diff --git a/include/constants/items.h b/include/constants/items.h index 3ea3f4b598..b3b7debda1 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -1,3 +1,6 @@ +#ifndef POKEPLATINUM_CONSTANTS_ITEMS_H +#define POKEPLATINUM_CONSTANTS_ITEMS_H + #define POCKET_ITEMS 0 #define POCKET_MEDICINE 1 #define POCKET_BALLS 2 @@ -662,4 +665,11 @@ // New to Platinum #define ITEM_VS_RECORDER 465 #define ITEM_GRACIDEA 466 -#define ITEM_SECRET_KEY 467 \ No newline at end of file +#define ITEM_SECRET_KEY 467 + +#define NUM_ITEMS ITEM_SECRET_KEY +#define MAX_ITEMS (NUM_ITEMS + 1) + +#define ITEM_RETURN_ID 0xFFFF + +#endif // POKEPLATINUM_CONSTANTS_ITEMS_H \ No newline at end of file diff --git a/include/item.h b/include/item.h index 60e08c181b..24c5a9fbb2 100644 --- a/include/item.h +++ b/include/item.h @@ -1,54 +1,53 @@ -#ifndef POKEPLATINUM_UNK_0207CDEC_H -#define POKEPLATINUM_UNK_0207CDEC_H +#ifndef POKEPLATINUM_ITEM_DATA_H +#define POKEPLATINUM_ITEM_DATA_H -#include "struct_decls/struct_02023790_decl.h" -#include "struct_decls/struct_itemdata_decl.h" +#include "strbuf.h" typedef struct ItemPartyParam { - u8 slp_heal : 1; - u8 psn_heal : 1; - u8 brn_heal : 1; - u8 frz_heal : 1; - u8 prz_heal : 1; - u8 cfs_heal : 1; - u8 inf_heal : 1; - u8 guard_spec : 1; + u8 healSleep : 1; + u8 healPoison : 1; + u8 healBurn : 1; + u8 healFreeze : 1; + u8 healParalysis : 1; + u8 healConfusion : 1; + u8 healAttract : 1; + u8 guardSpec : 1; u8 revive : 1; - u8 revive_all : 1; - u8 level_up : 1; + u8 reviveAll : 1; + u8 levelUp : 1; u8 evolve : 1; - u8 atk_stages : 4; - u8 def_stages : 4; - u8 spatk_stages : 4; - u8 spdef_stages : 4; - u8 speed_stages : 4; - u8 accuracy_stages : 4; - u8 critrate_stages : 2; - u8 pp_up : 1; - u8 pp_max : 1; - u8 pp_restore : 1; - u8 pp_restore_all : 1; - u8 hp_restore : 1; - u8 hp_ev_up : 1; - u8 atk_ev_up : 1; - u8 def_ev_up : 1; - u8 speed_ev_up : 1; - u8 spatk_ev_up : 1; - u8 spdef_ev_up : 1; - u8 friendship_mod_lo : 1; - u8 friendship_mod_med : 1; - u8 friendship_mod_hi : 1; - s8 hp_ev_up_param; - s8 atk_ev_up_param; - s8 def_ev_up_param; - s8 speed_ev_up_param; - s8 spatk_ev_up_param; - s8 spdef_ev_up_param; - u8 hp_restore_param; - u8 pp_restore_param; - s8 friendship_mod_lo_param; - s8 friendship_mod_med_param; - s8 friendship_mod_hi_param; + u8 atkStages : 4; + u8 defStages : 4; + u8 spatkStages : 4; + u8 spdefStages : 4; + u8 speedStages : 4; + u8 accStages : 4; + u8 critStages : 2; + u8 ppUp : 1; + u8 ppMax : 1; + u8 ppRestore : 1; + u8 ppRestoreAll : 1; + u8 hpRestore : 1; + u8 giveHPEVs : 1; + u8 giveAtkEVs : 1; + u8 giveDefEVs : 1; + u8 giveSpeedEVs : 1; + u8 giveSpAtkEVs : 1; + u8 giveSpDefEVs : 1; + u8 giveFriendshipLow : 1; + u8 giveFriendshipMed : 1; + u8 giveFriendshipHigh : 1; + s8 hpEVs; + s8 atkEVs; + s8 defEVs; + s8 speedEVs; + s8 spatkEVs; + s8 spdefEVs; + u8 hpRestored; + u8 ppRestored; + s8 friendshipLow; + s8 friendshipMed; + s8 friendshipHigh; u8 padding[2]; } ItemPartyParam; @@ -76,27 +75,266 @@ typedef struct ItemData { u8 padding[2]; } ItemData; -void sub_0207CDEC(void * param0, u16 param1, u16 param2); -u16 sub_0207CE78(u16 param0, u16 param1); -u16 sub_0207CF10(u16 param0); -u16 Item_GetIndexOfIconNCER(void); -u16 Item_GetIndexOfIconNANR(void); -void * Item_LoadDataOrGFX(u16 param0, u16 param1, u32 param2); -void Item_GetNameIntoString(Strbuf *dst, u16 param1, u32 param2); -void Item_GetDescriptionIntoString(Strbuf *dst, u16 param1, u16 param2); -s32 Item_GetAttribute(u16 param0, u16 param1, u32 param2); -s32 Item_GetAttributeFromStruct(ItemData * param0, u16 param1); -const u16 GetMoveFromTMOrHMItemID(u16 param0); -u8 Item_IsMoveHM(u16 param0); -u8 Item_GetTMOrHMNumberFromID(u16 param0); -u8 Item_IsMail(u16 param0); -u8 sub_0207D2F0(u16 param0); -u16 sub_0207D310(u8 param0); -u8 Item_IsBerry(u16 param0); -u8 sub_0207D344(u16 param0); -u16 sub_0207D354(u8 param0); -u8 Item_IsHerbalMedicine(u16 param0); -void * sub_0207D388(int param0); -ItemData * sub_0207D3B0(ItemData * param0, u16 param1); - -#endif // POKEPLATINUM_UNK_0207CDEC_H +enum ItemFileType { + ITEM_FILE_TYPE_DATA, + ITEM_FILE_TYPE_ICON, + ITEM_FILE_TYPE_PALETTE, + ITEM_FILE_TYPE_GBA, +}; + +enum ItemDataParam { + ITEM_PARAM_PRICE, + ITEM_PARAM_HOLD_EFFECT, + ITEM_PARAM_HOLD_EFFECT_PARAM, + ITEM_PARAM_PREVENT_TOSS, + ITEM_PARAM_IS_SELECTABLE, + ITEM_PARAM_FIELD_POCKET, + ITEM_PARAM_FIELD_USE_FUNC, + ITEM_PARAM_BATTLE_USE_FUNC, + ITEM_PARAM_PLUCK_EFFECT, + ITEM_PARAM_FLING_EFFECT, + ITEM_PARAM_FLING_POWER, + ITEM_PARAM_NATURAL_GIFT_POWER, + ITEM_PARAM_NATURAL_GIFT_TYPE, + ITEM_PARAM_BATTLE_POCKET, + ITEM_PARAM_PARTY_USE, + ITEM_PARAM_HEAL_SLEEP, + ITEM_PARAM_HEAL_POISON, + ITEM_PARAM_HEAL_BURN, + ITEM_PARAM_HEAL_FREEZE, + ITEM_PARAM_HEAL_PARALYSIS, + ITEM_PARAM_HEAL_CONFUSION, + ITEM_PARAM_HEAL_ATTRACT, + ITEM_PARAM_GUARD_SPEC, + ITEM_PARAM_REVIVE, + ITEM_PARAM_REVIVE_ALL, + ITEM_PARAM_LEVEL_UP, + ITEM_PARAM_EVOLVE, + ITEM_PARAM_ATK_STAGES, + ITEM_PARAM_DEF_STAGES, + ITEM_PARAM_SPATK_STAGES, + ITEM_PARAM_SPDEF_STAGES, + ITEM_PARAM_SPEED_STAGES, + ITEM_PARAM_ACC_STAGES, + ITEM_PARAM_CRIT_STAGES, + ITEM_PARAM_PP_UP, + ITEM_PARAM_PP_MAX, + ITEM_PARAM_PP_RESTORE, + ITEM_PARAM_PP_RESTORE_ALL, + ITEM_PARAM_HP_RESTORE, + ITEM_PARAM_GIVE_HP_EVS, + ITEM_PARAM_GIVE_ATK_EVS, + ITEM_PARAM_GIVE_DEF_EVS, + ITEM_PARAM_GIVE_SPEED_EVS, + ITEM_PARAM_GIVE_SPATK_EVS, + ITEM_PARAM_GIVE_SPDEF_EVS, + ITEM_PARAM_GIVE_FRIENDSHIP_LOW, + ITEM_PARAM_GIVE_FRIENDSHIP_MED, + ITEM_PARAM_GIVE_FRIENDSHIP_HIGH, + ITEM_PARAM_HP_EVS, + ITEM_PARAM_ATK_EVS, + ITEM_PARAM_DEF_EVS, + ITEM_PARAM_SPEED_EVS, + ITEM_PARAM_SPATK_EVS, + ITEM_PARAM_SPDEF_EVS, + ITEM_PARAM_HP_RESTORED, + ITEM_PARAM_PP_RESTORED, + ITEM_PARAM_FRIENDSHIP_LOW, + ITEM_PARAM_FRIENDSHIP_MED, + ITEM_PARAM_FRIENDSHIP_HIGH, +}; + +/** + * @brief Move the item in the corresponding pocket from one slot to another. + * + * All other items in the pocket will be moved up or down within the pocket, + * depending on whether the target slot is above or below the current slot. + * + * @param pocket The pocket of items in the bag. + * @param srcSlot The slot of the item to be moved. + * @param dstSlot The slot to which the item will be moved. + */ +void Item_MoveInPocket(void *pocket, u16 srcSlot, u16 dstSlot); + +/** + * @brief Get an ID of the specified type for an item. + * + * Each type points to a different value for the item's entry in sItemArchiveIDs. + * + * @param item + * @param type The type of ID to get. + * @return The item's ID of the specified type. + */ +u16 Item_FileID(u16 item, enum ItemFileType type); + +/** + * @brief Get the ID of an item which matches the given GBA-era item ID. + * + * @param gbaID GBA-era item ID. + * @return ID of the item which corresponds to the given GBA-era ID. + */ +u16 Item_FromGBAID(u16 param0); + +/** + * @brief Get the file index of the global NCER file used by all item icons. + * + * @return File index of the global item icon NCER. + */ +u16 Item_IconNCERFile(void); + +/** + * @brief Get the file index of the global NANR file used by all item icons. + * + * @return File index of the global item icon NANR. + */ +u16 Item_IconNANRFile(void); + +/** + * @brief Load item data of the specified type. + * + * @param item The item to load. + * @param type The type of data to load. Determines which NARC is loaded. + * @param heapID ID of the heap to own the allocated memory. + * @return The loaded data structure. + */ +void* Item_Load(u16 item, enum ItemFileType type, u32 heapID); + +/** + * @brief Load the name of the item into a string buffer. + * + * @param dst The destination string buffer. + * @param item The item whose name we should load. + * @param heapID ID of the heap to own memory needed for the text archive. + */ +void Item_LoadName(Strbuf *dst, u16 item, u32 heapID); + +/** + * @brief Load the description of the item into a string buffer. + * + * @param dst The destination string buffer. + * @param item The item whose description we should load. + * @param heapID ID of the heap to own memory needed for the text archive. + */ +void Item_LoadDescription(Strbuf *dst, u16 item, u16 heapID); + +/** + * @brief Load a parameter for a given item from the data archive. + * + * @param item The item to load. + * @param param The param to load from the item. + * @param heapID The heap on which to load the item data. + * @return Parameter value from the loaded item. + */ +s32 Item_LoadParam(u16 item, enum ItemDataParam param, u32 heapID); + +/** + * @brief Get a param value from a loaded item. + * + * @param itemData The loaded item. + * @param param The param value to get. + * @return Parameter value from the loaded item. + */ +s32 Item_Get(ItemData *itemData, enum ItemDataParam param); + +/** + * @brief Get the move corresponding to a TM or HM. + * + * Returns MOVE_NONE if the input item is not a TM or HM. + * + * @param item The TM or HM item ID. + * @return The move stored in the given TM or HM. + */ +const u16 Item_MoveForTMHM(u16 item); + +/** + * @brief Check if a given move is an HM move. + * + * @param move The move to check. + * @return TRUE if the move is assignable via an HM. FALSE otherwise. + */ +u8 Item_IsHMMove(u16 move); + +/** + * @brief Get the TM number for a given item, if it is a TM or HM. + * + * HMs are considered to be TMs 93 - 100. + * + * @param item + * @return TM number for the given item, or ITEM_NONE if it is not a TM or HM. + */ +u8 Item_TMHMNumber(u16 item); + +/** + * @brief Check if a given item is mail. + * + * @param item + * @return TRUE if the item is mail, FALSE otherwise. + */ +u8 Item_IsMail(u16 item); + +/** + * @brief Get the mail number for a given item. + * + * @param item + * @return The mail number for the item, or ITEM_NONE if the item is not mail. + */ +u8 Item_MailNumber(u16 item); + +/** + * @brief Get the item for a given mail number. + * + * @param mail + * @return The item for the mail number, or ITEM_NONE if none exists. + */ +u16 Item_ForMailNumber(u8 mail); + +/** + * @brief Check if a given item is a berry. + * + * @param item + * @return TRUE if the item is a berry, FALSE otherwise. + */ +u8 Item_IsBerry(u16 item); + +/** + * @brief Get the berry number for a given item. + * + * @param item + * @return The berry number for the item, or ITEM_NONE if the item is not a berry. + */ +u8 Item_BerryNumber(u16 item); + +/** + * @brief Get the item for a given berry number. + * + * @param berry + * @return The item for the berry number, or ITEM_RETURN_ID if none exists. + */ +u16 Item_ForBerryNumber(u8 item); + +/** + * @brief Check if a given item is herbal medicine. + * + * @param item + * @return TRUE if the item is herbal medicine, FALSE otherwise. + */ +u8 Item_IsHerbalMedicine(u16 item); + +/** + * @brief Load the full table of item data into the heap. + * + * @param heapID The heap which will own the item table's allocation. + * @return The full table of item data. + */ +void* ItemTable_Load(int heapID); + +/** + * @brief Get the ItemData value at a given index from within a loaded table. + * + * @param itemTable The loaded item table. + * @param index Index of the ItemData to be retrieved. + * @return ItemData at a given index within the loaded item table. + */ +ItemData* ItemTable_Index(ItemData *itemTable, u16 index); + +#endif // POKEPLATINUM_ITEM_DATA_H \ No newline at end of file diff --git a/include/overlay006/ov6_022489E4.h b/include/overlay006/ov6_022489E4.h index 3121e75561..4f208da876 100644 --- a/include/overlay006/ov6_022489E4.h +++ b/include/overlay006/ov6_022489E4.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_OV6_022489E4_H #define POKEPLATINUM_OV6_022489E4_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/struct_020954F0.h" #include "struct_defs/struct_02095C48.h" diff --git a/include/overlay007/struct_ov7_0224D008.h b/include/overlay007/struct_ov7_0224D008.h index e9e20253c0..d03e297c05 100644 --- a/include/overlay007/struct_ov7_0224D008.h +++ b/include/overlay007/struct_ov7_0224D008.h @@ -10,7 +10,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020203AC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/struct_020279FC.h" #include "struct_decls/struct_0202B628_decl.h" diff --git a/include/overlay008/ov8_02249960.h b/include/overlay008/ov8_02249960.h index b7ad173bae..b96ac37ea2 100644 --- a/include/overlay008/ov8_02249960.h +++ b/include/overlay008/ov8_02249960.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_OV8_02249960_H #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0203CDB0_decl.h" #include "struct_defs/struct_0205AA50.h" diff --git a/include/overlay010/struct_ov10_0221F800.h b/include/overlay010/struct_ov10_0221F800.h index 2bab3f9e6f..f310ffaaca 100644 --- a/include/overlay010/struct_ov10_0221F800.h +++ b/include/overlay010/struct_ov10_0221F800.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_OV10_0221F800_H #define POKEPLATINUM_STRUCT_OV10_0221F800_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_party_decl.h" #include "overlay006/battle_params.h" diff --git a/include/overlay013/struct_ov13_022213F0.h b/include/overlay013/struct_ov13_022213F0.h index 7868188d33..f5ea9e93ff 100644 --- a/include/overlay013/struct_ov13_022213F0.h +++ b/include/overlay013/struct_ov13_022213F0.h @@ -8,7 +8,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_0200D0F4_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "overlay013/struct_ov13_0221FC20.h" #include "overlay013/struct_ov13_02221ED0.h" diff --git a/include/overlay013/struct_ov13_02227244.h b/include/overlay013/struct_ov13_02227244.h index 5e799b5b62..822a928c0a 100644 --- a/include/overlay013/struct_ov13_02227244.h +++ b/include/overlay013/struct_ov13_02227244.h @@ -8,7 +8,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_0200D0F4_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_0207CDEC.h" #include "overlay013/struct_ov13_022264F4.h" @@ -30,7 +30,7 @@ typedef struct { u8 unk_32; UnkStruct_ov13_02228A50 * unk_34; UnkStruct_ov16_0226DEEC * unk_38; - UnkStruct_0207CDEC unk_3C[5][36]; + BagItem unk_3C[5][36]; UnkStruct_0200C704 * unk_30C; UnkStruct_0200D0F4 * unk_310[6]; u16 unk_328[3][144]; diff --git a/include/overlay016/ov16_0223DF00.h b/include/overlay016/ov16_0223DF00.h index b1f9127499..c81cf31564 100644 --- a/include/overlay016/ov16_0223DF00.h +++ b/include/overlay016/ov16_0223DF00.h @@ -11,7 +11,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02015F84_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_defs/struct_020279FC.h" diff --git a/include/overlay017/ov17_0223F118.h b/include/overlay017/ov17_0223F118.h index 4b58c70f35..e4346497af 100644 --- a/include/overlay017/ov17_0223F118.h +++ b/include/overlay017/ov17_0223F118.h @@ -6,7 +6,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02012744_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0207C690.h" #include "struct_defs/struct_02095C48.h" #include "overlay017/struct_ov17_0223F2E4.h" diff --git a/include/overlay017/struct_ov17_0223F88C.h b/include/overlay017/struct_ov17_0223F88C.h index d3f7580915..f59fad8961 100644 --- a/include/overlay017/struct_ov17_0223F88C.h +++ b/include/overlay017/struct_ov17_0223F88C.h @@ -11,7 +11,7 @@ #include "struct_decls/struct_0200D0F4_decl.h" #include "struct_decls/struct_02012744_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_02095C48_sub1.h" #include "overlay012/struct_ov12_0221FCDC_decl.h" diff --git a/include/overlay017/struct_ov17_022476F8.h b/include/overlay017/struct_ov17_022476F8.h index 219dba63e3..f1b818c589 100644 --- a/include/overlay017/struct_ov17_022476F8.h +++ b/include/overlay017/struct_ov17_022476F8.h @@ -10,7 +10,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_0200D0F4_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_02095C48_sub1.h" #include "overlay016/struct_ov16_0223E0C8.h" diff --git a/include/overlay017/struct_ov17_0224A1EC.h b/include/overlay017/struct_ov17_0224A1EC.h index 5897376976..f0263c1c60 100644 --- a/include/overlay017/struct_ov17_0224A1EC.h +++ b/include/overlay017/struct_ov17_0224A1EC.h @@ -12,7 +12,7 @@ #include "struct_decls/struct_02012744_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_02095C48_sub1.h" #include "overlay016/struct_ov16_0223E0C8.h" diff --git a/include/overlay017/struct_ov17_022507C4.h b/include/overlay017/struct_ov17_022507C4.h index 43cf69baa1..4ef5f9f2e4 100644 --- a/include/overlay017/struct_ov17_022507C4.h +++ b/include/overlay017/struct_ov17_022507C4.h @@ -12,7 +12,7 @@ #include "struct_decls/struct_02012744_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_02095C48_sub1.h" #include "overlay016/struct_ov16_0223E0C8.h" diff --git a/include/overlay019/struct_ov19_021D4F5C.h b/include/overlay019/struct_ov19_021D4F5C.h index c6f67ee078..f9c8f7eb3f 100644 --- a/include/overlay019/struct_ov19_021D4F5C.h +++ b/include/overlay019/struct_ov19_021D4F5C.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_OV19_021D4F5C_H #define POKEPLATINUM_STRUCT_OV19_021D4F5C_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef struct { u8 unk_00; diff --git a/include/overlay019/struct_ov19_021D5BAC.h b/include/overlay019/struct_ov19_021D5BAC.h index 82e6b411bf..8832480ae9 100644 --- a/include/overlay019/struct_ov19_021D5BAC.h +++ b/include/overlay019/struct_ov19_021D5BAC.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_OV19_021D5BAC_H #define POKEPLATINUM_STRUCT_OV19_021D5BAC_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef struct { void * unk_00; diff --git a/include/overlay019/struct_ov19_021D5FAC.h b/include/overlay019/struct_ov19_021D5FAC.h index 29f8c473a9..208271c33d 100644 --- a/include/overlay019/struct_ov19_021D5FAC.h +++ b/include/overlay019/struct_ov19_021D5FAC.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_OV19_021D5FAC_H #define POKEPLATINUM_STRUCT_OV19_021D5FAC_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef struct { void * unk_00; diff --git a/include/overlay019/struct_ov19_021DA9E0.h b/include/overlay019/struct_ov19_021DA9E0.h index e8037b6122..4fae266e4d 100644 --- a/include/overlay019/struct_ov19_021DA9E0.h +++ b/include/overlay019/struct_ov19_021DA9E0.h @@ -8,7 +8,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" diff --git a/include/overlay019/struct_ov19_021DB6F0.h b/include/overlay019/struct_ov19_021DB6F0.h index 9ea2681fd4..e0112200e8 100644 --- a/include/overlay019/struct_ov19_021DB6F0.h +++ b/include/overlay019/struct_ov19_021DB6F0.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" diff --git a/include/overlay019/struct_ov19_021DBA9C.h b/include/overlay019/struct_ov19_021DBA9C.h index 4ca2a0ec45..03147b28c5 100644 --- a/include/overlay019/struct_ov19_021DBA9C.h +++ b/include/overlay019/struct_ov19_021DBA9C.h @@ -8,7 +8,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" diff --git a/include/overlay020/ov20_021D0D80.h b/include/overlay020/ov20_021D0D80.h index 4938426cdf..9dcf0fe964 100644 --- a/include/overlay020/ov20_021D0D80.h +++ b/include/overlay020/ov20_021D0D80.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_OV20_021D0D80_H #include "struct_decls/struct_020067E8_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay020/struct_ov20_021D16E8_decl.h" int ov20_021D0D80(UnkStruct_020067E8 * param0, int * param1); diff --git a/include/overlay020/ov20_021D5044.h b/include/overlay020/ov20_021D5044.h index e4a869ac72..d611648ebd 100644 --- a/include/overlay020/ov20_021D5044.h +++ b/include/overlay020/ov20_021D5044.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_OV20_021D5044_H #define POKEPLATINUM_OV20_021D5044_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" u32 ov20_021D5044(void); void ov20_021D5048(u32 param0, Strbuf *param1); diff --git a/include/overlay021/ov21_021D0D80.h b/include/overlay021/ov21_021D0D80.h index 3b730c2db3..226d7bc7e1 100644 --- a/include/overlay021/ov21_021D0D80.h +++ b/include/overlay021/ov21_021D0D80.h @@ -5,7 +5,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" #include "struct_defs/union_02022594_020225E0.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "overlay021/struct_ov21_021D0D80_1.h" #include "overlay021/struct_ov21_021D0F60_decl.h" diff --git a/include/overlay021/ov21_021D3208.h b/include/overlay021/ov21_021D3208.h index 4126b6dd16..dcc8a3f907 100644 --- a/include/overlay021/ov21_021D3208.h +++ b/include/overlay021/ov21_021D3208.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_OV21_021D3208_H #define POKEPLATINUM_OV21_021D3208_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay021/struct_ov21_021D3208.h" #include "overlay021/struct_ov21_021D3320.h" #include "overlay021/struct_ov21_021D37DC.h" diff --git a/include/overlay021/ov21_021D4C0C.h b/include/overlay021/ov21_021D4C0C.h index 520949008c..c8e047bd10 100644 --- a/include/overlay021/ov21_021D4C0C.h +++ b/include/overlay021/ov21_021D4C0C.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_OV21_021D4C0C_H #define POKEPLATINUM_OV21_021D4C0C_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "overlay021/struct_ov21_021D1FA4.h" #include "overlay021/struct_ov21_021D4C0C_decl.h" diff --git a/include/overlay021/ov21_021D5600.h b/include/overlay021/ov21_021D5600.h index fce92ace7e..02b6c0be1e 100644 --- a/include/overlay021/ov21_021D5600.h +++ b/include/overlay021/ov21_021D5600.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_OV21_021D5600_H #define POKEPLATINUM_OV21_021D5600_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" void ov21_021D5600(Strbuf *param0); int ov21_021D5608(int param0); diff --git a/include/overlay021/struct_ov21_021D3320.h b/include/overlay021/struct_ov21_021D3320.h index 8bdef2ca71..ff978fe62f 100644 --- a/include/overlay021/struct_ov21_021D3320.h +++ b/include/overlay021/struct_ov21_021D3320.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_OV21_021D3320_H #define POKEPLATINUM_STRUCT_OV21_021D3320_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_decls/struct_02098700_decl.h" #include "overlay021/struct_ov21_021D3A60.h" diff --git a/include/overlay022/struct_ov22_0225A428.h b/include/overlay022/struct_ov22_0225A428.h index 253968c880..b722dad7a1 100644 --- a/include/overlay022/struct_ov22_0225A428.h +++ b/include/overlay022/struct_ov22_0225A428.h @@ -3,7 +3,7 @@ #include "struct_decls/struct_02009714_decl.h" #include "struct_decls/struct_020218BC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "overlay022/struct_ov22_022597BC.h" #include "overlay022/struct_ov22_0225A914.h" diff --git a/include/overlay023/ov23_0223E140.h b/include/overlay023/ov23_0223E140.h index a14c262ce2..47492968ec 100644 --- a/include/overlay023/ov23_0223E140.h +++ b/include/overlay023/ov23_0223E140.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_OV23_0223E140_H #define POKEPLATINUM_OV23_0223E140_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0203CDB0_decl.h" #include "overlay023/struct_ov23_0224271C_decl.h" diff --git a/include/overlay023/ov23_022416A8.h b/include/overlay023/ov23_022416A8.h index 237078de8c..6d94914a5a 100644 --- a/include/overlay023/ov23_022416A8.h +++ b/include/overlay023/ov23_022416A8.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_OV23_022416A8_H #define POKEPLATINUM_OV23_022416A8_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0203CDB0_decl.h" #include "overlay023/struct_ov23_02241A80.h" #include "overlay023/struct_ov23_02241A88.h" diff --git a/include/overlay023/ov23_02241F74.h b/include/overlay023/ov23_02241F74.h index 156898f0d2..acdd8e50b7 100644 --- a/include/overlay023/ov23_02241F74.h +++ b/include/overlay023/ov23_02241F74.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_OV23_02241F74_H #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02029894_decl.h" #include "struct_decls/struct_0203CDB0_decl.h" diff --git a/include/overlay023/ov23_0224340C.h b/include/overlay023/ov23_0224340C.h index 16e29f5888..6e65dfbe84 100644 --- a/include/overlay023/ov23_0224340C.h +++ b/include/overlay023/ov23_0224340C.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_OV23_0224340C_H #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0203CDB0_decl.h" #include "overlay023/struct_ov23_0224271C_decl.h" diff --git a/include/overlay023/ov23_0224B05C.h b/include/overlay023/ov23_0224B05C.h index 7231900cf0..a0283518e3 100644 --- a/include/overlay023/ov23_0224B05C.h +++ b/include/overlay023/ov23_0224B05C.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_OV23_0224B05C_H #define POKEPLATINUM_OV23_0224B05C_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02029894_decl.h" #include "struct_decls/struct_0203CDB0_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/include/overlay023/struct_ov23_02250CD4.h b/include/overlay023/struct_ov23_02250CD4.h index 2074e61100..e59433d890 100644 --- a/include/overlay023/struct_ov23_02250CD4.h +++ b/include/overlay023/struct_ov23_02250CD4.h @@ -7,7 +7,7 @@ #include "struct_decls/struct_0200D0F4_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0203CDB0_decl.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_0206A844.h" diff --git a/include/overlay062/funcptr_ov62_022349A8.h b/include/overlay062/funcptr_ov62_022349A8.h index 27291a3a6f..9707ba5edc 100644 --- a/include/overlay062/funcptr_ov62_022349A8.h +++ b/include/overlay062/funcptr_ov62_022349A8.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_FUNCPTR_OV62_022349A8_H #define POKEPLATINUM_FUNCPTR_OV62_022349A8_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef void (* UnkFuncPtr_ov62_022349A8)(void *, Strbuf *); diff --git a/include/overlay062/ov62_02231690.h b/include/overlay062/ov62_02231690.h index ad23e99974..093d7d039f 100644 --- a/include/overlay062/ov62_02231690.h +++ b/include/overlay062/ov62_02231690.h @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_0200D0F4_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202F41C_decl.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_0208B878.h" diff --git a/include/overlay062/struct_ov62_022349A8.h b/include/overlay062/struct_ov62_022349A8.h index 1e1f3f0057..a3de144acf 100644 --- a/include/overlay062/struct_ov62_022349A8.h +++ b/include/overlay062/struct_ov62_022349A8.h @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_021C0794_decl.h" #include "overlay061/struct_ov61_0222B138.h" #include "overlay061/struct_ov61_0222B920.h" diff --git a/include/overlay062/struct_ov62_02246B00.h b/include/overlay062/struct_ov62_02246B00.h index eeab7e70ee..deb008758d 100644 --- a/include/overlay062/struct_ov62_02246B00.h +++ b/include/overlay062/struct_ov62_02246B00.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_OV62_02246B00_H #define POKEPLATINUM_STRUCT_OV62_02246B00_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020279FC.h" typedef struct { diff --git a/include/overlay065/struct_ov65_0222EBE0_t.h b/include/overlay065/struct_ov65_0222EBE0_t.h index 6badc12e2a..f8bc8b5f6d 100644 --- a/include/overlay065/struct_ov65_0222EBE0_t.h +++ b/include/overlay065/struct_ov65_0222EBE0_t.h @@ -12,7 +12,7 @@ #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_defs/struct_0205AA50.h" diff --git a/include/overlay066/ov66_0223177C.h b/include/overlay066/ov66_0223177C.h index f0a0df12b4..8eb2ddc343 100644 --- a/include/overlay066/ov66_0223177C.h +++ b/include/overlay066/ov66_0223177C.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_OV66_0223177C_H #define POKEPLATINUM_OV66_0223177C_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay066/struct_ov66_02231428.h" #include "overlay066/struct_ov66_0223177C_decl.h" #include "overlay066/struct_ov66_0223185C.h" diff --git a/include/overlay070/ov70_0225D9A4.h b/include/overlay070/ov70_0225D9A4.h index a14fbcc91d..6f41e5c25d 100644 --- a/include/overlay070/ov70_0225D9A4.h +++ b/include/overlay070/ov70_0225D9A4.h @@ -3,7 +3,7 @@ #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02013A04_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay066/struct_ov66_0222DFF8_decl.h" #include "overlay070/struct_ov70_0225C894_decl.h" #include "overlay070/struct_ov70_0225CA20_decl.h" diff --git a/include/overlay071/ov71_0223C69C.h b/include/overlay071/ov71_0223C69C.h index a783d0ded0..353734c4b1 100644 --- a/include/overlay071/ov71_0223C69C.h +++ b/include/overlay071/ov71_0223C69C.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_OV71_0223C69C_H #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_02072014.h" diff --git a/include/overlay071/struct_ov71_0223B620.h b/include/overlay071/struct_ov71_0223B620.h index b0cfc349ca..4c18a715bd 100644 --- a/include/overlay071/struct_ov71_0223B620.h +++ b/include/overlay071/struct_ov71_0223B620.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_STRUCT_OV71_0223B620_H #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_02072014.h" #include "overlay071/struct_ov71_0223C444.h" diff --git a/include/overlay072/struct_ov72_0223DB98_t.h b/include/overlay072/struct_ov72_0223DB98_t.h index 9133023227..d2f3a68bd3 100644 --- a/include/overlay072/struct_ov72_0223DB98_t.h +++ b/include/overlay072/struct_ov72_0223DB98_t.h @@ -10,7 +10,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020279FC.h" #include "struct_decls/struct_0202CD88_decl.h" #include "struct_defs/struct_0205AA50.h" diff --git a/include/overlay079/struct_ov79_021D0E1C_sub1.h b/include/overlay079/struct_ov79_021D0E1C_sub1.h index 07fd06a5fd..f237799b1c 100644 --- a/include/overlay079/struct_ov79_021D0E1C_sub1.h +++ b/include/overlay079/struct_ov79_021D0E1C_sub1.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_STRUCT_OV79_021D0E1C_SUB1_H #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef struct { UnkStruct_0200B358 * unk_00; diff --git a/include/overlay079/struct_ov79_021D38D0.h b/include/overlay079/struct_ov79_021D38D0.h index c0e2543797..08ca59b6f4 100644 --- a/include/overlay079/struct_ov79_021D38D0.h +++ b/include/overlay079/struct_ov79_021D38D0.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_OV79_021D38D0_H #define POKEPLATINUM_STRUCT_OV79_021D38D0_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" typedef struct { diff --git a/include/overlay080/struct_ov80_021D2A08.h b/include/overlay080/struct_ov80_021D2A08.h index 339a40ffe4..87f5e501ff 100644 --- a/include/overlay080/struct_ov80_021D2A08.h +++ b/include/overlay080/struct_ov80_021D2A08.h @@ -6,7 +6,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_0200D0F4_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02039EBC_decl.h" #include "struct_defs/struct_0203D8AC.h" #include "overlay080/struct_ov80_021D259C.h" diff --git a/include/overlay081/struct_ov81_021D1610.h b/include/overlay081/struct_ov81_021D1610.h index 98919c27a9..136fd5803a 100644 --- a/include/overlay081/struct_ov81_021D1610.h +++ b/include/overlay081/struct_ov81_021D1610.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202B628_decl.h" #include "struct_defs/struct_0205AA50.h" diff --git a/include/overlay083/struct_ov83_0223DEA0.h b/include/overlay083/struct_ov83_0223DEA0.h index 3b2a791d12..59f23a9f88 100644 --- a/include/overlay083/struct_ov83_0223DEA0.h +++ b/include/overlay083/struct_ov83_0223DEA0.h @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef struct { UnkStruct_0200B144 * unk_00; diff --git a/include/overlay084/ov84_0223F040.h b/include/overlay084/ov84_0223F040.h index eb69f063cf..269af1cd48 100644 --- a/include/overlay084/ov84_0223F040.h +++ b/include/overlay084/ov84_0223F040.h @@ -18,8 +18,8 @@ void ov84_0223F584(UnkStruct_ov84_0223B5A0 * param0, u16 param1); void ov84_0223F7D4(UnkStruct_ov84_0223B5A0 * param0); void ov84_0223F800(UnkStruct_ov84_0223B5A0 * param0); void ov84_0223F81C(UnkStruct_ov84_0223B5A0 * param0, u16 param1, u16 param2, u32 param3); -void ov84_0223F8D0(UnkStruct_ov84_0223B5A0 * param0, UnkStruct_0207CDEC * param1, u32 param2); -void ov84_0223F94C(UnkStruct_ov84_0223B5A0 * param0, UnkStruct_0207CDEC * param1, u32 param2); +void ov84_0223F8D0(UnkStruct_ov84_0223B5A0 * param0, BagItem * param1, u32 param2); +void ov84_0223F94C(UnkStruct_ov84_0223B5A0 * param0, BagItem * param1, u32 param2); void ov84_0223F9F0(UnkStruct_ov84_0223B5A0 * param0, u32 param1); void ov84_0223FA44(UnkStruct_ov84_0223B5A0 * param0, u32 param1); void ov84_0223FA88(UnkStruct_ov84_0223B5A0 * param0); diff --git a/include/overlay084/struct_ov84_0223B5A0.h b/include/overlay084/struct_ov84_0223B5A0.h index f74d99f457..97e55af0b5 100644 --- a/include/overlay084/struct_ov84_0223B5A0.h +++ b/include/overlay084/struct_ov84_0223B5A0.h @@ -12,7 +12,7 @@ #include "struct_decls/struct_0200D0F4_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/struct_020279FC.h" #include "struct_defs/struct_0205AA50.h" diff --git a/include/overlay084/struct_ov84_0223BE5C.h b/include/overlay084/struct_ov84_0223BE5C.h index 2af3ddb2f6..5fdd139724 100644 --- a/include/overlay084/struct_ov84_0223BE5C.h +++ b/include/overlay084/struct_ov84_0223BE5C.h @@ -4,7 +4,7 @@ #include "struct_defs/struct_0207CDEC.h" typedef struct { - UnkStruct_0207CDEC * unk_00; + BagItem * unk_00; u16 unk_04; u16 unk_06; u8 unk_08; diff --git a/include/overlay087/struct_ov87_021D1640.h b/include/overlay087/struct_ov87_021D1640.h index deaf7a52c0..36f6543b26 100644 --- a/include/overlay087/struct_ov87_021D1640.h +++ b/include/overlay087/struct_ov87_021D1640.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_OV87_021D1640_H #define POKEPLATINUM_STRUCT_OV87_021D1640_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef struct { Strbuf* unk_00; diff --git a/include/overlay088/ov88_0223E9C4.h b/include/overlay088/ov88_0223E9C4.h index fac1b5dc6a..b11632bff1 100644 --- a/include/overlay088/ov88_0223E9C4.h +++ b/include/overlay088/ov88_0223E9C4.h @@ -7,7 +7,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020279FC.h" #include "struct_defs/struct_0205AA50.h" diff --git a/include/overlay092/ov92_021D0D80.h b/include/overlay092/ov92_021D0D80.h index 7c1851eff9..04d006d8df 100644 --- a/include/overlay092/ov92_021D0D80.h +++ b/include/overlay092/ov92_021D0D80.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_OV92_021D0D80_H #include "struct_decls/struct_020067E8_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" int ov92_021D0D80(UnkStruct_020067E8 * param0, int * param1); int ov92_021D0EB8(UnkStruct_020067E8 * param0, int * param1); diff --git a/include/overlay094/ov94_02244950.h b/include/overlay094/ov94_02244950.h index 68580a25f1..919018dbd2 100644 --- a/include/overlay094/ov94_02244950.h +++ b/include/overlay094/ov94_02244950.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_OV94_02244950_H #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "overlay094/struct_ov94_0223FD4C_decl.h" diff --git a/include/overlay094/struct_ov94_0223FD4C.h b/include/overlay094/struct_ov94_0223FD4C.h index 48f78b3dcf..63a1e30791 100644 --- a/include/overlay094/struct_ov94_0223FD4C.h +++ b/include/overlay094/struct_ov94_0223FD4C.h @@ -14,7 +14,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_defs/struct_0203E0FC.h" diff --git a/include/overlay094/struct_ov94_0223FD4C_sub3.h b/include/overlay094/struct_ov94_0223FD4C_sub3.h index ff37b3de6c..7c8abe73df 100644 --- a/include/overlay094/struct_ov94_0223FD4C_sub3.h +++ b/include/overlay094/struct_ov94_0223FD4C_sub3.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_OV94_0223FD4C_SUB3_H #define POKEPLATINUM_STRUCT_OV94_0223FD4C_SUB3_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef struct { Strbuf **unk_00; diff --git a/include/overlay096/ov96_0223BCE0.h b/include/overlay096/ov96_0223BCE0.h index 07f4dbd49c..01dc796474 100644 --- a/include/overlay096/ov96_0223BCE0.h +++ b/include/overlay096/ov96_0223BCE0.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_OV96_0223BCE0_H #define POKEPLATINUM_OV96_0223BCE0_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "overlay096/struct_ov96_0223BF40_decl.h" diff --git a/include/overlay096/struct_ov96_0223BF40_t.h b/include/overlay096/struct_ov96_0223BF40_t.h index 25b49462f5..a9682475ab 100644 --- a/include/overlay096/struct_ov96_0223BF40_t.h +++ b/include/overlay096/struct_ov96_0223BF40_t.h @@ -10,7 +10,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_0206BC70.h" #include "struct_defs/box_pokemon.h" diff --git a/include/overlay097/struct_ov97_0222D04C.h b/include/overlay097/struct_ov97_0222D04C.h index 451e94d28b..d9d77783e6 100644 --- a/include/overlay097/struct_ov97_0222D04C.h +++ b/include/overlay097/struct_ov97_0222D04C.h @@ -11,7 +11,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020279FC.h" #include "struct_defs/struct_0205AA50.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/include/overlay098/ov98_022499C8.h b/include/overlay098/ov98_022499C8.h index afe9aac361..3d428784b7 100644 --- a/include/overlay098/ov98_022499C8.h +++ b/include/overlay098/ov98_022499C8.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_OV98_022499C8_H #define POKEPLATINUM_OV98_022499C8_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" void ov98_022499C8(Strbuf *param0, char * param1, int param2); void ov98_02249A80(void); diff --git a/include/overlay098/struct_ov98_02246E88.h b/include/overlay098/struct_ov98_02246E88.h index c031659539..750b4f5776 100644 --- a/include/overlay098/struct_ov98_02246E88.h +++ b/include/overlay098/struct_ov98_02246E88.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_STRUCT_OV98_02246E88_H #include "struct_decls/struct_020067E8_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020279FC.h" #include "struct_decls/struct_021C0794_decl.h" #include "overlay096/struct_ov96_0223B574.h" diff --git a/include/overlay104/struct_ov104_022320B4_t.h b/include/overlay104/struct_ov104_022320B4_t.h index 448289c7f3..c840c085ce 100644 --- a/include/overlay104/struct_ov104_022320B4_t.h +++ b/include/overlay104/struct_ov104_022320B4_t.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_decls/struct_0209B75C_decl.h" #include "overlay104/struct_ov104_0222E8C8.h" diff --git a/include/overlay109/struct_ov109_021D5140.h b/include/overlay109/struct_ov109_021D5140.h index 80bd382fea..466731e8a9 100644 --- a/include/overlay109/struct_ov109_021D5140.h +++ b/include/overlay109/struct_ov109_021D5140.h @@ -11,7 +11,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_0209BDF8.h" diff --git a/include/overlay117/ov117_02263AF0.h b/include/overlay117/ov117_02263AF0.h index d29e2cac8e..c8d6663bc9 100644 --- a/include/overlay117/ov117_02263AF0.h +++ b/include/overlay117/ov117_02263AF0.h @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200D0F4_decl.h" #include "struct_decls/struct_02012744_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay117/struct_ov117_02261280_decl.h" #include "overlay117/struct_ov117_02263DAC.h" #include "overlay117/struct_ov117_02264E84.h" diff --git a/include/overlay117/struct_ov117_02261280.h b/include/overlay117/struct_ov117_02261280.h index 13910b4254..e95f7db60c 100644 --- a/include/overlay117/struct_ov117_02261280.h +++ b/include/overlay117/struct_ov117_02261280.h @@ -11,7 +11,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020203AC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_0207C690.h" #include "overlay114/struct_ov114_0225CAD4_decl.h" diff --git a/include/strbuf.h b/include/strbuf.h index b746cfcca2..8a3b43b124 100644 --- a/include/strbuf.h +++ b/include/strbuf.h @@ -1,14 +1,12 @@ #ifndef POKEPLATINUM_STRBUF_H #define POKEPLATINUM_STRBUF_H -#include "struct_decls/struct_02023790_decl.h" - typedef u16 charcode_t; /** * Managed string buffer. */ -struct Strbuf { +typedef struct Strbuf { /// Maximum allocated size of the buffer. u16 maxSize; @@ -24,7 +22,7 @@ struct Strbuf { /// incorrectly in order to match the original byte-code. The correct /// definition method would be as `data[]`. charcode_t data[1]; -}; +} Strbuf; /** * Control codes for how to pad numeric strings. diff --git a/include/struct_decls/struct_itemdata_decl.h b/include/struct_decls/struct_itemdata_decl.h deleted file mode 100644 index 8e81a25640..0000000000 --- a/include/struct_decls/struct_itemdata_decl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_0207D3B0_DECL_H -#define POKEPLATINUM_STRUCT_0207D3B0_DECL_H - -typedef struct ItemData ItemData; - -#endif // POKEPLATINUM_STRUCT_0207D3B0_DECL_H diff --git a/include/struct_defs/struct_020158A8.h b/include/struct_defs/struct_020158A8.h index fc03cb7e71..a6a66a40a4 100644 --- a/include/struct_defs/struct_020158A8.h +++ b/include/struct_defs/struct_020158A8.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_STRUCT_020158A8_H #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef struct { UnkStruct_0200B144 * unk_00; diff --git a/include/struct_defs/struct_0201D738.h b/include/struct_defs/struct_0201D738.h index eab8fcebff..4125c030c2 100644 --- a/include/struct_defs/struct_0201D738.h +++ b/include/struct_defs/struct_0201D738.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_0201D738_H #define POKEPLATINUM_STRUCT_0201D738_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" typedef struct { diff --git a/include/struct_defs/struct_0202EE10_sub1.h b/include/struct_defs/struct_0202EE10_sub1.h index b3a1351579..abdde39d86 100644 --- a/include/struct_defs/struct_0202EE10_sub1.h +++ b/include/struct_defs/struct_0202EE10_sub1.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_0202EE10_SUB1_H #define POKEPLATINUM_STRUCT_0202EE10_SUB1_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef struct { u32 unk_00; diff --git a/include/struct_defs/struct_0205C924.h b/include/struct_defs/struct_0205C924.h index 9940e82b5e..76d8e62158 100644 --- a/include/struct_defs/struct_0205C924.h +++ b/include/struct_defs/struct_0205C924.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_STRUCT_0205C924_H #include "struct_defs/struct_02014A84.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef struct { Strbuf* unk_00; diff --git a/include/struct_defs/struct_0207ADB4_t.h b/include/struct_defs/struct_0207ADB4_t.h index 266b3837d5..e9ed9ae52d 100644 --- a/include/struct_defs/struct_0207ADB4_t.h +++ b/include/struct_defs/struct_0207ADB4_t.h @@ -11,7 +11,7 @@ #include "struct_decls/struct_02015F84_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_defs/struct_020279FC.h" diff --git a/include/struct_defs/struct_0207AE68_t.h b/include/struct_defs/struct_0207AE68_t.h index e0c49f76eb..27bcad4f18 100644 --- a/include/struct_defs/struct_0207AE68_t.h +++ b/include/struct_defs/struct_0207AE68_t.h @@ -10,7 +10,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02015F84_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_defs/struct_020279FC.h" #include "struct_decls/struct_0202CD88_decl.h" diff --git a/include/struct_defs/struct_0207CDEC.h b/include/struct_defs/struct_0207CDEC.h index adab678cf6..e9281b25e0 100644 --- a/include/struct_defs/struct_0207CDEC.h +++ b/include/struct_defs/struct_0207CDEC.h @@ -1,9 +1,9 @@ #ifndef POKEPLATINUM_STRUCT_0207CDEC_H #define POKEPLATINUM_STRUCT_0207CDEC_H -typedef struct { - u16 unk_00; - u16 unk_02; -} UnkStruct_0207CDEC; +typedef struct BagItem { + u16 item; + u16 quantity; +} BagItem; #endif // POKEPLATINUM_STRUCT_0207CDEC_H diff --git a/include/struct_defs/struct_0207F248.h b/include/struct_defs/struct_0207F248.h index 041e5fa8d1..5891e69562 100644 --- a/include/struct_defs/struct_0207F248.h +++ b/include/struct_defs/struct_0207F248.h @@ -11,7 +11,7 @@ #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_0207C690.h" #include "functypes/funcptr_0207F248.h" diff --git a/include/struct_defs/struct_020831B4.h b/include/struct_defs/struct_020831B4.h index b6fbfdb1d8..6e23ead896 100644 --- a/include/struct_defs/struct_020831B4.h +++ b/include/struct_defs/struct_020831B4.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_STRUCT_020831B4_H #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef struct { Strbuf* unk_00; diff --git a/include/struct_defs/struct_0208737C.h b/include/struct_defs/struct_0208737C.h index b900378a41..10a4bfb088 100644 --- a/include/struct_defs/struct_0208737C.h +++ b/include/struct_defs/struct_0208737C.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_0208737C_H #define POKEPLATINUM_STRUCT_0208737C_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020279FC.h" #include "struct_decls/struct_020797DC_decl.h" diff --git a/include/struct_defs/struct_02089438.h b/include/struct_defs/struct_02089438.h index 057745b8d5..f5f5518315 100644 --- a/include/struct_defs/struct_02089438.h +++ b/include/struct_defs/struct_02089438.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_02089438_H #define POKEPLATINUM_STRUCT_02089438_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020279FC.h" typedef struct { diff --git a/include/struct_defs/struct_0208D1D4.h b/include/struct_defs/struct_0208D1D4.h index b5d3b550bf..0938e460b6 100644 --- a/include/struct_defs/struct_0208D1D4.h +++ b/include/struct_defs/struct_0208D1D4.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_0208D1D4_H #define POKEPLATINUM_STRUCT_0208D1D4_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef struct { Strbuf* unk_00; diff --git a/include/struct_defs/struct_0208D7BC.h b/include/struct_defs/struct_0208D7BC.h index 894be36ca2..f2105e3aa8 100644 --- a/include/struct_defs/struct_0208D7BC.h +++ b/include/struct_defs/struct_0208D7BC.h @@ -10,7 +10,7 @@ #include "struct_decls/struct_0200D0F4_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_0208D1D4.h" #include "struct_defs/struct_0208D7BC_sub1.h" diff --git a/include/struct_defs/struct_02090800_sub1.h b/include/struct_defs/struct_02090800_sub1.h index d84a068725..74baf68cdc 100644 --- a/include/struct_defs/struct_02090800_sub1.h +++ b/include/struct_defs/struct_02090800_sub1.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_02090800_SUB1_H #define POKEPLATINUM_STRUCT_02090800_SUB1_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" typedef struct { int unk_00; diff --git a/include/struct_defs/struct_02093800.h b/include/struct_defs/struct_02093800.h index d30e23510d..415923f0ba 100644 --- a/include/struct_defs/struct_02093800.h +++ b/include/struct_defs/struct_02093800.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_02093800_H #define POKEPLATINUM_STRUCT_02093800_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/struct_020279FC.h" #include "struct_decls/struct_0202A750_decl.h" diff --git a/include/struct_defs/struct_02095C48_sub1.h b/include/struct_defs/struct_02095C48_sub1.h index 34602a8f74..be2ef96b0e 100644 --- a/include/struct_defs/struct_02095C48_sub1.h +++ b/include/struct_defs/struct_02095C48_sub1.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_02095C48_SUB1_H #define POKEPLATINUM_STRUCT_02095C48_SUB1_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02029C88_decl.h" #include "struct_defs/pokemon.h" #include "struct_defs/struct_020954F0.h" diff --git a/include/struct_defs/struct_02095E80_t.h b/include/struct_defs/struct_02095E80_t.h index fd8ac8b491..7f0700c4f2 100644 --- a/include/struct_defs/struct_02095E80_t.h +++ b/include/struct_defs/struct_02095E80_t.h @@ -15,7 +15,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_02027F8C.h" #include "struct_decls/struct_02027F8C_decl.h" #include "struct_decls/struct_0202B370_decl.h" diff --git a/include/struct_defs/struct_02095EAC_t.h b/include/struct_defs/struct_02095EAC_t.h index fb55df320d..3e4ef3a3b1 100644 --- a/include/struct_defs/struct_02095EAC_t.h +++ b/include/struct_defs/struct_02095EAC_t.h @@ -10,7 +10,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/struct_0203DDFC.h" #include "struct_defs/struct_0205AA50.h" diff --git a/include/struct_defs/struct_020961E8_t.h b/include/struct_defs/struct_020961E8_t.h index 76896cbda3..c3581965d1 100644 --- a/include/struct_defs/struct_020961E8_t.h +++ b/include/struct_defs/struct_020961E8_t.h @@ -11,7 +11,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/struct_0203DE34.h" #include "struct_defs/struct_0205AA50.h" diff --git a/include/struct_defs/struct_020978D8.h b/include/struct_defs/struct_020978D8.h index 12db258b81..347ac75ac0 100644 --- a/include/struct_defs/struct_020978D8.h +++ b/include/struct_defs/struct_020978D8.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_STRUCT_020978D8_H #include "struct_defs/struct_02014A84.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020279FC.h" #include "struct_defs/union_02028328.h" diff --git a/include/unk_02002B7C.h b/include/unk_02002B7C.h index 782f198d49..b09846ac09 100644 --- a/include/unk_02002B7C.h +++ b/include/unk_02002B7C.h @@ -3,7 +3,7 @@ #include "struct_defs/struct_02002328.h" #include "struct_defs/struct_0201D834.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" void sub_02002B7C(void); void sub_02002BB8(int param0, u32 param1); diff --git a/include/unk_0200AC5C.h b/include/unk_0200AC5C.h index 3022f291cf..ca77f187d3 100644 --- a/include/unk_0200AC5C.h +++ b/include/unk_0200AC5C.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200AC5C_decl.h" #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" UnkStruct_0200AC5C * sub_0200AC5C(u32 param0, u32 param1, u32 param2); void sub_0200AC64(UnkStruct_0200AC5C * param0); diff --git a/include/unk_0200B29C.h b/include/unk_0200B29C.h index 69587efe31..b40a0a6a07 100644 --- a/include/unk_0200B29C.h +++ b/include/unk_0200B29C.h @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" Strbuf* sub_0200B29C(UnkStruct_0200B358 * param0, UnkStruct_0200B144 * param1, u32 param2, u32 param3); Strbuf* sub_0200B2EC(u32 param0, u32 param1); diff --git a/include/unk_0200B358.h b/include/unk_0200B358.h index 3dfa9e4806..3fd6c07471 100644 --- a/include/unk_0200B358.h +++ b/include/unk_0200B358.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_UNK_0200B358_H #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/box_pokemon.h" #include "struct_decls/struct_020797DC_decl.h" diff --git a/include/unk_02013A04.h b/include/unk_02013A04.h index 3bd23d0090..df53c9542f 100644 --- a/include/unk_02013A04.h +++ b/include/unk_02013A04.h @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02013A04_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" UnkStruct_02013A04 * sub_02013A04(u32 param0, u32 param1); void sub_02013A3C(UnkStruct_02013A04 * param0); diff --git a/include/unk_02014A84.h b/include/unk_02014A84.h index e50816e075..5d122efacf 100644 --- a/include/unk_02014A84.h +++ b/include/unk_02014A84.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_UNK_02014A84_H #include "struct_defs/struct_02014A84.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" void sub_02014A84(UnkStruct_02014A84 * param0); void sub_02014A9C(UnkStruct_02014A84 * param0, u32 param1); diff --git a/include/unk_02014D38.h b/include/unk_02014D38.h index a80775cd36..0bdc719eb7 100644 --- a/include/unk_02014D38.h +++ b/include/unk_02014D38.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_02014D38_decl.h" #include "struct_decls/struct_02014EC4_decl.h" #include "struct_decls/struct_02014FB0_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_021C0794_decl.h" UnkStruct_02014D38 * sub_02014D38(u32 param0); diff --git a/include/unk_020158A8.h b/include/unk_020158A8.h index 9d767bd4c7..a6e5d77d98 100644 --- a/include/unk_020158A8.h +++ b/include/unk_020158A8.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_UNK_020158A8_H #include "struct_defs/struct_020158A8.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" UnkStruct_020158A8 * sub_020158A8(int param0); void sub_020158F4(UnkStruct_020158A8 * param0); diff --git a/include/unk_0201D670.h b/include/unk_0201D670.h index 7b468a9fa1..7158b15377 100644 --- a/include/unk_0201D670.h +++ b/include/unk_0201D670.h @@ -5,7 +5,7 @@ #include "struct_defs/struct_0201D738.h" #include "struct_defs/struct_0201D834.h" #include "functypes/funcptr_0201D834.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" void sub_0201D670(const UnkStruct_0201D670 * param0); diff --git a/include/unk_02025E68.h b/include/unk_02025E68.h index 6115ec424b..3d2b98ec6f 100644 --- a/include/unk_02025E68.h +++ b/include/unk_02025E68.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_UNK_02025E68_H #define POKEPLATINUM_UNK_02025E68_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" int sub_02025E68(void); diff --git a/include/unk_0202602C.h b/include/unk_0202602C.h index 22192e57c5..78271e1789 100644 --- a/include/unk_0202602C.h +++ b/include/unk_0202602C.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_UNK_0202602C_H #define POKEPLATINUM_UNK_0202602C_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02026030_decl.h" #include "struct_defs/struct_0202610C.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/include/unk_02026150.h b/include/unk_02026150.h index e6b1980ae1..b66cc968fb 100644 --- a/include/unk_02026150.h +++ b/include/unk_02026150.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_UNK_02026150_H #define POKEPLATINUM_UNK_02026150_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0202610C.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/include/unk_020277A4.h b/include/unk_020277A4.h index b03f9316d7..7fda67bacb 100644 --- a/include/unk_020277A4.h +++ b/include/unk_020277A4.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_UNK_020277A4_H #include "struct_defs/struct_02014A84.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202783C_decl.h" #include "struct_decls/struct_02027854_decl.h" #include "struct_decls/struct_02027860_decl.h" diff --git a/include/unk_020298BC.h b/include/unk_020298BC.h index 3368008456..3c56b27799 100644 --- a/include/unk_020298BC.h +++ b/include/unk_020298BC.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_UNK_020298BC_H #define POKEPLATINUM_UNK_020298BC_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020298D8.h" #include "struct_decls/struct_02029C68_decl.h" #include "struct_decls/struct_02029C88_decl.h" diff --git a/include/unk_0202ACE0.h b/include/unk_0202ACE0.h index d21b04a24c..e2ea98d0ed 100644 --- a/include/unk_0202ACE0.h +++ b/include/unk_0202ACE0.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_UNK_0202ACE0_H #define POKEPLATINUM_UNK_0202ACE0_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/include/unk_0202B37C.h b/include/unk_0202B37C.h index 18b2ea640a..73cb24596b 100644 --- a/include/unk_0202B37C.h +++ b/include/unk_0202B37C.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_UNK_0202B37C_H #define POKEPLATINUM_UNK_0202B37C_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202B4A0_decl.h" #include "struct_defs/struct_0202B510.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/include/unk_02030A80.h b/include/unk_02030A80.h index 8b5251484b..5c19699c72 100644 --- a/include/unk_02030A80.h +++ b/include/unk_02030A80.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_UNK_02030A80_H #include "struct_defs/struct_02014A84.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02030A80_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/include/unk_0205D8CC.h b/include/unk_0205D8CC.h index 477abeb4fa..89c6c11bc7 100644 --- a/include/unk_0205D8CC.h +++ b/include/unk_0205D8CC.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_UNK_0205D8CC_H #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020279FC.h" #include "struct_defs/struct_0205AA50.h" diff --git a/include/unk_02071CFC.h b/include/unk_02071CFC.h index e5e8f2eae2..de03a7dbbb 100644 --- a/include/unk_02071CFC.h +++ b/include/unk_02071CFC.h @@ -2,7 +2,7 @@ #define POKEPLATINUM_UNK_02071CFC_H #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" u32 sub_02071CFC(UnkStruct_0200B144 * param0, const int param1, Strbuf *param2); void sub_02071D10(const int param0, const u32 param1, Strbuf *param2); diff --git a/include/unk_02079170.h b/include/unk_02079170.h index d927f9b234..9bcd536874 100644 --- a/include/unk_02079170.h +++ b/include/unk_02079170.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_UNK_02079170_H #define POKEPLATINUM_UNK_02079170_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/trainer_data.h" #include "struct_decls/struct_021C0794_decl.h" #include "overlay006/battle_params.h" diff --git a/include/unk_020797C8.h b/include/unk_020797C8.h index 85c4df9aa1..7f4cadb620 100644 --- a/include/unk_020797C8.h +++ b/include/unk_020797C8.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_UNK_020797C8_H #define POKEPLATINUM_UNK_020797C8_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/box_pokemon.h" #include "struct_decls/struct_020797DC_decl.h" diff --git a/include/unk_0207CB08.h b/include/unk_0207CB08.h index 0b9117c7b4..51f29a026f 100644 --- a/include/unk_0207CB08.h +++ b/include/unk_0207CB08.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_UNK_0207CB08_H #define POKEPLATINUM_UNK_0207CB08_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0207CB08_decl.h" #include "struct_defs/struct_0207CDEC.h" #include "struct_decls/struct_021C0794_decl.h" @@ -10,7 +10,7 @@ UnkStruct_0207CB08 * sub_0207CB08(u8 param0); u32 sub_0207CB20(void); void sub_0207CB24(UnkStruct_0207CB08 * param0, u8 param1); void sub_0207CB2C(UnkStruct_0207CB08 * param0, UnkStruct_021C0794 * param1, u8 param2, void * param3); -void sub_0207CB48(UnkStruct_0207CB08 * param0, UnkStruct_0207CDEC * param1, u8 param2, u8 param3); +void sub_0207CB48(UnkStruct_0207CB08 * param0, BagItem * param1, u8 param2, u8 param3); void sub_0207CB58(UnkStruct_0207CB08 * param0); void sub_0207CB6C(UnkStruct_0207CB08 * param0, void * param1); void sub_0207CB70(UnkStruct_0207CB08 * param0, u8 param1); diff --git a/include/unk_0207D3B8.h b/include/unk_0207D3B8.h index c0fe6a5cef..26f8a50d38 100644 --- a/include/unk_0207D3B8.h +++ b/include/unk_0207D3B8.h @@ -15,15 +15,15 @@ void sub_0207D404(UnkStruct_0207D3C0 * param0, u32 param1); BOOL sub_0207D55C(UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 param3); BOOL sub_0207D570(UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 param3); BOOL sub_0207D60C(UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 param3); -BOOL sub_0207D658(UnkStruct_0207CDEC * param0, u32 param1, u16 param2, u16 param3, u32 param4); +BOOL sub_0207D658(BagItem * param0, u32 param1, u16 param2, u16 param3, u32 param4); BOOL sub_0207D688(UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 param3); BOOL sub_0207D69C(UnkStruct_0207D3C0 * param0, u32 param1); u16 sub_0207D730(UnkStruct_0207D3C0 * param0, u16 param1, u32 param2); -u16 sub_0207D748(UnkStruct_0207CDEC * param0, u32 param1, u16 param2, u32 param3); -void sub_0207D780(UnkStruct_0207CDEC * param0, const u32 param1); -void sub_0207D7CC(UnkStruct_0207CDEC * param0, const u32 param1); +u16 sub_0207D748(BagItem * param0, u32 param1, u16 param2, u32 param3); +void sub_0207D780(BagItem * param0, const u32 param1); +void sub_0207D7CC(BagItem * param0, const u32 param1); void * sub_0207D824(UnkStruct_0207D3C0 * param0, const u8 * param1, u32 param2); -UnkStruct_0207CDEC * sub_0207D910(UnkStruct_0207D3C0 * param0, u16 param1, u16 param2); +BagItem * sub_0207D910(UnkStruct_0207D3C0 * param0, u16 param1, u16 param2); UnkStruct_0207D3C0 * sub_0207D990(UnkStruct_021C0794 * param0); UnkStruct_0207D99C * sub_0207D99C(u32 param0); void sub_0207D9B4(UnkStruct_0207D99C * param0, u32 param1, u8 * param2, u8 * param3); diff --git a/include/unk_020998EC.h b/include/unk_020998EC.h index 7aed081c8c..4290de3415 100644 --- a/include/unk_020998EC.h +++ b/include/unk_020998EC.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_UNK_020998EC_H #define POKEPLATINUM_UNK_020998EC_H -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0209747C_decl.h" #include "struct_decls/struct_020998EC_decl.h" diff --git a/res/itemtool/itemdata/pl_item_data.csv b/res/itemtool/itemdata/pl_item_data.csv index 57c5e46f85..9b63d3b026 100644 --- a/res/itemtool/itemdata/pl_item_data.csv +++ b/res/itemtool/itemdata/pl_item_data.csv @@ -1,4 +1,4 @@ -item,price,holdEffect,holdEffectParam,pluckEffect,flingEffect,flingPower,naturalGiftPower,naturalGiftType,prevent_toss,selectable,fieldPocket,battlePocket,fieldUseFunc,battleUseFunc,partyUse,slp_heal,psn_heal,brn_heal,frz_heal,prz_heal,cfs_heal,inf_heal,guard_spec,revive,revive_all,level_up,evolve,atk_stages,def_stages,spatk_stages,spdef_stages,speed_stages,accuracy_stages,critrate_stages,pp_up,pp_max,pp_restore,pp_restore_all,hp_restore,hp_ev_up,atk_ev_up,def_ev_up,speed_ev_up,spatk_ev_up,spdef_ev_up,friendship_mod_lo,friendship_mod_med,friendship_mod_hi,hp_ev_up_param,atk_ev_up_param,def_ev_up_param,speed_ev_up_param,spatk_ev_up_param,spdef_ev_up_param,hp_restore_param,pp_restore_param,friendship_mod_lo_param,friendship_mod_med_param,friendship_mod_hi_param +item,price,holdEffect,holdEffectParam,pluckEffect,flingEffect,flingPower,naturalGiftPower,naturalGiftType,prevent_toss,selectable,fieldPocket,battlePocket,fieldUseFunc,battleUseFunc,partyUse,healSleep,healPoison,healBurn,healFreeze,healParalysis,healConfusion,healAttract,guardSpec,revive,reviveAll,levelUp,evolve,atkStages,defStages,spatkStages,spdefStages,speedStages,accStages,critStages,ppUp,ppMax,ppRestore,ppRestoreAll,hpRestore,giveHPEVs,giveAtkEVs,giveDefEVs,giveSpeedEVs,giveSpAtkEVs,giveSpDefEVs,giveFriendshipLow,giveFriendshipMed,giveFriendshipHigh,hpEVs,atkEVs,defEVs,speedEVs,spatkEVs,spdefEVs,hpRestored,ppRestored,friendshipLow,friendshipMed,friendshipHigh ITEM_NONE,0,HOLD_EFFECT_NONE,0,0,0,0,0,TYPE_NORMAL,false,false,POCKET_ITEMS,0,0,0,0,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,false,false,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,0,0,0,0 ITEM_MASTER_BALL,0,HOLD_EFFECT_NONE,0,0,0,0,0,31,false,false,POCKET_BALLS,1,0,1,0,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,false,false,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,0,0,0,0 ITEM_ULTRA_BALL,1200,HOLD_EFFECT_NONE,0,0,0,0,0,31,false,false,POCKET_BALLS,1,0,1,0,true,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,false,false,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,0,0,0,0 @@ -50,11 +50,11 @@ ITEM_IRON,9800,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_MEDICINE,0,1,0, ITEM_CARBOS,9800,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_MEDICINE,0,1,0,1,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,false,false,false,false,false,false,false,false,true,false,false,true,true,true,0,0,0,10,0,0,0,0,5,3,2 ITEM_CALCIUM,9800,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_MEDICINE,0,1,0,1,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,false,false,false,false,false,false,false,false,false,true,false,true,true,true,0,0,0,0,10,0,0,0,5,3,2 ITEM_RARE_CANDY,4800,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_MEDICINE,0,1,0,1,false,false,false,false,false,false,false,false,true,false,true,false,0,0,0,0,0,0,0,false,false,false,false,false,false,false,false,false,false,false,true,true,true,0,0,0,0,0,0,0,0,5,3,2 -ITEM_PP_UP,9800,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_MEDICINE,0,1,0,1,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,true,false,false,false,false,false,false,false,false,false,false,true,true,true,0,0,0,0,0,0,0,0,5,3,2 +ITEM_ppUp,9800,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_MEDICINE,0,1,0,1,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,true,false,false,false,false,false,false,false,false,false,false,true,true,true,0,0,0,0,0,0,0,0,5,3,2 ITEM_ZINC,9800,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_MEDICINE,0,1,0,1,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,false,false,false,false,false,false,false,false,false,false,true,true,true,true,0,0,0,0,0,10,0,0,5,3,2 -ITEM_PP_MAX,9800,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_MEDICINE,0,1,0,1,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,false,true,false,false,false,false,false,false,false,false,false,true,true,true,0,0,0,0,0,0,0,0,5,3,2 +ITEM_ppMax,9800,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_MEDICINE,0,1,0,1,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,false,true,false,false,false,false,false,false,false,false,false,true,true,true,0,0,0,0,0,0,0,0,5,3,2 ITEM_OLD_GATEAU,200,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_MEDICINE,8,1,2,1,true,true,true,true,true,true,false,false,false,false,false,false,0,0,0,0,0,0,0,false,false,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,0,0,0,0,0 -ITEM_GUARD_SPEC_,700,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_BATTLE_ITEMS,2,0,0,1,false,false,false,false,false,false,false,true,false,false,false,false,0,0,0,0,0,0,0,false,false,false,false,false,false,false,false,false,false,false,true,true,false,0,0,0,0,0,0,0,0,1,1,0 +ITEM_guardSpec_,700,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_BATTLE_ITEMS,2,0,0,1,false,false,false,false,false,false,false,true,false,false,false,false,0,0,0,0,0,0,0,false,false,false,false,false,false,false,false,false,false,false,true,true,false,0,0,0,0,0,0,0,0,1,1,0 ITEM_DIRE_HIT,650,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_BATTLE_ITEMS,2,0,0,1,false,false,false,false,false,false,false,false,false,false,false,false,0,0,0,0,0,0,1,false,false,false,false,false,false,false,false,false,false,false,true,true,false,0,0,0,0,0,0,0,0,1,1,0 ITEM_X_ATTACK,500,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_BATTLE_ITEMS,2,0,0,1,false,false,false,false,false,false,false,false,false,false,false,false,1,0,0,0,0,0,0,false,false,false,false,false,false,false,false,false,false,false,true,true,false,0,0,0,0,0,0,0,0,1,1,0 ITEM_X_DEFENSE,550,HOLD_EFFECT_NONE,0,0,0,30,0,31,false,false,POCKET_BATTLE_ITEMS,2,0,0,1,false,false,false,false,false,false,false,false,false,false,false,false,0,1,0,0,0,0,0,false,false,false,false,false,false,false,false,false,false,false,true,true,false,0,0,0,0,0,0,0,0,1,1,0 diff --git a/res/itemtool/itemdata/pl_item_data_format.txt b/res/itemtool/itemdata/pl_item_data_format.txt index 97af8b5eb7..ec8b9b2bd1 100644 --- a/res/itemtool/itemdata/pl_item_data_format.txt +++ b/res/itemtool/itemdata/pl_item_data_format.txt @@ -15,48 +15,48 @@ fieldUseFunc:u8 battleUseFunc:u8 partyUse:u8 padding_0D:pad1 -slp_heal:u8.1:bool -psn_heal:u8.1:bool -brn_heal:u8.1:bool -frz_heal:u8.1:bool -prz_heal:u8.1:bool -cfs_heal:u8.1:bool -inf_heal:u8.1:bool -guard_spec:u8.1:bool +healSleep:u8.1:bool +healPoison:u8.1:bool +healBurn:u8.1:bool +healFreeze:u8.1:bool +healParalysis:u8.1:bool +healConfusion:u8.1:bool +healAttract:u8.1:bool +guardSpec:u8.1:bool revive:u8.1:bool -revive_all:u8.1:bool -level_up:u8.1:bool +reviveAll:u8.1:bool +levelUp:u8.1:bool evolve:u8.1:bool -atk_stages:u8.4 -def_stages:u8.4 -spatk_stages:u8.4 -spdef_stages:u8.4 -speed_stages:u8.4 -accuracy_stages:u8.4 -critrate_stages:u8.2 -pp_up:u8.1:bool -pp_max:u8.1:bool -pp_restore:u8.1:bool -pp_restore_all:u8.1:bool -hp_restore:u8.1:bool -hp_ev_up:u8.1:bool -atk_ev_up:u8.1:bool -def_ev_up:u8.1:bool -speed_ev_up:u8.1:bool -spatk_ev_up:u8.1:bool -spdef_ev_up:u8.1:bool -friendship_mod_lo:u8.1:bool -friendship_mod_med:u8.1:bool -friendship_mod_hi:u8.1:bool -hp_ev_up_param:s8 -atk_ev_up_param:s8 -def_ev_up_param:s8 -speed_ev_up_param:s8 -spatk_ev_up_param:s8 -spdef_ev_up_param:s8 -hp_restore_param:u8 -pp_restore_param:u8 -friendship_mod_lo_param:s8 -friendship_mod_med_param:s8 -friendship_mod_hi_param:s8 +atkStages:u8.4 +defStages:u8.4 +spatkStages:u8.4 +spdefStages:u8.4 +speedStages:u8.4 +accStages:u8.4 +critStages:u8.2 +ppUp:u8.1:bool +ppMax:u8.1:bool +ppRestore:u8.1:bool +ppRestoreAll:u8.1:bool +hpRestore:u8.1:bool +giveHPEVs:u8.1:bool +giveAtkEVs:u8.1:bool +giveDefEVs:u8.1:bool +giveSpeedEVs:u8.1:bool +giveSpAtkEVs:u8.1:bool +giveSpDefEVs:u8.1:bool +giveFriendshipLow:u8.1:bool +giveFriendshipMed:u8.1:bool +giveFriendshipHigh:u8.1:bool +hpEVs:s8 +atkEVs:s8 +defEVs:s8 +speedEVs:s8 +spatkEVs:s8 +spdefEVs:s8 +hpRestored:u8 +ppRestored:u8 +friendshipLow:s8 +friendshipMed:s8 +friendshipHigh:s8 partyparampad:pad2 diff --git a/src/berry_data.c b/src/berry_data.c index b706a8fbc9..509c810dbd 100644 --- a/src/berry_data.c +++ b/src/berry_data.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "narc.h" #include "unk_0200AC5C.h" diff --git a/src/error_message_reset.c b/src/error_message_reset.c index 539d242829..db05d5c54a 100644 --- a/src/error_message_reset.c +++ b/src/error_message_reset.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_02017E74.h" #include "struct_defs/struct_0205AA50.h" diff --git a/src/item.c b/src/item.c index 6db98a6d11..d922af68ff 100644 --- a/src/item.c +++ b/src/item.c @@ -1,29 +1,29 @@ #include #include +#include "constants/items.h" +#include "constants/moves.h" + #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" #include "struct_defs/struct_0207CDEC.h" -#include "narc.h" #include "unk_0200AC5C.h" #include "heap.h" #include "item.h" - -#include "constants/items.h" -#include "constants/moves.h" +#include "narc.h" +#include "strbuf.h" typedef struct { - u16 dataArchiveID; - u16 imageArchiveID; - u16 palArchiveID; + u16 dataID; + u16 iconID; + u16 paletteID; u16 gen3ID; -} UnkStruct_020F0CC4; +} ItemArchiveIDs; -static s32 GetPartyAttribute(ItemPartyParam * param0, u16 param1); +static s32 ItemPartyParam_Get(ItemPartyParam * partyParam, enum ItemDataParam attributeID); -const UnkStruct_020F0CC4 sItemNarcIDs[] = { +const ItemArchiveIDs sItemArchiveIDs[] = { { 0x0, 0x2C3, 0x2C4, 0x0 }, { 0x1, 0x2, 0x3, 0x1 }, { 0x2, 0x4, 0x5, 0x2 }, @@ -494,7 +494,7 @@ const UnkStruct_020F0CC4 sItemNarcIDs[] = { { 0x1BD, 0x2C1, 0x2C2, 0x15F } }; -static const u16 sMovesTMHM[] = { +static const u16 sTMHMMoves[] = { MOVE_FOCUS_PUNCH, // TM01 MOVE_DRAGON_CLAW, // TM02 MOVE_WATER_PULSE, // TM03 @@ -679,300 +679,293 @@ const u16 sBerryItemIDs[] = { ITEM_ROWAP_BERRY }; -void sub_0207CDEC (void * param0, u16 param1, u16 param2) +void Item_MoveInPocket(void *pocket, u16 srcSlot, u16 dstSlot) { - UnkStruct_0207CDEC * v0; - UnkStruct_0207CDEC v1; - s16 v2; - - if (param1 == param2) { + if (srcSlot == dstSlot) { return; } - v0 = (UnkStruct_0207CDEC *)param0; - v1 = v0[param1]; - - if (param2 > param1) { - param2 -= 1; + BagItem *items = (BagItem *)pocket; + BagItem item = items[srcSlot]; + s16 i; // must be here to match + if (dstSlot > srcSlot) { + // Moving the item down in the pocket list + dstSlot -= 1; - for (v2 = (s16)param1; v2 < (s16)param2; v2++) { - v0[v2] = v0[v2 + 1]; + // Bubble all the other items upward + for (i = (s16)srcSlot; i < (s16)dstSlot; i++) { + items[i] = items[i + 1]; } } else { - for (v2 = (s16)param1; v2 > (s16)param2; v2--) { - v0[v2] = v0[v2 - 1]; + // Moving the item up in the pocket list + // Sift all the other items downward + for (i = (s16)srcSlot; i > (s16)dstSlot; i--) { + items[i] = items[i - 1]; } } - v0[param2] = v1; + items[dstSlot] = item; } -u16 sub_0207CE78 (u16 param0, u16 param1) +u16 Item_FileID(u16 item, enum ItemFileType type) { - switch (param1) { - case 0: - if ((param0 == 0) || (param0 == 0xffff)) { + switch (type) { + case ITEM_FILE_TYPE_DATA: + if (item == ITEM_NONE || item == ITEM_RETURN_ID) { break; } - return sItemNarcIDs[param0].dataArchiveID; - case 1: - if (param0 == 0) { + return sItemArchiveIDs[item].dataID; + case ITEM_FILE_TYPE_ICON: + if (item == ITEM_NONE) { return 707; } - if (param0 == 0xffff) { + if (item == ITEM_RETURN_ID) { return 709; } - return sItemNarcIDs[param0].imageArchiveID; - case 2: - if (param0 == 0) { + return sItemArchiveIDs[item].iconID; + case ITEM_FILE_TYPE_PALETTE: + if (item == 0) { return 708; } - if (param0 == 0xffff) { + if (item == ITEM_RETURN_ID) { return 710; } - return sItemNarcIDs[param0].palArchiveID; - case 3: - if ((param0 == 0) || (param0 == 0xffff)) { + return sItemArchiveIDs[item].paletteID; + case ITEM_FILE_TYPE_GBA: + if (item == ITEM_NONE || item == ITEM_RETURN_ID) { break; } - return sItemNarcIDs[param0].gen3ID; + return sItemArchiveIDs[item].gen3ID; } return 0; } -u16 sub_0207CF10 (u16 param0) +u16 Item_FromGBAID(u16 gbaID) { - u16 v0; - - for (v0 = 1; v0 <= 467; v0++) { - if (param0 == sItemNarcIDs[v0].gen3ID) { - return v0; + for (u16 i = 1; i <= NUM_ITEMS; i++) { + if (gbaID == sItemArchiveIDs[i].gen3ID) { + return i; } } - return 0; + return ITEM_NONE; } -u16 Item_GetIndexOfIconNCER (void) +u16 Item_IconNCERFile (void) { return 1; } -u16 Item_GetIndexOfIconNANR (void) +u16 Item_IconNANRFile (void) { return 0; } -void * Item_LoadDataOrGFX (u16 itemID, u16 attributeID, u32 heapID) +void* Item_Load(u16 item, enum ItemFileType type, u32 heapID) { - if (itemID > 467) { - itemID = 0; + if (item > NUM_ITEMS) { + item = ITEM_NONE; } - switch (attributeID) { - case 0: - return NARC_AllocAndReadWholeMemberByIndexPair(NARC_INDEX_ITEMTOOL__ITEMDATA__PL_ITEM_DATA, sItemNarcIDs[itemID].dataArchiveID, heapID); - case 1: - return NARC_AllocAndReadWholeMemberByIndexPair(NARC_INDEX_ITEMTOOL__ITEMDATA__ITEM_ICON, sItemNarcIDs[itemID].imageArchiveID, heapID); - case 2: - return NARC_AllocAndReadWholeMemberByIndexPair(NARC_INDEX_ITEMTOOL__ITEMDATA__ITEM_ICON, sItemNarcIDs[itemID].palArchiveID, heapID); + switch (type) { + case ITEM_FILE_TYPE_DATA: + return NARC_AllocAndReadWholeMemberByIndexPair(NARC_INDEX_ITEMTOOL__ITEMDATA__PL_ITEM_DATA, sItemArchiveIDs[item].dataID, heapID); + case ITEM_FILE_TYPE_ICON: + return NARC_AllocAndReadWholeMemberByIndexPair(NARC_INDEX_ITEMTOOL__ITEMDATA__ITEM_ICON, sItemArchiveIDs[item].iconID, heapID); + case ITEM_FILE_TYPE_PALETTE: + return NARC_AllocAndReadWholeMemberByIndexPair(NARC_INDEX_ITEMTOOL__ITEMDATA__ITEM_ICON, sItemArchiveIDs[item].paletteID, heapID); } return NULL; } -void Item_GetNameIntoString (Strbuf* dest, u16 itemID, u32 heapID) +void Item_LoadName(Strbuf *dst, u16 item, u32 heapID) { - UnkStruct_0200B144 * msgData = sub_0200B144(1, 26, 392, heapID); + UnkStruct_0200B144 *msgData = sub_0200B144(1, 26, 392, heapID); - sub_0200B1B8(msgData, itemID, dest); + sub_0200B1B8(msgData, item, dst); sub_0200B190(msgData); } -void Item_GetDescriptionIntoString (Strbuf* dest, u16 itemID, u16 heapID) +void Item_LoadDescription(Strbuf *dst, u16 item, u16 heapID) { - UnkStruct_0200B144 * msgData = sub_0200B144(1, 26, 391, heapID); + UnkStruct_0200B144 *msgData = sub_0200B144(1, 26, 391, heapID); - sub_0200B1B8(msgData, itemID, dest); + sub_0200B1B8(msgData, item, dst); sub_0200B190(msgData); } -s32 Item_GetAttribute (u16 itemID, u16 attributeID, u32 heapID) +s32 Item_LoadParam(u16 item, enum ItemDataParam param, u32 heapID) { - ItemData * v0; - s32 v1; + ItemData *itemData = (ItemData *)Item_Load(item, 0, heapID); + s32 val = Item_Get(itemData, param); + Heap_FreeToHeapExplicit(heapID, itemData); - v0 = (ItemData *)Item_LoadDataOrGFX(itemID, 0, heapID); - v1 = Item_GetAttributeFromStruct(v0, attributeID); - Heap_FreeToHeapExplicit(heapID, v0); - - return v1; + return val; } -s32 Item_GetAttributeFromStruct (ItemData * itemData, u16 attributeID) +s32 Item_Get(ItemData *itemData, enum ItemDataParam param) { - switch (attributeID) { - case 0: + switch (param) { + case ITEM_PARAM_PRICE: return (s32)itemData->price; - case 1: + case ITEM_PARAM_HOLD_EFFECT: return (s32)itemData->holdEffect; - case 2: + case ITEM_PARAM_HOLD_EFFECT_PARAM: return (s32)itemData->holdEffectParam; - case 3: + case ITEM_PARAM_PREVENT_TOSS: return (s32)itemData->preventToss; - case 4: + case ITEM_PARAM_IS_SELECTABLE: return (s32)itemData->isSelectable; - case 5: + case ITEM_PARAM_FIELD_POCKET: return (s32)itemData->fieldPocket; - case 6: + case ITEM_PARAM_FIELD_USE_FUNC: return (s32)itemData->fieldUseFunc; - case 7: + case ITEM_PARAM_BATTLE_USE_FUNC: return (s32)itemData->battleUseFunc; - case 8: + case ITEM_PARAM_PLUCK_EFFECT: return (s32)itemData->pluckEffect; - case 9: + case ITEM_PARAM_FLING_EFFECT: return (s32)itemData->flingEffect; - case 10: + case ITEM_PARAM_FLING_POWER: return (s32)itemData->flingPower; - case 11: + case ITEM_PARAM_NATURAL_GIFT_POWER: return (s32)itemData->naturalGiftPower; - case 12: + case ITEM_PARAM_NATURAL_GIFT_TYPE: return (s32)itemData->naturalGiftType; - case 13: + case ITEM_PARAM_BATTLE_POCKET: return (s32)itemData->battlePocket; - case 14: + case ITEM_PARAM_PARTY_USE: return (s32)itemData->partyUse; default: switch (itemData->partyUse) { - case 0: + case FALSE: return itemData->dummy; - case 1: - return GetPartyAttribute(&itemData->partyUseParam, attributeID); + case TRUE: + return ItemPartyParam_Get(&itemData->partyUseParam, param); } } return 0; } -static s32 GetPartyAttribute (ItemPartyParam * partyParam, u16 attributeID) +static s32 ItemPartyParam_Get(ItemPartyParam * partyParam, enum ItemDataParam attributeID) { switch (attributeID) { - case 15: - return (s32)partyParam->slp_heal; - case 16: - return (s32)partyParam->psn_heal; - case 17: - return (s32)partyParam->brn_heal; - case 18: - return (s32)partyParam->frz_heal; - case 19: - return (s32)partyParam->prz_heal; - case 20: - return (s32)partyParam->cfs_heal; - case 21: - return (s32)partyParam->inf_heal; - case 22: - return (s32)partyParam->guard_spec; - case 23: + case ITEM_PARAM_HEAL_SLEEP: + return (s32)partyParam->healSleep; + case ITEM_PARAM_HEAL_POISON: + return (s32)partyParam->healPoison; + case ITEM_PARAM_HEAL_BURN: + return (s32)partyParam->healBurn; + case ITEM_PARAM_HEAL_FREEZE: + return (s32)partyParam->healFreeze; + case ITEM_PARAM_HEAL_PARALYSIS: + return (s32)partyParam->healParalysis; + case ITEM_PARAM_HEAL_CONFUSION: + return (s32)partyParam->healConfusion; + case ITEM_PARAM_HEAL_ATTRACT: + return (s32)partyParam->healAttract; + case ITEM_PARAM_GUARD_SPEC: + return (s32)partyParam->guardSpec; + case ITEM_PARAM_REVIVE: return (s32)partyParam->revive; - case 24: - return (s32)partyParam->revive_all; - case 25: - return (s32)partyParam->level_up; - case 26: + case ITEM_PARAM_REVIVE_ALL: + return (s32)partyParam->reviveAll; + case ITEM_PARAM_LEVEL_UP: + return (s32)partyParam->levelUp; + case ITEM_PARAM_EVOLVE: return (s32)partyParam->evolve; - case 27: - return (s32)partyParam->atk_stages; - case 28: - return (s32)partyParam->def_stages; - case 29: - return (s32)partyParam->spatk_stages; - case 30: - return (s32)partyParam->spdef_stages; - case 31: - return (s32)partyParam->speed_stages; - case 32: - return (s32)partyParam->accuracy_stages; - case 33: - return (s32)partyParam->critrate_stages; - case 34: - return (s32)partyParam->pp_up; - case 35: - return (s32)partyParam->pp_max; - case 36: - return (s32)partyParam->pp_restore; - case 37: - return (s32)partyParam->pp_restore_all; - case 38: - return (s32)partyParam->hp_restore; - case 39: - return (s32)partyParam->hp_ev_up; - case 40: - return (s32)partyParam->atk_ev_up; - case 41: - return (s32)partyParam->def_ev_up; - case 42: - return (s32)partyParam->speed_ev_up; - case 43: - return (s32)partyParam->spatk_ev_up; - case 44: - return (s32)partyParam->spdef_ev_up; - case 45: - return (s32)partyParam->friendship_mod_lo; - case 46: - return (s32)partyParam->friendship_mod_med; - case 47: - return (s32)partyParam->friendship_mod_hi; - case 48: - return (s32)partyParam->hp_ev_up_param; - case 49: - return (s32)partyParam->atk_ev_up_param; - case 50: - return (s32)partyParam->def_ev_up_param; - case 51: - return (s32)partyParam->speed_ev_up_param; - case 52: - return (s32)partyParam->spatk_ev_up_param; - case 53: - return (s32)partyParam->spdef_ev_up_param; - case 54: - return (s32)partyParam->hp_restore_param; - case 55: - return (s32)partyParam->pp_restore_param; - case 56: - return (s32)partyParam->friendship_mod_lo_param; - case 57: - return (s32)partyParam->friendship_mod_med_param; - case 58: - return (s32)partyParam->friendship_mod_hi_param; + case ITEM_PARAM_ATK_STAGES: + return (s32)partyParam->atkStages; + case ITEM_PARAM_DEF_STAGES: + return (s32)partyParam->defStages; + case ITEM_PARAM_SPATK_STAGES: + return (s32)partyParam->spatkStages; + case ITEM_PARAM_SPDEF_STAGES: + return (s32)partyParam->spdefStages; + case ITEM_PARAM_SPEED_STAGES: + return (s32)partyParam->speedStages; + case ITEM_PARAM_ACC_STAGES: + return (s32)partyParam->accStages; + case ITEM_PARAM_CRIT_STAGES: + return (s32)partyParam->critStages; + case ITEM_PARAM_PP_UP: + return (s32)partyParam->ppUp; + case ITEM_PARAM_PP_MAX: + return (s32)partyParam->ppMax; + case ITEM_PARAM_PP_RESTORE: + return (s32)partyParam->ppRestore; + case ITEM_PARAM_PP_RESTORE_ALL: + return (s32)partyParam->ppRestoreAll; + case ITEM_PARAM_HP_RESTORE: + return (s32)partyParam->hpRestore; + case ITEM_PARAM_GIVE_HP_EVS: + return (s32)partyParam->giveHPEVs; + case ITEM_PARAM_GIVE_ATK_EVS: + return (s32)partyParam->giveAtkEVs; + case ITEM_PARAM_GIVE_DEF_EVS: + return (s32)partyParam->giveDefEVs; + case ITEM_PARAM_GIVE_SPEED_EVS: + return (s32)partyParam->giveSpeedEVs; + case ITEM_PARAM_GIVE_SPATK_EVS: + return (s32)partyParam->giveSpAtkEVs; + case ITEM_PARAM_GIVE_SPDEF_EVS: + return (s32)partyParam->giveSpDefEVs; + case ITEM_PARAM_GIVE_FRIENDSHIP_LOW: + return (s32)partyParam->giveFriendshipLow; + case ITEM_PARAM_GIVE_FRIENDSHIP_MED: + return (s32)partyParam->giveFriendshipMed; + case ITEM_PARAM_GIVE_FRIENDSHIP_HIGH: + return (s32)partyParam->giveFriendshipHigh; + case ITEM_PARAM_HP_EVS: + return (s32)partyParam->hpEVs; + case ITEM_PARAM_ATK_EVS: + return (s32)partyParam->atkEVs; + case ITEM_PARAM_DEF_EVS: + return (s32)partyParam->defEVs; + case ITEM_PARAM_SPEED_EVS: + return (s32)partyParam->speedEVs; + case ITEM_PARAM_SPATK_EVS: + return (s32)partyParam->spatkEVs; + case ITEM_PARAM_SPDEF_EVS: + return (s32)partyParam->spdefEVs; + case ITEM_PARAM_HP_RESTORED: + return (s32)partyParam->hpRestored; + case ITEM_PARAM_PP_RESTORED: + return (s32)partyParam->ppRestored; + case ITEM_PARAM_FRIENDSHIP_LOW: + return (s32)partyParam->friendshipLow; + case ITEM_PARAM_FRIENDSHIP_MED: + return (s32)partyParam->friendshipMed; + case ITEM_PARAM_FRIENDSHIP_HIGH: + return (s32)partyParam->friendshipHigh; } return 0; } -const u16 GetMoveFromTMOrHMItemID (u16 itemID) +const u16 Item_MoveForTMHM(u16 item) { - if ((itemID < 328) || (itemID > 427)) { - return 0; + if (item < ITEM_TM01 || item > ITEM_HM08) { + return MOVE_NONE; } - itemID -= 328; - return sMovesTMHM[itemID]; + item -= ITEM_TM01; + return sTMHMMoves[item]; } -u8 Item_IsMoveHM (u16 moveID) +u8 Item_IsHMMove(u16 move) { - u8 v0; - - for (v0 = 0; v0 < 8; v0++) { - if (sMovesTMHM[92 + v0] == moveID) { + for (u8 i = 0; i < 8; i++) { + if (sTMHMMoves[92 + i] == move) { return TRUE; } } @@ -980,21 +973,19 @@ u8 Item_IsMoveHM (u16 moveID) return FALSE; } -u8 Item_GetTMOrHMNumberFromID (u16 itemID) +u8 Item_TMHMNumber(u16 item) { - if ((itemID < 328) || (itemID > 427)) { - return 0; + if (item < ITEM_TM01 || item > ITEM_HM08) { + return ITEM_NONE; } - return itemID - 328; + return item - ITEM_TM01; } -u8 Item_IsMail (u16 itemID) +u8 Item_IsMail(u16 item) { - u32 i; - - for (i = 0; i < 12; i++) { - if (sMailItemIDs[i] == itemID) { + for (u32 i = 0; i < NUM_MAILS; i++) { + if (sMailItemIDs[i] == item) { return TRUE; } } @@ -1002,34 +993,30 @@ u8 Item_IsMail (u16 itemID) return FALSE; } -u8 sub_0207D2F0 (u16 param0) +u8 Item_MailNumber(u16 item) { - u32 i; - - for (i = 0; i < 12; i++) { - if (sMailItemIDs[i] == param0) { - return (u8)i; + for (u32 i = 0; i < NUM_MAILS; i++) { + if (sMailItemIDs[i] == item) { + return i; } } - return 0; + return ITEM_NONE; } -u16 sub_0207D310 (u8 param0) +u16 Item_ForMailNumber(u8 mail) { - if (param0 >= 12) { - return 0; + if (mail >= NUM_MAILS) { + return ITEM_NONE; } - return sMailItemIDs[param0]; + return sMailItemIDs[mail]; } -u8 Item_IsBerry (u16 itemID) +u8 Item_IsBerry(u16 item) { - u32 i; - - for (i = 0; i < 64; i++) { - if (sBerryItemIDs[i] == itemID) { + for (u32 i = 0; i < NUM_BERRIES; i++) { + if (sBerryItemIDs[i] == item) { return TRUE; } } @@ -1037,45 +1024,39 @@ u8 Item_IsBerry (u16 itemID) return FALSE; } -u8 sub_0207D344 (u16 param0) +u8 Item_BerryNumber(u16 item) { - if (param0 < 149) { - return 0xff; + if (item < ITEM_CHERI_BERRY) { + return 0xFF; } - return param0 - 149; + return item - ITEM_CHERI_BERRY; } -u16 sub_0207D354 (u8 param0) +u16 Item_ForBerryNumber(u8 berry) { - if (param0 >= 64) { - return 0xffff; + if (berry >= NUM_BERRIES) { + return ITEM_RETURN_ID; } - return sBerryItemIDs[param0]; + return sBerryItemIDs[berry]; } -u8 Item_IsHerbalMedicine (u16 itemID) +u8 Item_IsHerbalMedicine(u16 item) { - if ((itemID == 34) || (itemID == 35) || (itemID == 36) || (itemID == 37)) { - return TRUE; - } - - return FALSE; + return item == ITEM_ENERGYPOWDER + || item == ITEM_ENERGY_ROOT + || item == ITEM_HEAL_POWDER + || item == ITEM_REVIVAL_HERB; } -void * sub_0207D388 (int param0) +void* ItemTable_Load(int heapID) { - int v0 = sub_0207CE78(467, 0); - return NARC_AllocAndReadFromMemberByIndexPair(NARC_INDEX_ITEMTOOL__ITEMDATA__PL_ITEM_DATA, 0, param0, 0, 36 * v0); + int maxItem = Item_FileID(NUM_ITEMS, ITEM_FILE_TYPE_DATA); + return NARC_AllocAndReadFromMemberByIndexPair(NARC_INDEX_ITEMTOOL__ITEMDATA__PL_ITEM_DATA, 0, heapID, 0, sizeof(ItemData) * maxItem); } -ItemData * sub_0207D3B0 (ItemData * param0, u16 param1) +ItemData* ItemTable_Index(ItemData *itemTable, u16 index) { - u8 * v0; - - v0 = (u8 *)param0; - v0 += param1 * 36; - - return (ItemData *)v0; + return (ItemData *)((u8 *)itemTable + index * sizeof(ItemData)); } diff --git a/src/overlay005/ov5_021DC018.c b/src/overlay005/ov5_021DC018.c index 024b14d14d..0005b11f63 100644 --- a/src/overlay005/ov5_021DC018.c +++ b/src/overlay005/ov5_021DC018.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay005/struct_ov5_021DC1A4_decl.h" #include "struct_defs/struct_02013A04_t.h" diff --git a/src/overlay005/ov5_021DD42C.c b/src/overlay005/ov5_021DD42C.c index 89d0475e73..9290b969ba 100644 --- a/src/overlay005/ov5_021DD42C.c +++ b/src/overlay005/ov5_021DD42C.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0203E724_decl.h" #include "struct_defs/struct_02014A84.h" diff --git a/src/overlay005/ov5_021DD6FC.c b/src/overlay005/ov5_021DD6FC.c index 2350bafc3f..b9c7aac480 100644 --- a/src/overlay005/ov5_021DD6FC.c +++ b/src/overlay005/ov5_021DD6FC.c @@ -4,7 +4,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0203CDB0.h" #include "struct_defs/struct_0203CDB0_sub2_t.h" diff --git a/src/overlay005/ov5_021E1D20.c b/src/overlay005/ov5_021E1D20.c index edbfbd0c9e..19ebe93de6 100644 --- a/src/overlay005/ov5_021E1D20.c +++ b/src/overlay005/ov5_021E1D20.c @@ -4,7 +4,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E5C_decl.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02026324_decl.h" diff --git a/src/overlay005/ov5_021E2338.c b/src/overlay005/ov5_021E2338.c index 81af612259..35585f048d 100644 --- a/src/overlay005/ov5_021E2338.c +++ b/src/overlay005/ov5_021E2338.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020203AC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "overlay005/struct_ov5_021DDF74_decl.h" #include "overlay005/struct_ov5_021DE374_decl.h" diff --git a/src/overlay005/ov5_021E622C.c b/src/overlay005/ov5_021E622C.c index 0d5d733953..f2a1cb0a80 100644 --- a/src/overlay005/ov5_021E622C.c +++ b/src/overlay005/ov5_021E622C.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02026218_decl.h" #include "struct_decls/struct_02026224_decl.h" @@ -2441,7 +2441,7 @@ static void ov5_021E6948 (Pokemon * param0, BoxPokemon * param1, BoxPokemon * pa for (v0 = 0; v0 < 4; v0++) { if (v7->unk_00[v0] != 0) { for (v1 = 0; v1 < 100; v1++) { - if (v7->unk_00[v0] == GetMoveFromTMOrHMItemID(328 + v1)) { + if (v7->unk_00[v0] == Item_MoveForTMHM(328 + v1)) { if (sub_02077FE4(v3, v6, v1)) { if (sub_020770C4(param0, v7->unk_00[v0]) == 0xffff) { sub_02077134(param0, v7->unk_00[v0]); diff --git a/src/overlay005/ov5_021EA874.c b/src/overlay005/ov5_021EA874.c index 8fc8af51fb..a879db9888 100644 --- a/src/overlay005/ov5_021EA874.c +++ b/src/overlay005/ov5_021EA874.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02013A04_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_decls/struct_020508D4_decl.h" diff --git a/src/overlay005/ov5_021F08CC.c b/src/overlay005/ov5_021F08CC.c index b6a46d6feb..d673cee100 100644 --- a/src/overlay005/ov5_021F08CC.c +++ b/src/overlay005/ov5_021F08CC.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202CD88_decl.h" #include "struct_decls/struct_020508D4_decl.h" #include "struct_decls/struct_0205E884_decl.h" diff --git a/src/overlay005/ov5_021F6454.c b/src/overlay005/ov5_021F6454.c index e2dac64ee7..eb4564a427 100644 --- a/src/overlay005/ov5_021F6454.c +++ b/src/overlay005/ov5_021F6454.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020216E0_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202783C_decl.h" #include "struct_decls/struct_0202C878_decl.h" #include "struct_decls/struct_0202CD88_decl.h" diff --git a/src/overlay005/ov5_021F77A8.c b/src/overlay005/ov5_021F77A8.c index 0c7bc6ef25..3d3d99ca92 100644 --- a/src/overlay005/ov5_021F77A8.c +++ b/src/overlay005/ov5_021F77A8.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0203E724_decl.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_0207D3C0_decl.h" diff --git a/src/overlay006/ov6_02246184.c b/src/overlay006/ov6_02246184.c index 10145101fb..d3de9315bd 100644 --- a/src/overlay006/ov6_02246184.c +++ b/src/overlay006/ov6_02246184.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/overlay006/ov6_02247A0C.c b/src/overlay006/ov6_02247A0C.c index 3182cba8e9..ee4ec18e68 100644 --- a/src/overlay006/ov6_02247A0C.c +++ b/src/overlay006/ov6_02247A0C.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_020508D4_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/overlay006/ov6_022489E4.c b/src/overlay006/ov6_022489E4.c index 780669e2c2..aa1d9a4d48 100644 --- a/src/overlay006/ov6_022489E4.c +++ b/src/overlay006/ov6_022489E4.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/struct_020954F0.h" diff --git a/src/overlay007/ov7_02249960.c b/src/overlay007/ov7_02249960.c index d254219329..4737477f08 100644 --- a/src/overlay007/ov7_02249960.c +++ b/src/overlay007/ov7_02249960.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/struct_02013A04_t.h" diff --git a/src/overlay007/ov7_0224B4E8.c b/src/overlay007/ov7_0224B4E8.c index b7cd0d040b..4dc5deedb3 100644 --- a/src/overlay007/ov7_0224B4E8.c +++ b/src/overlay007/ov7_0224B4E8.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02013A04_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_020508D4_decl.h" #include "struct_decls/struct_party_decl.h" #include "struct_decls/struct_02098700_decl.h" diff --git a/src/overlay007/ov7_0224BE9C.c b/src/overlay007/ov7_0224BE9C.c index cd5c514b1d..47bb7dde9e 100644 --- a/src/overlay007/ov7_0224BE9C.c +++ b/src/overlay007/ov7_0224BE9C.c @@ -14,7 +14,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02029D04_decl.h" #include "struct_decls/struct_0207D3C0_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/overlay007/ov7_0224CD28.c b/src/overlay007/ov7_0224CD28.c index fef957b5cb..c06a859a3e 100644 --- a/src/overlay007/ov7_0224CD28.c +++ b/src/overlay007/ov7_0224CD28.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02009DC8_decl.h" #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202CD88_decl.h" #include "struct_decls/struct_020508D4_decl.h" #include "struct_decls/struct_0207D3C0_decl.h" @@ -617,7 +617,7 @@ static void ov7_0224D6BC (UnkStruct_ov7_0224D008 * param0) v4 = ov7_0224D698(param0, param0->unk_290[v3]); if ((v4 <= 420) && (v4 >= 328)) { - v1 = sub_0200B1EC(v5, GetMoveFromTMOrHMItemID(v4)); + v1 = sub_0200B1EC(v5, Item_MoveForTMHM(v4)); sub_02013A6C(param0->unk_7C, v1, param0->unk_290[v3]); Strbuf_Free(v1); @@ -672,10 +672,10 @@ static void ov7_0224D85C (UnkStruct_0200112C * param0, u32 param1, u8 param2) if (v0->unk_2A9 == 0) { v1 = Strbuf_Init(130, 11); - Item_GetDescriptionIntoString(v1, (u16)param1, 11); + Item_LoadDescription(v1, (u16)param1, 11); } else if (v0->unk_2A9 == 3) { v1 = Strbuf_Init(130, 11); - Item_GetDescriptionIntoString(v1, (u16)param1, 11); + Item_LoadDescription(v1, (u16)param1, 11); } else if (v0->unk_2A9 == 1) { UnkStruct_0200B144 * v2; @@ -1050,7 +1050,7 @@ static u8 ov7_0224E098 (UnkStruct_ov7_0224D008 * param0) sub_0200B60C(param0->unk_8C, 2, param0->unk_2B0 * param0->unk_2AC, 6, 0, 1); if ((param0->unk_2AA <= 420) && (param0->unk_2AA >= 328)) { - u16 v2 = GetMoveFromTMOrHMItemID(param0->unk_2AA); + u16 v2 = Item_MoveForTMHM(param0->unk_2AA); sub_0200B630(param0->unk_8C, 3, v2); @@ -1137,7 +1137,7 @@ static u8 ov7_0224E3D8 (UnkStruct_ov7_0224D008 * param0) sub_0200B77C(param0->unk_8C, 0, param0->unk_2AA); } - sub_0200B7B4(param0->unk_8C, 1, Item_GetAttribute(param0->unk_2AA, 5, 11)); + sub_0200B7B4(param0->unk_8C, 1, Item_LoadParam(param0->unk_2AA, 5, 11)); } else if (param0->unk_2A9 == 3) { if (param0->unk_2AC == 1) { sub_0200B70C(param0->unk_8C, 0, param0->unk_2AA); @@ -1146,7 +1146,7 @@ static u8 ov7_0224E3D8 (UnkStruct_ov7_0224D008 * param0) } v0 = sub_0200B1EC(param0->unk_88, 6); - sub_0200B7B4(param0->unk_8C, 1, Item_GetAttribute(param0->unk_2AA, 5, 11)); + sub_0200B7B4(param0->unk_8C, 1, Item_LoadParam(param0->unk_2AA, 5, 11)); } else { if (param0->unk_2A9 == 1) { ov7_0224E834(param0, param0->unk_2AA, 0); @@ -1299,7 +1299,7 @@ static void ov7_0224E834 (UnkStruct_ov7_0224D008 * param0, u16 param1, u16 param static u32 ov7_0224E890 (UnkStruct_ov7_0224D008 * param0, u16 param1) { if (param0->unk_2A9 == 0) { - return Item_GetAttribute(param1, 0, 11); + return Item_LoadParam(param1, 0, 11); } else if (param0->unk_2A9 == 3) { return ov7_0224E8CC(param0, param1); } else if (param0->unk_2A9 == 1) { @@ -1513,12 +1513,12 @@ static void ov7_0224EB7C (UnkStruct_ov7_0224D008 * param0, u16 param1) v0 = sub_02009DC8(param0->unk_94.unk_194[0], 2); - sub_02009968(param0->unk_94.unk_194[0], v0, 16, sub_0207CE78(param1, 1), 0, 11); + sub_02009968(param0->unk_94.unk_194[0], v0, 16, Item_FileID(param1, 1), 0, 11); sub_0200A4C0(v0); v0 = sub_02009DC8(param0->unk_94.unk_194[1], 1); - sub_020099D4(param0->unk_94.unk_194[1], v0, 16, sub_0207CE78(param1, 2), 0, 11); + sub_020099D4(param0->unk_94.unk_194[1], v0, 16, Item_FileID(param1, 2), 0, 11); sub_0200A6B8(v0); } diff --git a/src/overlay008/ov8_02249960.c b/src/overlay008/ov8_02249960.c index 38c3d8ce12..96d4a9309d 100644 --- a/src/overlay008/ov8_02249960.c +++ b/src/overlay008/ov8_02249960.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02027860_decl.h" #include "struct_decls/struct_020507E4_decl.h" #include "struct_decls/struct_020508D4_decl.h" diff --git a/src/overlay010/ov10_0221F800.c b/src/overlay010/ov10_0221F800.c index 2a693b7736..05d8fc6faf 100644 --- a/src/overlay010/ov10_0221F800.c +++ b/src/overlay010/ov10_0221F800.c @@ -17,7 +17,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020203AC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/overlay013/ov13_0221FC20.c b/src/overlay013/ov13_0221FC20.c index 77ad419062..bd0f1d9742 100644 --- a/src/overlay013/ov13_0221FC20.c +++ b/src/overlay013/ov13_0221FC20.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0207ADB4_decl.h" #include "struct_defs/union_02022594_020225E0.h" @@ -383,16 +383,16 @@ static u8 ov13_0221FFDC (UnkStruct_ov13_022213F0 * param0) return 17; } - if ((Item_GetAttribute(v0->unk_22, 36, v0->unk_0C) != 0) && (Item_GetAttribute(v0->unk_22, 37, v0->unk_0C) == 0) && (param0->unk_04[v0->unk_11].unk_17_7 == 0)) { + if ((Item_LoadParam(v0->unk_22, 36, v0->unk_0C) != 0) && (Item_LoadParam(v0->unk_22, 37, v0->unk_0C) == 0) && (param0->unk_04[v0->unk_11].unk_17_7 == 0)) { param0->unk_2075 = 13; return 22; } if (ov16_0223E30C(v0->unk_08, v0->unk_28, v0->unk_2C[v0->unk_11], 0, v0->unk_22) == 1) { - if (Item_GetAttribute(v0->unk_22, 37, v0->unk_0C) != 0) { + if (Item_LoadParam(v0->unk_22, 37, v0->unk_0C) != 0) { param0->unk_2075 = 13; } else { - if ((ov13_022213F0(param0, v0->unk_11) == 1) && (Item_GetAttribute(v0->unk_22, 23, v0->unk_0C) == 0)) { + if ((ov13_022213F0(param0, v0->unk_11) == 1) && (Item_LoadParam(v0->unk_22, 23, v0->unk_0C) == 0)) { ov13_02221A54(v0->unk_08, v0->unk_22, v0->unk_33, v0->unk_0C); param0->unk_04[v0->unk_11].unk_00 = ov16_0223DFAC(v0->unk_08, v0->unk_28, v0->unk_2C[v0->unk_11]); v0->unk_20 = GetMonData(param0->unk_04[v0->unk_11].unk_00, MON_DATA_163, NULL); @@ -817,7 +817,7 @@ static u8 ov13_022207B8 (UnkStruct_ov13_022213F0 * param0) { ov13_022216C0(param0, 5); - if (Item_GetAttribute(param0->unk_00->unk_22, 37, param0->unk_00->unk_0C) != 0) { + if (Item_LoadParam(param0->unk_00->unk_22, 37, param0->unk_00->unk_0C) != 0) { return 24; } @@ -1721,7 +1721,7 @@ static u8 ov13_022219DC (UnkStruct_ov13_022213F0 * param0) v0 = param0->unk_04[param0->unk_00->unk_11].unk_30[param0->unk_00->unk_34].unk_00; } - return Item_IsMoveHM(v0); + return Item_IsHMMove(v0); } static void ov13_02221A04 (UnkStruct_ov13_022213F0 * param0) diff --git a/src/overlay013/ov13_02221A88.c b/src/overlay013/ov13_02221A88.c index 0c725e910e..f6edfe173e 100644 --- a/src/overlay013/ov13_02221A88.c +++ b/src/overlay013/ov13_02221A88.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/struct_0205AA50.h" @@ -1481,7 +1481,7 @@ static void ov13_02223E68 (UnkStruct_ov13_022213F0 * param0) ov13_0222317C(param0, v0, 1 + v1); } - if (Item_GetAttribute(param0->unk_00->unk_22, 37, param0->unk_00->unk_0C) == 0) { + if (Item_LoadParam(param0->unk_00->unk_22, 37, param0->unk_00->unk_0C) == 0) { ov13_022221C8(param0, 94); } @@ -1565,36 +1565,36 @@ void ov13_02224144 (UnkStruct_ov13_022213F0 * param0) u8 v6; v1 = param0->unk_00; - v2 = Item_LoadDataOrGFX(v1->unk_22, 0, v1->unk_0C); + v2 = Item_Load(v1->unk_22, 0, v1->unk_0C); v0 = ov16_0223DFAC(v1->unk_08, v1->unk_28, v1->unk_2C[v1->unk_11]); v4 = GetMonData(v0, MON_DATA_163, NULL); v5 = 0; - if (Item_GetAttributeFromStruct(v2, 15) != 0) { + if (Item_Get(v2, 15) != 0) { v5 |= 0x1; } - if (Item_GetAttributeFromStruct(v2, 16) != 0) { + if (Item_Get(v2, 16) != 0) { v5 |= 0x2; } - if (Item_GetAttributeFromStruct(v2, 17) != 0) { + if (Item_Get(v2, 17) != 0) { v5 |= 0x4; } - if (Item_GetAttributeFromStruct(v2, 18) != 0) { + if (Item_Get(v2, 18) != 0) { v5 |= 0x8; } - if (Item_GetAttributeFromStruct(v2, 19) != 0) { + if (Item_Get(v2, 19) != 0) { v5 |= 0x10; } - if (Item_GetAttributeFromStruct(v2, 20) != 0) { + if (Item_Get(v2, 20) != 0) { v5 |= 0x20; } - if (Item_GetAttributeFromStruct(v2, 21) != 0) { + if (Item_Get(v2, 21) != 0) { v5 |= 0x40; } @@ -1609,7 +1609,7 @@ void ov13_02224144 (UnkStruct_ov13_022213F0 * param0) sub_0200B60C(param0->unk_1FA8, 1, v4 - param0->unk_04[v1->unk_11].unk_10, 3, 0, 1); sub_0200C388(param0->unk_1FA8, param0->unk_1FAC, v3); Strbuf_Free(v3); - } else if ((Item_GetAttributeFromStruct(v2, 36) != 0) || (Item_GetAttributeFromStruct(v2, 37) != 0)) { + } else if ((Item_Get(v2, 36) != 0) || (Item_Get(v2, 37) != 0)) { sub_0200B1B8(param0->unk_1FA4, 87, param0->unk_1FAC); } else if (v5 == 0x1) { v3 = sub_0200B1EC(param0->unk_1FA4, 92); diff --git a/src/overlay013/ov13_022264F4.c b/src/overlay013/ov13_022264F4.c index c4fe1e16b8..a6b1f5e047 100644 --- a/src/overlay013/ov13_022264F4.c +++ b/src/overlay013/ov13_022264F4.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_020797DC_decl.h" #include "struct_decls/struct_party_decl.h" @@ -406,7 +406,7 @@ static u8 ov13_02226A5C (UnkStruct_ov13_02227244 * param0) if (param0->unk_114D == 3) { int v1 = ov13_02227244(param0); - u32 v2 = Item_GetAttribute(v0->unk_1C, 7, v0->unk_0C); + u32 v2 = Item_LoadParam(v0->unk_1C, 7, v0->unk_0C); if ((v0->unk_18 != 0) && (v0->unk_1C != 55) && (v2 != 3)) { Pokemon * v3; diff --git a/src/overlay013/ov13_02227288.c b/src/overlay013/ov13_02227288.c index 06e3a573fd..f0dceffbad 100644 --- a/src/overlay013/ov13_02227288.c +++ b/src/overlay013/ov13_02227288.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "overlay013/struct_ov13_02227244.h" @@ -199,10 +199,10 @@ static void ov13_022274A8 (UnkStruct_ov13_02227244 * param0, u32 param1, u32 par sub_0201ADA4(v0, 0); - if (param0->unk_3C[param0->unk_114D][param1].unk_00 != 0) { + if (param0->unk_3C[param0->unk_114D][param1].item != 0) { v1 = sub_0200B1EC(param0->unk_10, Unk_ov13_02229AB0[param2][0]); - sub_0200B70C(param0->unk_14, 0, param0->unk_3C[param0->unk_114D][param1].unk_00); + sub_0200B70C(param0->unk_14, 0, param0->unk_3C[param0->unk_114D][param1].item); sub_0200C388(param0->unk_14, param0->unk_18, v1); v2 = sub_02002D7C(param4, param0->unk_18, 0); @@ -224,10 +224,10 @@ static void ov13_0222754C (UnkStruct_ov13_02227244 * param0, u32 param1, u32 par sub_0201ADA4(v1, 0); - if (param0->unk_3C[param0->unk_114D][param1].unk_02 != 0) { + if (param0->unk_3C[param0->unk_114D][param1].quantity != 0) { v0 = sub_0200B1EC(param0->unk_10, Unk_ov13_02229AB0[param2][1]); - sub_0200B60C(param0->unk_14, 0, param0->unk_3C[param0->unk_114D][param1].unk_02, 3, 0, 1); + sub_0200B60C(param0->unk_14, 0, param0->unk_3C[param0->unk_114D][param1].quantity, 3, 0, 1); sub_0200C388(param0->unk_14, param0->unk_18, v0); sub_0201D78C(v1, param4, param0->unk_18, 0, param5, 0xff, param6, NULL); Strbuf_Free(v0); @@ -336,7 +336,7 @@ static void ov13_022278A0 (UnkStruct_ov13_02227244 * param0, u32 param1) v0 = ¶m0->unk_2C[0]; v1 = sub_0200B1EC(param0->unk_10, Unk_ov13_02229AB0[0][0]); - sub_0200B70C(param0->unk_14, 0, param0->unk_3C[param0->unk_114D][param1].unk_00); + sub_0200B70C(param0->unk_14, 0, param0->unk_3C[param0->unk_114D][param1].item); sub_0200C388(param0->unk_14, param0->unk_18, v1); sub_0201ADA4(v0, 0); sub_0201D78C(v0, 0, param0->unk_18, 0, 0, 0xff, (((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((0 & 0xff) << 0)))), NULL); @@ -352,7 +352,7 @@ static void ov13_02227910 (UnkStruct_ov13_02227244 * param0, u32 param1) v0 = ¶m0->unk_2C[2]; v1 = Strbuf_Init(130, param0->unk_00->unk_0C); - Item_GetDescriptionIntoString(v1, param0->unk_3C[param0->unk_114D][param1].unk_00, param0->unk_00->unk_0C); + Item_LoadDescription(v1, param0->unk_3C[param0->unk_114D][param1].item, param0->unk_00->unk_0C); sub_0201D78C(v0, 0, v1, 4, 0, 0xff, ((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((0 & 0xff) << 0))), NULL); Strbuf_Free(v1); sub_0201A9A4(v0); diff --git a/src/overlay013/ov13_02227A4C.c b/src/overlay013/ov13_02227A4C.c index 578c187180..86ac512a12 100644 --- a/src/overlay013/ov13_02227A4C.c +++ b/src/overlay013/ov13_02227A4C.c @@ -28,7 +28,7 @@ void ov13_02227A7C (UnkStruct_ov13_02227244 * param0) u32 v0; for (v0 = 0; v0 < 36; v0++) { - if (param0->unk_00->unk_20 == param0->unk_3C[param0->unk_114D][v0].unk_00) { + if (param0->unk_00->unk_20 == param0->unk_3C[param0->unk_114D][v0].item) { param0->unk_00->unk_27[param0->unk_114D] = v0 % 6; param0->unk_00->unk_2C[param0->unk_114D] = v0 / 6; break; @@ -46,7 +46,7 @@ static const u8 Unk_ov13_02229BB0[] = { void ov13_02227AC8 (UnkStruct_ov13_02227244 * param0) { - UnkStruct_0207CDEC * v0; + BagItem * v0; u32 v1, v2, v3; s32 v4; @@ -60,8 +60,8 @@ void ov13_02227AC8 (UnkStruct_ov13_02227244 * param0) break; } - if (!((v0->unk_00 == 0) || (v0->unk_02 == 0))) { - v4 = Item_GetAttribute(v0->unk_00, 13, param0->unk_00->unk_0C); + if (!((v0->item == 0) || (v0->quantity == 0))) { + v4 = Item_LoadParam(v0->item, 13, param0->unk_00->unk_0C); for (v3 = 0; v3 < 5; v3++) { if ((v4 & (1 << v3)) == 0) { @@ -92,8 +92,8 @@ void ov13_02227AC8 (UnkStruct_ov13_02227244 * param0) u16 ov13_02227BA8 (UnkStruct_ov13_02227244 * param0, u32 param1) { - if ((param0->unk_3C[param0->unk_114D][param0->unk_00->unk_2C[param0->unk_114D] * 6 + param1].unk_00 != 0) && (param0->unk_3C[param0->unk_114D][param0->unk_00->unk_2C[param0->unk_114D] * 6 + param1].unk_02 != 0)) { - return param0->unk_3C[param0->unk_114D][param0->unk_00->unk_2C[param0->unk_114D] * 6 + param1].unk_00; + if ((param0->unk_3C[param0->unk_114D][param0->unk_00->unk_2C[param0->unk_114D] * 6 + param1].item != 0) && (param0->unk_3C[param0->unk_114D][param0->unk_00->unk_2C[param0->unk_114D] * 6 + param1].quantity != 0)) { + return param0->unk_3C[param0->unk_114D][param0->unk_00->unk_2C[param0->unk_114D] * 6 + param1].item; } return 0; diff --git a/src/overlay013/ov13_02227BDC.c b/src/overlay013/ov13_02227BDC.c index 18672b2c9a..f6b0febd17 100644 --- a/src/overlay013/ov13_02227BDC.c +++ b/src/overlay013/ov13_02227BDC.c @@ -97,24 +97,24 @@ static void ov13_02227C54 (UnkStruct_ov13_02227244 * param0) v0 = ov16_0223E010(param0->unk_00->unk_00); for (v1 = 0; v1 < 6; v1++) { - sub_0200CC3C(v0, param0->unk_30C, v2, sub_0207CE78(1, 1), 0, NNS_G2D_VRAM_TYPE_2DSUB, 46263 + v1); - sub_0200CDC4(param0->unk_08, 3, v0, param0->unk_30C, v2, sub_0207CE78(1, 2), 0, 1, NNS_G2D_VRAM_TYPE_2DSUB, 46263 + v1); + sub_0200CC3C(v0, param0->unk_30C, v2, Item_FileID(1, 1), 0, NNS_G2D_VRAM_TYPE_2DSUB, 46263 + v1); + sub_0200CDC4(param0->unk_08, 3, v0, param0->unk_30C, v2, Item_FileID(1, 2), 0, 1, NNS_G2D_VRAM_TYPE_2DSUB, 46263 + v1); } - sub_0200CE24(v0, param0->unk_30C, v2, Item_GetIndexOfIconNCER(), 0, 46263); - sub_0200CE54(v0, param0->unk_30C, v2, Item_GetIndexOfIconNANR(), 0, 46263); + sub_0200CE24(v0, param0->unk_30C, v2, Item_IconNCERFile(), 0, 46263); + sub_0200CE54(v0, param0->unk_30C, v2, Item_IconNANRFile(), 0, 46263); NARC_dtor(v2); } static void ov13_02227D10 (UnkStruct_ov13_02227244 * param0, u16 param1, u32 param2) { UnkStruct_0200C6E4 * v0 = ov16_0223E010(param0->unk_00->unk_00); - sub_0200D948(v0, param0->unk_30C, 16, sub_0207CE78(param1, 1), 0, param2); + sub_0200D948(v0, param0->unk_30C, 16, Item_FileID(param1, 1), 0, param2); } static void ov13_02227D48 (UnkStruct_ov13_02227244 * param0, u16 param1, u16 param2, u32 param3) { - sub_02003050(param0->unk_08, 16, sub_0207CE78(param1, 2), param0->unk_00->unk_0C, 3, 0x20, param2 * 16); + sub_02003050(param0->unk_08, 16, Item_FileID(param1, 2), param0->unk_00->unk_0C, 3, 0x20, param2 * 16); } static UnkStruct_0200D0F4 * ov13_02227D78 (UnkStruct_ov13_02227244 * param0, u32 param1) diff --git a/src/overlay016/ov16_0223B140.c b/src/overlay016/ov16_0223B140.c index 5e0f401b65..bda876af42 100644 --- a/src/overlay016/ov16_0223B140.c +++ b/src/overlay016/ov16_0223B140.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0207ADB4_decl.h" #include "struct_decls/struct_0207AE68_decl.h" #include "battle/battle_context.h" diff --git a/src/overlay016/ov16_0223DF00.c b/src/overlay016/ov16_0223DF00.c index 64bd09af0b..14d51502e7 100644 --- a/src/overlay016/ov16_0223DF00.c +++ b/src/overlay016/ov16_0223DF00.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02015F84_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_decls/struct_0202CC84_decl.h" @@ -588,7 +588,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par v1 = ov16_0223DFAC(param0, param1, param2); v6 = 0; - if (Item_GetAttribute(param4, 15, 5)) { + if (Item_LoadParam(param4, 15, 5)) { v3 = GetMonData(v1, MON_DATA_160, NULL); if (v3 & 0x7) { @@ -608,7 +608,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 16, 5)) { + if (Item_LoadParam(param4, 16, 5)) { v3 = GetMonData(v1, MON_DATA_160, NULL); if (v3 & 0xf88) { @@ -625,7 +625,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 17, 5)) { + if (Item_LoadParam(param4, 17, 5)) { v3 = GetMonData(v1, MON_DATA_160, NULL); if (v3 & 0x10) { @@ -642,7 +642,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 18, 5)) { + if (Item_LoadParam(param4, 18, 5)) { v3 = GetMonData(v1, MON_DATA_160, NULL); if (v3 & 0x20) { @@ -659,7 +659,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 19, 5)) { + if (Item_LoadParam(param4, 19, 5)) { v3 = GetMonData(v1, MON_DATA_160, NULL); if (v3 & 0x40) { @@ -676,7 +676,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 20, 5)) { + if (Item_LoadParam(param4, 20, 5)) { if ((v4 == param2) || (v5 == param2)) { v3 = ov16_02252060(v0, param1, 53, NULL); @@ -688,7 +688,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 21, 5)) { + if (Item_LoadParam(param4, 21, 5)) { if ((v4 == param2) || (v5 == param2)) { v3 = ov16_02252060(v0, param1, 53, NULL); @@ -700,7 +700,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 22, 5)) { + if (Item_LoadParam(param4, 22, 5)) { v3 = ov16_0225B45C(param0, v0, 1, param1); if (v3 == 0) { @@ -712,7 +712,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 27, 5)) { + if (Item_LoadParam(param4, 27, 5)) { if ((v4 == param2) || (v5 == param2)) { if (ov16_02252060(v0, param1, 19, NULL) < 12) { ov16_02252A14(v0, param1, 19, 1); @@ -721,7 +721,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 28, 5)) { + if (Item_LoadParam(param4, 28, 5)) { if ((v4 == param2) || (v5 == param2)) { if (ov16_02252060(v0, param1, 20, NULL) < 12) { ov16_02252A14(v0, param1, 20, 1); @@ -730,7 +730,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 29, 5)) { + if (Item_LoadParam(param4, 29, 5)) { if ((v4 == param2) || (v5 == param2)) { if (ov16_02252060(v0, param1, 22, NULL) < 12) { ov16_02252A14(v0, param1, 22, 1); @@ -739,7 +739,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 30, 5)) { + if (Item_LoadParam(param4, 30, 5)) { if ((v4 == param2) || (v5 == param2)) { if (ov16_02252060(v0, param1, 23, NULL) < 12) { ov16_02252A14(v0, param1, 23, 1); @@ -748,7 +748,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 31, 5)) { + if (Item_LoadParam(param4, 31, 5)) { if ((v4 == param2) || (v5 == param2)) { if (ov16_02252060(v0, param1, 21, NULL) < 12) { ov16_02252A14(v0, param1, 21, 1); @@ -757,7 +757,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 32, 5)) { + if (Item_LoadParam(param4, 32, 5)) { if ((v4 == param2) || (v5 == param2)) { if (ov16_02252060(v0, param1, 24, NULL) < 12) { ov16_02252A14(v0, param1, 24, 1); @@ -766,7 +766,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 33, 5)) { + if (Item_LoadParam(param4, 33, 5)) { if ((v4 == param2) || (v5 == param2)) { v3 = ov16_02252060(v0, param1, 53, NULL); @@ -778,8 +778,8 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 36, 5)) { - v3 = Item_GetAttribute(param4, 55, 5); + if (Item_LoadParam(param4, 36, 5)) { + v3 = Item_LoadParam(param4, 55, 5); if (GetMonData(v1, MON_DATA_58 + param3, NULL) != GetMonData(v1, MON_DATA_66 + param3, NULL)) { sub_0207536C(v1, MON_DATA_58 + param3, v3); @@ -794,8 +794,8 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 37, 5)) { - v3 = Item_GetAttribute(param4, 55, 5); + if (Item_LoadParam(param4, 37, 5)) { + v3 = Item_LoadParam(param4, 55, 5); for (param3 = 0; param3 < 4; param3++) { if (GetMonData(v1, MON_DATA_58 + param3, NULL) != GetMonData(v1, MON_DATA_66 + param3, NULL)) { @@ -812,10 +812,10 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 38, 5)) { + if (Item_LoadParam(param4, 38, 5)) { v3 = 0; - if (Item_GetAttribute(param4, 23, 5)) { + if (Item_LoadParam(param4, 23, 5)) { if (GetMonData(v1, MON_DATA_163, NULL) == 0) { v3 = 1; } @@ -824,7 +824,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } if ((v3) && (GetMonData(v1, MON_DATA_163, NULL) != GetMonData(v1, MON_DATA_164, NULL))) { - v3 = Item_GetAttribute(param4, 54, 5); + v3 = Item_LoadParam(param4, 54, 5); switch (v3) { case 255: @@ -850,7 +850,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par sub_0207536C(v1, MON_DATA_163, v3); - if (!Item_GetAttribute(param4, 23, 5)) { + if (!Item_LoadParam(param4, 23, 5)) { if (ov16_0223E208(param0, param1)) { ov16_022523E8(v0, param1, 95, &v3); } else { @@ -864,21 +864,21 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par } } - if (Item_GetAttribute(param4, 45, 5)) { + if (Item_LoadParam(param4, 45, 5)) { if ((GetMonData(v1, MON_DATA_FRIENDSHIP, NULL) < 100) && (v2 == 1)) { - v6 = Item_GetAttribute(param4, 56, 5); + v6 = Item_LoadParam(param4, 56, 5); } } - if (Item_GetAttribute(param4, 46, 5)) { + if (Item_LoadParam(param4, 46, 5)) { if ((GetMonData(v1, MON_DATA_FRIENDSHIP, NULL) >= 100) && (GetMonData(v1, MON_DATA_FRIENDSHIP, NULL) < 200) && (v2 == 1)) { - v6 = Item_GetAttribute(param4, 57, 5); + v6 = Item_LoadParam(param4, 57, 5); } } - if (Item_GetAttribute(param4, 47, 5)) { + if (Item_LoadParam(param4, 47, 5)) { if ((GetMonData(v1, MON_DATA_FRIENDSHIP, NULL) >= 200) && (v2 == 1)) { - v6 = Item_GetAttribute(param4, 58, 5); + v6 = Item_LoadParam(param4, 58, 5); } } @@ -894,7 +894,7 @@ BOOL ov16_0223E30C (UnkStruct_0207ADB4 * param0, int param1, int param2, int par v3 = GetMonData(v1, MON_DATA_HELD_ITEM, NULL); - if (Item_GetAttribute(param4, 1, 5) == 53) { + if (Item_LoadParam(param4, 1, 5) == 53) { v6 = v6 * 150 / 100; } } diff --git a/src/overlay016/ov16_022405FC.c b/src/overlay016/ov16_022405FC.c index 42bd4457c6..82df6a2776 100644 --- a/src/overlay016/ov16_022405FC.c +++ b/src/overlay016/ov16_022405FC.c @@ -12,7 +12,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_020797DC_decl.h" #include "struct_decls/struct_party_decl.h" #include "struct_decls/struct_0207ADB4_decl.h" @@ -7664,7 +7664,7 @@ static void ov16_02248E74 (UnkStruct_0201CD38 * param0, void * param1) for (v1 = v2->unk_30[6]; v1 < ov16_0223DF60(v2->unk_00, v6); v1++) { v3 = ov16_0223DFAC(v2->unk_00, v6, v1); v9 = GetMonData(v3, MON_DATA_HELD_ITEM, NULL); - v10 = Item_GetAttribute(v9, 1, 5); + v10 = Item_LoadParam(v9, 1, 5); if ((v10 == 51) || (v2->unk_04->monsGainingExp[v5] & sub_020787CC(v1))) { break; @@ -7686,7 +7686,7 @@ static void ov16_02248E74 (UnkStruct_0201CD38 * param0, void * param1) u32 v12; v9 = GetMonData(v3, MON_DATA_HELD_ITEM, NULL); - v10 = Item_GetAttribute(v9, 1, 5); + v10 = Item_LoadParam(v9, 1, 5); if (((v8 & 0x1) == 0) && ((v2->unk_04->battleMons[1].curHP + v2->unk_04->battleMons[3].curHP) == 0) && (GetMonData(v3, MON_DATA_163, NULL)) && (v2->unk_04->expJinglePlayed == 0)) { sub_0200549C(1127); @@ -8125,8 +8125,8 @@ static void ov16_022499C0 (Party * param0, int param1, int param2, int param3) v8 = sub_02075874(param2, param3, 5); v7 = Party_GetPokemonBySlotIndex(param0, param1); v4 = GetMonData(v7, MON_DATA_HELD_ITEM, NULL); - v5 = Item_GetAttribute(v4, 1, 5); - v6 = Item_GetAttribute(v4, 2, 5); + v5 = Item_LoadParam(v4, 1, 5); + v6 = Item_LoadParam(v4, 2, 5); v3 = 0; for (v0 = 0; v0 < 6; v0++) { diff --git a/src/overlay016/ov16_0224B940.c b/src/overlay016/ov16_0224B940.c index 829ad72845..d2abed94d7 100644 --- a/src/overlay016/ov16_0224B940.c +++ b/src/overlay016/ov16_0224B940.c @@ -183,7 +183,7 @@ void * ov16_0224B940 (UnkStruct_0207ADB4 * param0) ov16_02251604(param0, v0); MoveTable_Load(&v0->aiContext.moveTable); - v0->aiContext.itemTable = sub_0207D388(5); + v0->aiContext.itemTable = ItemTable_Load(5); return v0; } diff --git a/src/overlay016/ov16_0225177C.c b/src/overlay016/ov16_0225177C.c index 44460560b5..badedbeb6d 100644 --- a/src/overlay016/ov16_0225177C.c +++ b/src/overlay016/ov16_0225177C.c @@ -1,12 +1,11 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_party_decl.h" #include "struct_decls/struct_0207ADB4_decl.h" -#include "struct_decls/struct_itemdata_decl.h" #include "struct_decls/struct_02098700_decl.h" #include "overlay016/struct_ov16_0225BFFC_decl.h" @@ -6160,7 +6159,7 @@ BOOL ov16_02259B9C (UnkStruct_0207ADB4 * param0, BattleContext * param1, int * p } if ((param1->battleMons[param1->msgBattlerTemp].species == 493) && (param1->battleMons[param1->msgBattlerTemp].curHP) && (ov16_02255A4C(param1, param1->msgBattlerTemp) == 121)) { - v1 = sub_02077988(Item_GetAttribute(param1->battleMons[param1->msgBattlerTemp].heldItem, 1, 5)); + v1 = sub_02077988(Item_LoadParam(param1->battleMons[param1->msgBattlerTemp].heldItem, 1, 5)); if (param1->battleMons[param1->msgBattlerTemp].formNum != v1) { param1->battleMons[param1->msgBattlerTemp].formNum = v1; @@ -6962,10 +6961,10 @@ s32 ov16_0225B0FC (BattleContext * param0, u16 param1, u16 param2) ItemData * v0; u16 v1; - v1 = sub_0207CE78(param1, 0); - v0 = sub_0207D3B0(param0->aiContext.itemTable, v1); + v1 = Item_FileID(param1, 0); + v0 = ItemTable_Index(param0->aiContext.itemTable, v1); - return Item_GetAttributeFromStruct(v0, param2); + return Item_Get(v0, param2); } int ov16_0225B120 (UnkStruct_0207ADB4 * param0, BattleContext * param1, int param2) diff --git a/src/overlay016/ov16_0225CBB8.c b/src/overlay016/ov16_0225CBB8.c index e5a0d5b516..07e839fb8c 100644 --- a/src/overlay016/ov16_0225CBB8.c +++ b/src/overlay016/ov16_0225CBB8.c @@ -3800,7 +3800,7 @@ static void ov16_022611DC (UnkStruct_0201CD38 * param0, void * param1) } break; case 0: - if ((((v0->unk_08->unk_04->unk_11 < 2) && ((ov16_0223DF0C(v0->unk_00) == (0x2 | 0x1)) || (ov16_0223DF0C(v0->unk_00) == ((0x2 | 0x1) | 0x10)))) || (v0->unk_08->unk_04->unk_11 < 1)) && (Item_GetAttribute(v0->unk_04->unk_1C, 38, 5))) { + if ((((v0->unk_08->unk_04->unk_11 < 2) && ((ov16_0223DF0C(v0->unk_00) == (0x2 | 0x1)) || (ov16_0223DF0C(v0->unk_00) == ((0x2 | 0x1) | 0x10)))) || (v0->unk_08->unk_04->unk_11 < 1)) && (Item_LoadParam(v0->unk_04->unk_1C, 38, 5))) { if (ov16_0223EDAC(v0->unk_00) == 1) { v0->unk_12 = 17; } else { @@ -4081,37 +4081,37 @@ static void ov16_022611DC (UnkStruct_0201CD38 * param0, void * param1) v30.tags = 2; v30.params[0] = v28 | (v0->unk_08->unk_0C[v28] << 8); - if (Item_GetAttribute(v0->unk_04->unk_1C, 15, 5)) { + if (Item_LoadParam(v0->unk_04->unk_1C, 15, 5)) { v31 = 0; v32++; } - if (Item_GetAttribute(v0->unk_04->unk_1C, 16, 5)) { + if (Item_LoadParam(v0->unk_04->unk_1C, 16, 5)) { v31 = 1; v32++; } - if (Item_GetAttribute(v0->unk_04->unk_1C, 17, 5)) { + if (Item_LoadParam(v0->unk_04->unk_1C, 17, 5)) { v31 = 2; v32++; } - if (Item_GetAttribute(v0->unk_04->unk_1C, 18, 5)) { + if (Item_LoadParam(v0->unk_04->unk_1C, 18, 5)) { v31 = 3; v32++; } - if (Item_GetAttribute(v0->unk_04->unk_1C, 19, 5)) { + if (Item_LoadParam(v0->unk_04->unk_1C, 19, 5)) { v31 = 4; v32++; } - if (Item_GetAttribute(v0->unk_04->unk_1C, 20, 5)) { + if (Item_LoadParam(v0->unk_04->unk_1C, 20, 5)) { v31 = 5; v32++; } - if (Item_GetAttribute(v0->unk_04->unk_1C, 21, 5)) { + if (Item_LoadParam(v0->unk_04->unk_1C, 21, 5)) { v31 = 6; v32++; } diff --git a/src/overlay016/ov16_02266F1C.c b/src/overlay016/ov16_02266F1C.c index 5a71797e52..12ebac8d03 100644 --- a/src/overlay016/ov16_02266F1C.c +++ b/src/overlay016/ov16_02266F1C.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/box_pokemon.h" diff --git a/src/overlay016/ov16_0226871C.c b/src/overlay016/ov16_0226871C.c index 94d300f682..fcde35af01 100644 --- a/src/overlay016/ov16_0226871C.c +++ b/src/overlay016/ov16_0226871C.c @@ -17,7 +17,7 @@ #include "struct_decls/struct_02012CE0_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/box_pokemon.h" #include "struct_decls/struct_0207ADB4_decl.h" diff --git a/src/overlay017/ov17_0223F118.c b/src/overlay017/ov17_0223F118.c index 3ec3b3ffab..6c25001ff5 100644 --- a/src/overlay017/ov17_0223F118.c +++ b/src/overlay017/ov17_0223F118.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_02012CE0_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_020127E8.h" diff --git a/src/overlay017/ov17_0223F7E4.c b/src/overlay017/ov17_0223F7E4.c index ecdc4be321..9e4dc009b8 100644 --- a/src/overlay017/ov17_0223F7E4.c +++ b/src/overlay017/ov17_0223F7E4.c @@ -12,7 +12,7 @@ #include "struct_decls/struct_02012CE0_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay017/struct_ov17_02252B48_decl.h" #include "struct_defs/struct_0200D0F4.h" diff --git a/src/overlay017/ov17_022413D8.c b/src/overlay017/ov17_022413D8.c index 4d3498965b..390ad85b16 100644 --- a/src/overlay017/ov17_022413D8.c +++ b/src/overlay017/ov17_022413D8.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay017/const_ov17_022536B4.h" diff --git a/src/overlay017/ov17_022476F8.c b/src/overlay017/ov17_022476F8.c index ebe8bed119..6cff2fa788 100644 --- a/src/overlay017/ov17_022476F8.c +++ b/src/overlay017/ov17_022476F8.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_02008A90.h" #include "struct_defs/struct_0200D0F4.h" diff --git a/src/overlay017/ov17_022492DC.c b/src/overlay017/ov17_022492DC.c index cc438e6900..6dba6a0de8 100644 --- a/src/overlay017/ov17_022492DC.c +++ b/src/overlay017/ov17_022492DC.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_02012CE0_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_020127E8.h" diff --git a/src/overlay017/ov17_0224A0FC.c b/src/overlay017/ov17_0224A0FC.c index 0d06329916..4d5bb7e3fe 100644 --- a/src/overlay017/ov17_0224A0FC.c +++ b/src/overlay017/ov17_0224A0FC.c @@ -12,7 +12,7 @@ #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay022/struct_ov22_0225B1BC_decl.h" #include "struct_defs/struct_0200D0F4.h" diff --git a/src/overlay017/ov17_02250744.c b/src/overlay017/ov17_02250744.c index 796cfb8058..33209b5350 100644 --- a/src/overlay017/ov17_02250744.c +++ b/src/overlay017/ov17_02250744.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_02007C7C_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_02095C48.h" diff --git a/src/overlay019/ov19_021D0D80.c b/src/overlay019/ov19_021D0D80.c index 7b971d6cc8..712ed6c378 100644 --- a/src/overlay019/ov19_021D0D80.c +++ b/src/overlay019/ov19_021D0D80.c @@ -4174,7 +4174,7 @@ static void ov19_021D58AC (UnkStruct_ov19_021D4DF0 * param0, BoxPokemon * param1 } if (v0->unk_06 != 0) { - Item_GetNameIntoString(v0->unk_1C, v0->unk_06, 9); + Item_LoadName(v0->unk_1C, v0->unk_06, 9); } else { sub_0200B1B8(param2->unk_18C, 20, v0->unk_1C); } @@ -4281,7 +4281,7 @@ static void ov19_021D5BE8 (UnkStruct_ov19_021D4DF0 * param0, u16 param1, UnkStru v0->unk_06 = param1; if (v0->unk_06 != 0) { - Item_GetNameIntoString(v0->unk_1C, v0->unk_06, 9); + Item_LoadName(v0->unk_1C, v0->unk_06, 9); } else { sub_0200B1B8(param2->unk_18C, 20, v0->unk_1C); } diff --git a/src/overlay019/ov19_021DA92C.c b/src/overlay019/ov19_021DA92C.c index f4ac1678a5..9c9cc3700d 100644 --- a/src/overlay019/ov19_021DA92C.c +++ b/src/overlay019/ov19_021DA92C.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "struct_defs/struct_02008A90.h" diff --git a/src/overlay019/ov19_021DB8E4.c b/src/overlay019/ov19_021DB8E4.c index 287c92a78c..334cc0d614 100644 --- a/src/overlay019/ov19_021DB8E4.c +++ b/src/overlay019/ov19_021DB8E4.c @@ -713,11 +713,11 @@ static void ov19_021DC4F8 (UnkStruct_ov19_021DBA9C * param0, u32 param1) ov19_021D783C(&v0, &v2, ov19_021D77D0(param0->unk_00), v1->unk_1C, v1->unk_20, 0); NNS_G2dInitImageProxy(&v2); - v4 = sub_02006F50(16, sub_0207CE78(param1, 1), 0, &v3, 10); + v4 = sub_02006F50(16, Item_FileID(param1, 1), 0, &v3, 10); v3->mapingType = GX_GetOBJVRamModeChar(); NNS_G2dLoadImage1DMapping(v3, 1520 * 0x20, NNS_G2D_VRAM_TYPE_2DMAIN, &v2); - sub_02006E84(16, sub_0207CE78(param1, 2), 1, 6 * 0x20, 0x20, 10); + sub_02006E84(16, Item_FileID(param1, 2), 1, 6 * 0x20, 0x20, 10); param0->unk_90 = ov19_021D785C(param0->unk_08, &v0, 18, 224, 0, NNS_G2D_VRAM_TYPE_2DMAIN); if (param0->unk_90) { diff --git a/src/overlay019/ov19_021DCF88.c b/src/overlay019/ov19_021DCF88.c index d360447f8c..752fd4bbd3 100644 --- a/src/overlay019/ov19_021DCF88.c +++ b/src/overlay019/ov19_021DCF88.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "overlay019/struct_ov19_021DCF88_decl.h" diff --git a/src/overlay019/ov19_021DE3E8.c b/src/overlay019/ov19_021DE3E8.c index 6164a989d4..ac672d379b 100644 --- a/src/overlay019/ov19_021DE3E8.c +++ b/src/overlay019/ov19_021DE3E8.c @@ -110,7 +110,7 @@ static void ov19_021DE450 (UnkStruct_ov19_021DE3E8 * param0) int v4; ov19_021D783C(&v0, &v1, ov19_021D77D0(param0->unk_04), param0->unk_14->unk_1C, param0->unk_14->unk_20, 0); - v3 = sub_02006F50(16, sub_0207CE78(1, 1), 0, &v2, 10); + v3 = sub_02006F50(16, Item_FileID(1, 1), 0, &v2, 10); if (v3) { int v5; @@ -228,8 +228,8 @@ static void ov19_021DE5D4 (UnkStruct_ov19_021DE3E8 * param0) v2 = 2; } - sub_02006EC0(16, sub_0207CE78(v0, 1), 0, Unk_ov19_021E04CC[v3].unk_00, 0, 0, 10); - sub_02006E84(16, sub_0207CE78(v0, 2), 1, Unk_ov19_021E04CC[v3].unk_04 * 0x20, 0x20, 10); + sub_02006EC0(16, Item_FileID(v0, 1), 0, Unk_ov19_021E04CC[v3].unk_00, 0, 0, 10); + sub_02006E84(16, Item_FileID(v0, 2), 1, Unk_ov19_021E04CC[v3].unk_04 * 0x20, 0x20, 10); sub_02021E80(param0->unk_1C[v3], v2); ov19_021D78AC(param0->unk_1C[v3], 2); @@ -269,8 +269,8 @@ static void ov19_021DE718 (UnkStruct_ov19_021DE3E8 * param0, int param1, int par ov19_021DE694(param0, &v0, &v1); - sub_02006EC0(16, sub_0207CE78(param2, 1), 0, Unk_ov19_021E04CC[param1].unk_00, 0, 0, 10); - sub_02006E84(16, sub_0207CE78(param2, 2), 1, Unk_ov19_021E04CC[param1].unk_04 * 0x20, 0x20, 10); + sub_02006EC0(16, Item_FileID(param2, 1), 0, Unk_ov19_021E04CC[param1].unk_00, 0, 0, 10); + sub_02006E84(16, Item_FileID(param2, 2), 1, Unk_ov19_021E04CC[param1].unk_04 * 0x20, 0x20, 10); sub_02021E80(param0->unk_1C[param1], v1); ov19_021D78AC(param0->unk_1C[param1], 3); diff --git a/src/overlay019/ov19_021DEC04.c b/src/overlay019/ov19_021DEC04.c index f65bc976e5..c3a482a55a 100644 --- a/src/overlay019/ov19_021DEC04.c +++ b/src/overlay019/ov19_021DEC04.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/box_pokemon.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "overlay019/struct_ov19_021DEC04_decl.h" diff --git a/src/overlay020/ov20_021D0D80.c b/src/overlay020/ov20_021D0D80.c index d415b9f9f4..7c1ece450a 100644 --- a/src/overlay020/ov20_021D0D80.c +++ b/src/overlay020/ov20_021D0D80.c @@ -4,7 +4,7 @@ #include "data_021BF67C.h" #include "struct_decls/struct_020067E8_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02023FCC_decl.h" #include "struct_decls/struct_0209747C_decl.h" #include "struct_decls/struct_020998EC_decl.h" diff --git a/src/overlay020/ov20_021D2EA4.c b/src/overlay020/ov20_021D2EA4.c index 8fb5fce992..10ae927794 100644 --- a/src/overlay020/ov20_021D2EA4.c +++ b/src/overlay020/ov20_021D2EA4.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_020149F0_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_020998EC_decl.h" #include "overlay020/struct_ov20_021D16E8_decl.h" #include "overlay020/struct_ov20_021D2128_decl.h" diff --git a/src/overlay020/ov20_021D3864.c b/src/overlay020/ov20_021D3864.c index eace32ca4e..325db652ab 100644 --- a/src/overlay020/ov20_021D3864.c +++ b/src/overlay020/ov20_021D3864.c @@ -4,7 +4,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_020998EC_decl.h" #include "overlay020/struct_ov20_021D16E8_decl.h" #include "overlay020/struct_ov20_021D2128_decl.h" diff --git a/src/overlay020/ov20_021D3A54.c b/src/overlay020/ov20_021D3A54.c index 41c5844bcc..65c0b16622 100644 --- a/src/overlay020/ov20_021D3A54.c +++ b/src/overlay020/ov20_021D3A54.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_020998EC_decl.h" #include "overlay020/struct_ov20_021D16E8_decl.h" #include "overlay020/struct_ov20_021D2128_decl.h" diff --git a/src/overlay020/ov20_021D40E8.c b/src/overlay020/ov20_021D40E8.c index 6daf2893f4..eaca41a905 100644 --- a/src/overlay020/ov20_021D40E8.c +++ b/src/overlay020/ov20_021D40E8.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_020998EC_decl.h" #include "overlay020/struct_ov20_021D16E8_decl.h" #include "overlay020/struct_ov20_021D2128_decl.h" diff --git a/src/overlay020/ov20_021D4728.c b/src/overlay020/ov20_021D4728.c index 96e432021d..a2fb0ab74a 100644 --- a/src/overlay020/ov20_021D4728.c +++ b/src/overlay020/ov20_021D4728.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_020998EC_decl.h" #include "overlay020/struct_ov20_021D16E8_decl.h" #include "overlay020/struct_ov20_021D2128_decl.h" diff --git a/src/overlay020/ov20_021D5044.c b/src/overlay020/ov20_021D5044.c index c9649fa07d..eb3f71500c 100644 --- a/src/overlay020/ov20_021D5044.c +++ b/src/overlay020/ov20_021D5044.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "strbuf.h" #include "overlay020/ov20_021D5044.h" diff --git a/src/overlay021/ov21_021D0D80.c b/src/overlay021/ov21_021D0D80.c index 07f555c241..8834cdc187 100644 --- a/src/overlay021/ov21_021D0D80.c +++ b/src/overlay021/ov21_021D0D80.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0209ACBC_decl.h" #include "overlay021/struct_ov21_021D3FE0_decl.h" #include "overlay021/struct_ov21_021D423C_decl.h" diff --git a/src/overlay021/ov21_021D3208.c b/src/overlay021/ov21_021D3208.c index cfc6571fce..5affd72206 100644 --- a/src/overlay021/ov21_021D3208.c +++ b/src/overlay021/ov21_021D3208.c @@ -3,7 +3,7 @@ #include "data_021BF67C.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02026324_decl.h" #include "overlay021/struct_ov21_021D3208.h" diff --git a/src/overlay021/ov21_021D4C0C.c b/src/overlay021/ov21_021D4C0C.c index 4566044902..0f2cf13816 100644 --- a/src/overlay021/ov21_021D4C0C.c +++ b/src/overlay021/ov21_021D4C0C.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_02012744_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020127E8.h" #include "struct_defs/struct_0205AA50.h" diff --git a/src/overlay021/ov21_021D5600.c b/src/overlay021/ov21_021D5600.c index 0c12bcfa0f..bc2bd17884 100644 --- a/src/overlay021/ov21_021D5600.c +++ b/src/overlay021/ov21_021D5600.c @@ -4,7 +4,7 @@ #include "inlines.h" #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "unk_0200AC5C.h" #include "unk_0200B29C.h" diff --git a/src/overlay021/ov21_021D5AEC.c b/src/overlay021/ov21_021D5AEC.c index cd0946e7a9..47afa1672b 100644 --- a/src/overlay021/ov21_021D5AEC.c +++ b/src/overlay021/ov21_021D5AEC.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_02009DC8_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay021/struct_ov21_021D0F60_decl.h" #include "struct_defs/struct_0205AA50.h" diff --git a/src/overlay021/ov21_021D85B0.c b/src/overlay021/ov21_021D85B0.c index 6520d5d201..6074bc3161 100644 --- a/src/overlay021/ov21_021D85B0.c +++ b/src/overlay021/ov21_021D85B0.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_02007C7C_decl.h" #include "struct_decls/struct_02009DC8_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay021/struct_ov21_021D0F60_decl.h" #include "overlay019/struct_ov19_021DA864.h" diff --git a/src/overlay021/ov21_021DE668.c b/src/overlay021/ov21_021DE668.c index 9ed7837cee..978d0ac1f0 100644 --- a/src/overlay021/ov21_021DE668.c +++ b/src/overlay021/ov21_021DE668.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_02009DC8_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay021/struct_ov21_021D0F60_decl.h" #include "overlay021/struct_ov21_021D4C0C_decl.h" diff --git a/src/overlay021/ov21_021E0C68.c b/src/overlay021/ov21_021E0C68.c index 1d9dcb2b8f..926a4f16a7 100644 --- a/src/overlay021/ov21_021E0C68.c +++ b/src/overlay021/ov21_021E0C68.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_02009DC8_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay021/struct_ov21_021D0F60_decl.h" #include "struct_defs/struct_0205AA50.h" diff --git a/src/overlay021/ov21_021E6014.c b/src/overlay021/ov21_021E6014.c index 00e289e3de..7b62b071e7 100644 --- a/src/overlay021/ov21_021E6014.c +++ b/src/overlay021/ov21_021E6014.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_02009DC8_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay021/struct_ov21_021D0F60_decl.h" #include "overlay019/struct_ov19_021DA864.h" diff --git a/src/overlay021/ov21_021E737C.c b/src/overlay021/ov21_021E737C.c index c8e74f3009..be737053be 100644 --- a/src/overlay021/ov21_021E737C.c +++ b/src/overlay021/ov21_021E737C.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_02015214_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay021/struct_ov21_021D0F60_decl.h" #include "overlay019/struct_ov19_021DA864.h" diff --git a/src/overlay021/ov21_021E8D48.c b/src/overlay021/ov21_021E8D48.c index aaa5e7d354..cea51f0c6f 100644 --- a/src/overlay021/ov21_021E8D48.c +++ b/src/overlay021/ov21_021E8D48.c @@ -12,7 +12,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "overlay021/struct_ov21_021D4C0C_decl.h" diff --git a/src/overlay022/ov22_02255D44.c b/src/overlay022/ov22_02255D44.c index 5b11c6c600..e6f6f1a14d 100644 --- a/src/overlay022/ov22_02255D44.c +++ b/src/overlay022/ov22_02255D44.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02015920_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02029C68_decl.h" #include "struct_decls/struct_02029C88_decl.h" diff --git a/src/overlay022/ov22_02259C58.c b/src/overlay022/ov22_02259C58.c index a09259cf82..82e662eef4 100644 --- a/src/overlay022/ov22_02259C58.c +++ b/src/overlay022/ov22_02259C58.c @@ -4,7 +4,7 @@ #include "struct_decls/struct_02009DC8_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02012744_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020127E8.h" #include "struct_defs/union_02022594_020225E0.h" diff --git a/src/overlay022/ov22_0225A428.c b/src/overlay022/ov22_0225A428.c index 521aa65fb5..42832d7903 100644 --- a/src/overlay022/ov22_0225A428.c +++ b/src/overlay022/ov22_0225A428.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020279FC.h" #include "struct_defs/struct_0205AA50.h" diff --git a/src/overlay022/ov22_0225B660.c b/src/overlay022/ov22_0225B660.c index 381e2cf1b7..1c40305274 100644 --- a/src/overlay022/ov22_0225B660.c +++ b/src/overlay022/ov22_0225B660.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02029C68_decl.h" #include "struct_decls/struct_02029C88_decl.h" #include "struct_defs/pokemon.h" diff --git a/src/overlay023/ov23_0223E140.c b/src/overlay023/ov23_0223E140.c index cb15efd90b..8f81054bd8 100644 --- a/src/overlay023/ov23_0223E140.c +++ b/src/overlay023/ov23_0223E140.c @@ -12,7 +12,7 @@ #include "struct_decls/struct_020203AC_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202855C_decl.h" #include "struct_decls/struct_020298B0_decl.h" diff --git a/src/overlay023/ov23_022416A8.c b/src/overlay023/ov23_022416A8.c index a81ef20f5c..f8f1f7e76e 100644 --- a/src/overlay023/ov23_022416A8.c +++ b/src/overlay023/ov23_022416A8.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_020298B0_decl.h" #include "struct_defs/struct_0203CDB0.h" diff --git a/src/overlay023/ov23_02241F74.c b/src/overlay023/ov23_02241F74.c index 1cec3f6b5b..602be16eba 100644 --- a/src/overlay023/ov23_02241F74.c +++ b/src/overlay023/ov23_02241F74.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02029894_decl.h" #include "struct_decls/struct_020298B0_decl.h" diff --git a/src/overlay023/ov23_0224340C.c b/src/overlay023/ov23_0224340C.c index e0202346fc..b764c71d1c 100644 --- a/src/overlay023/ov23_0224340C.c +++ b/src/overlay023/ov23_0224340C.c @@ -11,7 +11,7 @@ #include "struct_decls/struct_020203AC_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202855C_decl.h" #include "struct_decls/struct_020298B0_decl.h" diff --git a/src/overlay023/ov23_02248F1C.c b/src/overlay023/ov23_02248F1C.c index aef08306f0..ef5e3393d8 100644 --- a/src/overlay023/ov23_02248F1C.c +++ b/src/overlay023/ov23_02248F1C.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0205E884_decl.h" #include "overlay023/struct_ov23_0224942C_decl.h" diff --git a/src/overlay023/ov23_0224A1D0.c b/src/overlay023/ov23_0224A1D0.c index 5bfa66984b..2ff22b4ac8 100644 --- a/src/overlay023/ov23_0224A1D0.c +++ b/src/overlay023/ov23_0224A1D0.c @@ -3,7 +3,7 @@ #include #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202855C_decl.h" #include "struct_decls/struct_020507E4_decl.h" diff --git a/src/overlay023/ov23_0224B05C.c b/src/overlay023/ov23_0224B05C.c index a46e27ce09..fb9ccc308b 100644 --- a/src/overlay023/ov23_0224B05C.c +++ b/src/overlay023/ov23_0224B05C.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202855C_decl.h" #include "struct_decls/struct_02029894_decl.h" diff --git a/src/overlay023/ov23_0224F294.c b/src/overlay023/ov23_0224F294.c index 2c31567015..0967867b6d 100644 --- a/src/overlay023/ov23_0224F294.c +++ b/src/overlay023/ov23_0224F294.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_020298B0_decl.h" #include "struct_decls/struct_0207D3C0_decl.h" diff --git a/src/overlay023/ov23_02253598.c b/src/overlay023/ov23_02253598.c index 207b038a77..10d72a2a26 100644 --- a/src/overlay023/ov23_02253598.c +++ b/src/overlay023/ov23_02253598.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202855C_decl.h" #include "struct_decls/struct_020298B0_decl.h" diff --git a/src/overlay023/ov23_02253D40.c b/src/overlay023/ov23_02253D40.c index b519e81d28..f2d952a73a 100644 --- a/src/overlay023/ov23_02253D40.c +++ b/src/overlay023/ov23_02253D40.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "overlay023/struct_ov23_02253E2C_decl.h" diff --git a/src/overlay023/ov23_022542CC.c b/src/overlay023/ov23_022542CC.c index a687dcdf83..77ee032c16 100644 --- a/src/overlay023/ov23_022542CC.c +++ b/src/overlay023/ov23_022542CC.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02013A04_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_020298B0_decl.h" #include "overlay023/struct_ov23_022542D8_decl.h" #include "overlay023/struct_ov23_02254594_decl.h" diff --git a/src/overlay043/ov43_02256544.c b/src/overlay043/ov43_02256544.c index 5b51ab683d..19d1675b13 100644 --- a/src/overlay043/ov43_02256544.c +++ b/src/overlay043/ov43_02256544.c @@ -4,7 +4,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay025/struct_ov25_02255224_decl.h" #include "overlay025/struct_ov25_022555E8_decl.h" #include "overlay025/struct_ov25_022558C4_decl.h" diff --git a/src/overlay048/ov48_0225650C.c b/src/overlay048/ov48_0225650C.c index 693e8487c4..3414e6f454 100644 --- a/src/overlay048/ov48_0225650C.c +++ b/src/overlay048/ov48_0225650C.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay025/struct_ov25_02255224_decl.h" #include "overlay025/struct_ov25_022555E8_decl.h" #include "overlay025/struct_ov25_022558C4_decl.h" diff --git a/src/overlay052/ov52_02256694.c b/src/overlay052/ov52_02256694.c index 281fee11a3..677b5b388c 100644 --- a/src/overlay052/ov52_02256694.c +++ b/src/overlay052/ov52_02256694.c @@ -4,7 +4,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay025/struct_ov25_02255224_decl.h" #include "overlay025/struct_ov25_022555E8_decl.h" #include "overlay025/struct_ov25_022558C4_decl.h" diff --git a/src/overlay054/ov54_0225642C.c b/src/overlay054/ov54_0225642C.c index 9175bc85f4..aeed17a208 100644 --- a/src/overlay054/ov54_0225642C.c +++ b/src/overlay054/ov54_0225642C.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay025/struct_ov25_02255224_decl.h" #include "overlay025/struct_ov25_022555E8_decl.h" #include "overlay025/struct_ov25_022558C4_decl.h" diff --git a/src/overlay056/ov56_022561C0.c b/src/overlay056/ov56_022561C0.c index fa0753025f..9c4e7464cf 100644 --- a/src/overlay056/ov56_022561C0.c +++ b/src/overlay056/ov56_022561C0.c @@ -11,7 +11,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02027F8C_decl.h" #include "struct_decls/struct_0205B43C_decl.h" diff --git a/src/overlay058/ov58_021D0D80.c b/src/overlay058/ov58_021D0D80.c index 2e901ac0de..f9aab67f38 100644 --- a/src/overlay058/ov58_021D0D80.c +++ b/src/overlay058/ov58_021D0D80.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02095EAC_decl.h" diff --git a/src/overlay059/ov59_021D0D80.c b/src/overlay059/ov59_021D0D80.c index a903e51443..ed0f9362be 100644 --- a/src/overlay059/ov59_021D0D80.c +++ b/src/overlay059/ov59_021D0D80.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_020961E8_decl.h" diff --git a/src/overlay061/ov61_0222AE60.c b/src/overlay061/ov61_0222AE60.c index c1cd54f0ca..6e3f04cee9 100644 --- a/src/overlay061/ov61_0222AE60.c +++ b/src/overlay061/ov61_0222AE60.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02029C68_decl.h" #include "struct_decls/struct_020797DC_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/overlay061/ov61_0222B008.c b/src/overlay061/ov61_0222B008.c index e3b02b2692..10156e88e5 100644 --- a/src/overlay061/ov61_0222B008.c +++ b/src/overlay061/ov61_0222B008.c @@ -4,7 +4,7 @@ #include "data_021BF67C.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E5C_decl.h" #include "struct_decls/struct_02029C68_decl.h" #include "struct_decls/struct_020797DC_decl.h" diff --git a/src/overlay061/ov61_0222BF44.c b/src/overlay061/ov61_0222BF44.c index 9c4fe64d8f..2f70428ede 100644 --- a/src/overlay061/ov61_0222BF44.c +++ b/src/overlay061/ov61_0222BF44.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025CCC_decl.h" #include "struct_decls/struct_0202B370_decl.h" diff --git a/src/overlay062/ov62_022300D8.c b/src/overlay062/ov62_022300D8.c index c8a26a22ad..445b2b7f09 100644 --- a/src/overlay062/ov62_022300D8.c +++ b/src/overlay062/ov62_022300D8.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_020127E8.h" diff --git a/src/overlay062/ov62_02231690.c b/src/overlay062/ov62_02231690.c index 1269c35ef9..038d6073b2 100644 --- a/src/overlay062/ov62_02231690.c +++ b/src/overlay062/ov62_02231690.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202783C_decl.h" #include "struct_decls/struct_0202CD88_decl.h" #include "struct_decls/struct_0202F298_decl.h" diff --git a/src/overlay062/ov62_02234A10.c b/src/overlay062/ov62_02234A10.c index bf05f94d6a..3b955a3d34 100644 --- a/src/overlay062/ov62_02234A10.c +++ b/src/overlay062/ov62_02234A10.c @@ -3,7 +3,7 @@ #include "overlay062/ov62_const_funcptr_tables.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_0208C06C.h" diff --git a/src/overlay062/ov62_02235E64.c b/src/overlay062/ov62_02235E64.c index 398705ec6c..72d9d64282 100644 --- a/src/overlay062/ov62_02235E64.c +++ b/src/overlay062/ov62_02235E64.c @@ -3,7 +3,7 @@ #include "overlay062/ov62_const_funcptr_tables.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02023FCC_decl.h" #include "struct_defs/union_02022594_020225E0.h" diff --git a/src/overlay062/ov62_02237D24.c b/src/overlay062/ov62_02237D24.c index 186ca70075..b5737cf7eb 100644 --- a/src/overlay062/ov62_02237D24.c +++ b/src/overlay062/ov62_02237D24.c @@ -4,7 +4,7 @@ #include "overlay062/ov62_const_funcptr_tables.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02023FCC_decl.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_decls/struct_02029C68_decl.h" diff --git a/src/overlay062/ov62_02239D60.c b/src/overlay062/ov62_02239D60.c index fb1d0c0e50..882113674c 100644 --- a/src/overlay062/ov62_02239D60.c +++ b/src/overlay062/ov62_02239D60.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02023FCC_decl.h" #include "struct_decls/struct_02075874_decl.h" #include "struct_decls/struct_020797DC_decl.h" diff --git a/src/overlay062/ov62_0223CAEC.c b/src/overlay062/ov62_0223CAEC.c index 0247596f6c..31e21b2710 100644 --- a/src/overlay062/ov62_0223CAEC.c +++ b/src/overlay062/ov62_0223CAEC.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02023FCC_decl.h" #include "struct_defs/union_02022594_020225E0.h" diff --git a/src/overlay062/ov62_0223DFA8.c b/src/overlay062/ov62_0223DFA8.c index 07335d8e26..de98314149 100644 --- a/src/overlay062/ov62_0223DFA8.c +++ b/src/overlay062/ov62_0223DFA8.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02023FCC_decl.h" #include "struct_decls/struct_0202F41C_decl.h" diff --git a/src/overlay062/ov62_02241204.c b/src/overlay062/ov62_02241204.c index 29ce701564..e30e6c358d 100644 --- a/src/overlay062/ov62_02241204.c +++ b/src/overlay062/ov62_02241204.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02023FCC_decl.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_decls/struct_0202F41C_decl.h" diff --git a/src/overlay062/ov62_02246B00.c b/src/overlay062/ov62_02246B00.c index 2e41d1c5dc..66dc304565 100644 --- a/src/overlay062/ov62_02246B00.c +++ b/src/overlay062/ov62_02246B00.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_020279FC.h" diff --git a/src/overlay062/ov62_02247D74.c b/src/overlay062/ov62_02247D74.c index 560db1526a..db8189e510 100644 --- a/src/overlay062/ov62_02247D74.c +++ b/src/overlay062/ov62_02247D74.c @@ -4,7 +4,7 @@ #include "overlay062/ov62_const_funcptr_tables.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/union_02022594_020225E0.h" #include "struct_defs/struct_02030A80.h" diff --git a/src/overlay062/ov62_02248408.c b/src/overlay062/ov62_02248408.c index a5d1022938..573f318bc1 100644 --- a/src/overlay062/ov62_02248408.c +++ b/src/overlay062/ov62_02248408.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_021C0794_decl.h" #include "struct_defs/struct_0202F264.h" diff --git a/src/overlay064/ov64_0222DCE0.c b/src/overlay064/ov64_0222DCE0.c index 9bd5994024..c483460f83 100644 --- a/src/overlay064/ov64_0222DCE0.c +++ b/src/overlay064/ov64_0222DCE0.c @@ -19,7 +19,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_decls/struct_0203068C_decl.h" diff --git a/src/overlay065/ov65_0222DCE0.c b/src/overlay065/ov65_0222DCE0.c index 32feb7a84c..c140530d10 100644 --- a/src/overlay065/ov65_0222DCE0.c +++ b/src/overlay065/ov65_0222DCE0.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02012B20_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_decls/struct_0202B370_decl.h" diff --git a/src/overlay065/ov65_0223648C.c b/src/overlay065/ov65_0223648C.c index 855944bce5..a42a379c99 100644 --- a/src/overlay065/ov65_0223648C.c +++ b/src/overlay065/ov65_0223648C.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202B628_decl.h" #include "overlay063/struct_ov63_0222BE18_decl.h" diff --git a/src/overlay066/ov66_0222DDF0.c b/src/overlay066/ov66_0222DDF0.c index b018268045..ce40d10d13 100644 --- a/src/overlay066/ov66_0222DDF0.c +++ b/src/overlay066/ov66_0222DDF0.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02014FB0_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_decls/struct_0202B628_decl.h" diff --git a/src/overlay066/ov66_0223177C.c b/src/overlay066/ov66_0223177C.c index 56dc106144..ec841a2dd8 100644 --- a/src/overlay066/ov66_0223177C.c +++ b/src/overlay066/ov66_0223177C.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "overlay066/struct_ov66_02231428.h" diff --git a/src/overlay067/ov67_0225C700.c b/src/overlay067/ov67_0225C700.c index 441155740a..331ede5d88 100644 --- a/src/overlay067/ov67_0225C700.c +++ b/src/overlay067/ov67_0225C700.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202CD88_decl.h" #include "struct_decls/struct_021C0794_decl.h" #include "overlay066/struct_ov66_0222E71C_decl.h" diff --git a/src/overlay068/ov68_0225C700.c b/src/overlay068/ov68_0225C700.c index 500335d20e..5a1e594327 100644 --- a/src/overlay068/ov68_0225C700.c +++ b/src/overlay068/ov68_0225C700.c @@ -15,7 +15,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02030EC4_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/overlay069/ov69_0225C700.c b/src/overlay069/ov69_0225C700.c index 7b8005e090..214824c921 100644 --- a/src/overlay069/ov69_0225C700.c +++ b/src/overlay069/ov69_0225C700.c @@ -15,7 +15,7 @@ #include "struct_decls/struct_020203AC_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202C878_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/overlay070/ov70_0225D9A4.c b/src/overlay070/ov70_0225D9A4.c index 1f15516ba1..be0170d153 100644 --- a/src/overlay070/ov70_0225D9A4.c +++ b/src/overlay070/ov70_0225D9A4.c @@ -18,7 +18,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02023FCC_decl.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/overlay070/ov70_022630A4.c b/src/overlay070/ov70_022630A4.c index a574e1b7a5..ac3d01c3de 100644 --- a/src/overlay070/ov70_022630A4.c +++ b/src/overlay070/ov70_022630A4.c @@ -6,7 +6,7 @@ #include "data_021BF67C.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay066/struct_ov66_0222DFF8_decl.h" #include "overlay066/struct_ov66_0222E71C_decl.h" #include "overlay070/struct_ov70_0225C894_decl.h" diff --git a/src/overlay070/ov70_02265F38.c b/src/overlay070/ov70_02265F38.c index 7fedd6f756..9d153b137c 100644 --- a/src/overlay070/ov70_02265F38.c +++ b/src/overlay070/ov70_02265F38.c @@ -6,7 +6,7 @@ #include "data_021BF67C.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay066/struct_ov66_0222DFF8_decl.h" #include "overlay070/struct_ov70_0225CA20_decl.h" #include "overlay070/struct_ov70_0225CC54_decl.h" diff --git a/src/overlay070/ov70_02266E9C.c b/src/overlay070/ov70_02266E9C.c index 7a35ed6d92..828a696430 100644 --- a/src/overlay070/ov70_02266E9C.c +++ b/src/overlay070/ov70_02266E9C.c @@ -4,7 +4,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay066/struct_ov66_0222DFF8_decl.h" #include "overlay066/struct_ov66_0222E71C_decl.h" #include "overlay070/struct_ov70_0225CA20_decl.h" diff --git a/src/overlay070/ov70_0226CC74.c b/src/overlay070/ov70_0226CC74.c index eb06971612..b356ec67e2 100644 --- a/src/overlay070/ov70_0226CC74.c +++ b/src/overlay070/ov70_0226CC74.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay066/struct_ov66_0222DFF8_decl.h" #include "overlay070/struct_ov70_0225CA20_decl.h" #include "overlay070/struct_ov70_0225CC54_decl.h" diff --git a/src/overlay071/ov71_0223C69C.c b/src/overlay071/ov71_0223C69C.c index 1fb84bd00a..941f338c6e 100644 --- a/src/overlay071/ov71_0223C69C.c +++ b/src/overlay071/ov71_0223C69C.c @@ -4,7 +4,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_02072014.h" diff --git a/src/overlay072/ov72_0223D7A0.c b/src/overlay072/ov72_0223D7A0.c index 5e658f2100..fa53ca394d 100644 --- a/src/overlay072/ov72_0223D7A0.c +++ b/src/overlay072/ov72_0223D7A0.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_02015920_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202CD88_decl.h" #include "struct_decls/struct_021C0794_decl.h" #include "overlay072/struct_ov72_0223DB98_decl.h" diff --git a/src/overlay073/ov73_021D0D80.c b/src/overlay073/ov73_021D0D80.c index 1c1c1a20e5..29335bd4f5 100644 --- a/src/overlay073/ov73_021D0D80.c +++ b/src/overlay073/ov73_021D0D80.c @@ -11,7 +11,7 @@ #include "struct_decls/struct_02015920_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202783C_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/overlay073/ov73_021D3250.c b/src/overlay073/ov73_021D3250.c index 1cb4718669..5b7cef9951 100644 --- a/src/overlay073/ov73_021D3250.c +++ b/src/overlay073/ov73_021D3250.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_0208BE5C.h" diff --git a/src/overlay074/ov74_021D0D80.c b/src/overlay074/ov74_021D0D80.c index 01dd3018e1..f2bbe27c3f 100644 --- a/src/overlay074/ov74_021D0D80.c +++ b/src/overlay074/ov74_021D0D80.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_020279FC.h" diff --git a/src/overlay075/ov75_021D0D80.c b/src/overlay075/ov75_021D0D80.c index b3de8b82eb..657dcad0cf 100644 --- a/src/overlay075/ov75_021D0D80.c +++ b/src/overlay075/ov75_021D0D80.c @@ -14,7 +14,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_0205AA50.h" diff --git a/src/overlay076/ov76_0223B870.c b/src/overlay076/ov76_0223B870.c index abce9635e6..fcb9982d65 100644 --- a/src/overlay076/ov76_0223B870.c +++ b/src/overlay076/ov76_0223B870.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "overlay076/const_ov76_0223EF3C.h" diff --git a/src/overlay077/ov77_021D0D80.c b/src/overlay077/ov77_021D0D80.c index 290bbc5e83..61ee08c63d 100644 --- a/src/overlay077/ov77_021D0D80.c +++ b/src/overlay077/ov77_021D0D80.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020203AC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay077/const_ov77_021D742C.h" diff --git a/src/overlay078/ov78_021D0D80.c b/src/overlay078/ov78_021D0D80.c index 0570cb5393..aac00e7545 100644 --- a/src/overlay078/ov78_021D0D80.c +++ b/src/overlay078/ov78_021D0D80.c @@ -20,7 +20,7 @@ #include "struct_decls/struct_020203AC_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_02008A90.h" #include "struct_defs/struct_0200C738.h" diff --git a/src/overlay079/ov79_021D183C.c b/src/overlay079/ov79_021D183C.c index 7a53d29e8c..74f74c15b5 100644 --- a/src/overlay079/ov79_021D183C.c +++ b/src/overlay079/ov79_021D183C.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0200112C_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0203D9B8.h" #include "struct_defs/struct_020989DC.h" diff --git a/src/overlay079/ov79_021D2268.c b/src/overlay079/ov79_021D2268.c index 84821b1f9b..cb1ed8b90b 100644 --- a/src/overlay079/ov79_021D2268.c +++ b/src/overlay079/ov79_021D2268.c @@ -12,7 +12,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_020158A8.h" diff --git a/src/overlay080/ov80_021D1458.c b/src/overlay080/ov80_021D1458.c index 74a70ce402..cdc1181c95 100644 --- a/src/overlay080/ov80_021D1458.c +++ b/src/overlay080/ov80_021D1458.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02039EBC_decl.h" #include "struct_defs/union_02022594_020225E0.h" diff --git a/src/overlay081/ov81_021D1610.c b/src/overlay081/ov81_021D1610.c index 274d43e8a4..f9c1cdb443 100644 --- a/src/overlay081/ov81_021D1610.c +++ b/src/overlay081/ov81_021D1610.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/struct_0202BC58.h" diff --git a/src/overlay082/ov82_0223B2E0.c b/src/overlay082/ov82_0223B2E0.c index 2aa22f11c2..00e792208b 100644 --- a/src/overlay082/ov82_0223B2E0.c +++ b/src/overlay082/ov82_0223B2E0.c @@ -178,7 +178,7 @@ static int ov82_0223B470 (UnkStruct_ov83_0223C344 * param0) v3 = 0; for (v0 = 0; v0 < 64; v0++) { - v4 = sub_0207D354(v0); + v4 = Item_ForBerryNumber(v0); if (sub_0207D688(v5, v4, 1, param0->unk_00) == 1) { sub_02097320(param0->unk_18, v4, 0); diff --git a/src/overlay083/ov83_0223D6A8.c b/src/overlay083/ov83_0223D6A8.c index 113b554d49..090f31a35b 100644 --- a/src/overlay083/ov83_0223D6A8.c +++ b/src/overlay083/ov83_0223D6A8.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay083/struct_ov83_0223D4CC_decl.h" #include "struct_defs/struct_02015958.h" diff --git a/src/overlay084/ov84_0223B5A0.c b/src/overlay084/ov84_0223B5A0.c index 7fe6688b4f..6ba3bdc6d4 100644 --- a/src/overlay084/ov84_0223B5A0.c +++ b/src/overlay084/ov84_0223B5A0.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay084/const_ov84_02241130.h" @@ -868,10 +868,10 @@ u16 ov84_0223BE5C (UnkStruct_ov84_0223B5A0 * param0, u16 param1, u16 param2) UnkStruct_ov84_0223BE5C * v0 = ¶m0->unk_C4->unk_04[param0->unk_C4->unk_64]; if (param2 == 0) { - return v0->unk_00[param1].unk_00; + return v0->unk_00[param1].item; } - return v0->unk_00[param1].unk_02; + return v0->unk_00[param1].quantity; } static void ov84_0223BE84 (UnkStruct_0200B144 * param0, Strbuf *param1, u16 param2, u32 param3) @@ -881,7 +881,7 @@ static void ov84_0223BE84 (UnkStruct_0200B144 * param0, Strbuf *param1, u16 para static void ov84_0223BE94 (UnkStruct_0200B144 * param0, Strbuf *param1, u16 param2, u32 param3) { - sub_0200B1B8(param0, GetMoveFromTMOrHMItemID(param2), param1); + sub_0200B1B8(param0, Item_MoveForTMHM(param2), param1); } static void ov84_0223BEAC (UnkStruct_ov84_0223B5A0 * param0) @@ -969,11 +969,11 @@ static void ov84_0223BFBC (UnkStruct_ov84_0223B5A0 * param0) if (v0->unk_08 == 3) { for (v1 = 0; v1 < Unk_ov84_02241118[v0->unk_08]; v1++) { - if ((v0->unk_00[v1].unk_00 == 0) || (v0->unk_00[v1].unk_02 == 0)) { + if ((v0->unk_00[v1].item == 0) || (v0->unk_00[v1].quantity == 0)) { break; } - ov84_0223BE94(param0->unk_120, param0->unk_164[v1], v0->unk_00[v1].unk_00, 6); + ov84_0223BE94(param0->unk_120, param0->unk_164[v1], v0->unk_00[v1].item, 6); sub_02013A6C(param0->unk_160, param0->unk_164[v1], v1); } @@ -983,11 +983,11 @@ static void ov84_0223BFBC (UnkStruct_ov84_0223B5A0 * param0) v0->unk_09 = v1 + 3; } else { for (v1 = 0; v1 < Unk_ov84_02241118[v0->unk_08]; v1++) { - if ((v0->unk_00[v1].unk_00 == 0) || (v0->unk_00[v1].unk_02 == 0)) { + if ((v0->unk_00[v1].item == 0) || (v0->unk_00[v1].quantity == 0)) { break; } - ov84_0223BE84(param0->unk_11C, param0->unk_164[v1], v0->unk_00[v1].unk_00, 6); + ov84_0223BE84(param0->unk_11C, param0->unk_164[v1], v0->unk_00[v1].item, 6); sub_02013A6C(param0->unk_160, param0->unk_164[v1], v1); } @@ -1129,8 +1129,8 @@ static void ov84_0223C2AC (UnkStruct_0200112C * param0, u32 param1, u8 param2) UnkStruct_ov84_0223BE5C * v1; v1 = &v0->unk_C4->unk_04[v0->unk_C4->unk_64]; - ov84_0223F528(v0, v1->unk_00[param1].unk_00); - ov84_02240AD8(v0, v1->unk_00[param1].unk_00); + ov84_0223F528(v0, v1->unk_00[param1].item); + ov84_02240AD8(v0, v1->unk_00[param1].item); } else { ov84_0223F528(v0, 0xffff); ov84_02240AD8(v0, 0xffff); @@ -1154,7 +1154,7 @@ static void ov84_0223C3B8 (UnkStruct_0200112C * param0, u32 param1, u8 param2) if (v1->unk_08 == 7) { if ((param1 != 0xfffffffd) && (param1 != 0xfffffffe)) { - if (sub_0207D3FC(v0->unk_C8) == v1->unk_00[param1].unk_00) { + if (sub_0207D3FC(v0->unk_C8) == v1->unk_00[param1].item) { ov84_0223FA44(v0, param2); } } @@ -1173,9 +1173,9 @@ static void ov84_0223C3B8 (UnkStruct_0200112C * param0, u32 param1, u8 param2) } else { if ((param1 != 0xfffffffd) && (param1 != 0xfffffffe)) { if ((v0->unk_47A == 1) && (v0->unk_47C == param1)) { - ov84_0223F81C(v0, v1->unk_00[param1].unk_02, param2, ((u32)(((8 & 0xff) << 16) | ((9 & 0xff) << 8) | ((0 & 0xff) << 0)))); + ov84_0223F81C(v0, v1->unk_00[param1].quantity, param2, ((u32)(((8 & 0xff) << 16) | ((9 & 0xff) << 8) | ((0 & 0xff) << 0)))); } else { - ov84_0223F81C(v0, v1->unk_00[param1].unk_02, param2, ((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((0 & 0xff) << 0)))); + ov84_0223F81C(v0, v1->unk_00[param1].quantity, param2, ((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((0 & 0xff) << 0)))); } } } @@ -1287,8 +1287,8 @@ static u8 ov84_0223C5B8 (UnkStruct_ov84_0223B5A0 * param0) return 3; default: sub_02005748(1500); - param0->unk_C4->unk_66 = (u16)v0->unk_00[v1].unk_00; - param0->unk_48A = (u16)v0->unk_00[v1].unk_02; + param0->unk_C4->unk_66 = (u16)v0->unk_00[v1].item; + param0->unk_48A = (u16)v0->unk_00[v1].quantity; return 1; } @@ -1922,7 +1922,7 @@ static void ov84_0223D42C (UnkStruct_ov84_0223B5A0 * param0) u16 v1 = v0->unk_06 + v0->unk_04; if (!((param0->unk_47B == v1) || (param0->unk_47B == (v1 - 1)))) { - sub_0207CDEC(v0->unk_00, param0->unk_47B - 1, v1 - 1); + Item_MoveInPocket(v0->unk_00, param0->unk_47B - 1, v1 - 1); sub_02013A3C(param0->unk_160); ov84_0223BFBC(param0); } @@ -1981,7 +1981,7 @@ static void ov84_0223D5AC (UnkStruct_ov84_0223B5A0 * param0) u8 v2; u8 v3[12]; - v0 = Item_LoadDataOrGFX(param0->unk_C4->unk_66, 0, 6); + v0 = Item_Load(param0->unk_C4->unk_66, 0, 6); v1 = 0; v2 = param0->unk_C4->unk_04[param0->unk_C4->unk_64].unk_08; @@ -1997,7 +1997,7 @@ static void ov84_0223D5AC (UnkStruct_ov84_0223B5A0 * param0) v1++; } } else { - if (Item_GetAttributeFromStruct(v0, 6) != 0) { + if (Item_Get(v0, 6) != 0) { if ((param0->unk_C4->unk_66 == 450) && (param0->unk_C4->unk_76_0 == 1)) { v3[v1] = 1; } else if (param0->unk_C4->unk_04[param0->unk_C4->unk_64].unk_08 == 5) { @@ -2013,7 +2013,7 @@ static void ov84_0223D5AC (UnkStruct_ov84_0223B5A0 * param0) v1++; } } - if (Item_GetAttributeFromStruct(v0, 3) == 0) { + if (Item_Get(v0, 3) == 0) { v3[v1] = 8; v1++; @@ -2022,7 +2022,7 @@ static void ov84_0223D5AC (UnkStruct_ov84_0223B5A0 * param0) v1++; } } - if (Item_GetAttributeFromStruct(v0, 4) != 0) { + if (Item_Get(v0, 4) != 0) { if (sub_0207D3FC(param0->unk_C8) == param0->unk_C4->unk_66) { v3[v1] = 7; } else { @@ -2117,7 +2117,7 @@ static int ov84_0223D858 (UnkStruct_ov84_0223B5A0 * param0) ov84_0223FD84(param0); - v1 = Item_GetAttribute(param0->unk_C4->unk_66, 6, 6); + v1 = Item_LoadParam(param0->unk_C4->unk_66, 6, 6); v0 = (UnkFuncPtr_02069238)sub_020683F4(2, v1); if (v0 != NULL) { @@ -2195,11 +2195,11 @@ static int ov84_0223DA14 (UnkStruct_ov84_0223B5A0 * param0) switch (param0->unk_483) { case 0: { - u16 v0 = GetMoveFromTMOrHMItemID(param0->unk_C4->unk_66); + u16 v0 = Item_MoveForTMHM(param0->unk_C4->unk_66); sub_0200B630(param0->unk_118, 0, v0); - if (Item_IsMoveHM(v0) == 1) { + if (Item_IsHMMove(v0) == 1) { sub_0200B1B8(param0->unk_114, 59, param0->unk_3F8); } else { sub_0200B1B8(param0->unk_114, 58, param0->unk_3F8); @@ -2317,7 +2317,7 @@ static Strbuf* ov84_0223DC9C (UnkStruct_ov84_0223B5A0 * param0, u16 param1) return sub_0200B1EC(param0->unk_114, 62); } - v0 = Item_GetAttribute(param1, 2, 6); + v0 = Item_LoadParam(param1, 2, 6); ov84_0223B9F4(param0, (u8)v0); param0->unk_488 = 1; sub_02005748(1536); @@ -2595,7 +2595,7 @@ static int ov84_0223E27C (UnkStruct_ov84_0223B5A0 * param0) u8 v0 = ov84_0223C5B8(param0); if (v0 == 1) { - if (Item_GetAttribute(param0->unk_C4->unk_66, 3, 6) != 0) { + if (Item_LoadParam(param0->unk_C4->unk_66, 3, 6) != 0) { Strbuf* v1; sub_0201ADA4(¶m0->unk_04[6], 15); @@ -2666,9 +2666,9 @@ static int ov84_0223E3BC (UnkStruct_ov84_0223B5A0 * param0) sub_0200B70C(param0->unk_118, 0, param0->unk_C4->unk_66); ov84_02240B34(param0, 2); - param0->unk_48C = Item_GetAttribute(param0->unk_C4->unk_66, 0, 6); + param0->unk_48C = Item_LoadParam(param0->unk_C4->unk_66, 0, 6); - if ((Item_GetAttribute(param0->unk_C4->unk_66, 3, 6) != 0) || (param0->unk_48C == 0)) { + if ((Item_LoadParam(param0->unk_C4->unk_66, 3, 6) != 0) || (param0->unk_48C == 0)) { v1 = sub_0200B1EC(param0->unk_114, 74); sub_0200C388(param0->unk_118, param0->unk_3F8, v1); Strbuf_Free(v1); @@ -2922,7 +2922,7 @@ static int ov84_0223EA18 (UnkStruct_ov84_0223B5A0 * param0) if (v0 == 1) { if (param0->unk_C4->unk_04[param0->unk_C4->unk_64].unk_08 == 0) { - if (Item_GetAttribute(param0->unk_C4->unk_66, 6, 6) != 13) { + if (Item_LoadParam(param0->unk_C4->unk_66, 6, 6) != 13) { sub_0207CD34(param0->unk_CC, param0->unk_3F8, param0->unk_C4->unk_66, -1, 6); sub_0201ADA4(¶m0->unk_04[6], 15); sub_0200E060(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); diff --git a/src/overlay084/ov84_0223F040.c b/src/overlay084/ov84_0223F040.c index 8c0bbeaa91..be028635b9 100644 --- a/src/overlay084/ov84_0223F040.c +++ b/src/overlay084/ov84_0223F040.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0201D738.h" #include "struct_defs/struct_0205AA50.h" @@ -210,7 +210,7 @@ void ov84_0223F528 (UnkStruct_ov84_0223B5A0 * param0, u16 param1) if (param1 != 0xffff) { v0 = Strbuf_Init(130, 6); - Item_GetDescriptionIntoString(v0, param1, 6); + Item_LoadDescription(v0, param1, 6); } else { v0 = sub_0200B1EC(param0->unk_114, 94); } @@ -227,7 +227,7 @@ void ov84_0223F584 (UnkStruct_ov84_0223B5A0 * param0, u16 param1) u16 v3; v0 = ¶m0->unk_04[1]; - v2 = GetMoveFromTMOrHMItemID(param1); + v2 = Item_MoveForTMHM(param1); v1 = sub_0200B1EC(param0->unk_114, 98); sub_0201D78C(v0, 0, v1, 0, 0, 0xff, ((u32)(((15 & 0xff) << 16) | ((14 & 0xff) << 8) | ((0 & 0xff) << 0))), NULL); @@ -316,14 +316,14 @@ void ov84_0223F81C (UnkStruct_ov84_0223B5A0 * param0, u16 param1, u16 param2, u3 Strbuf_Free(v0); } -void ov84_0223F8D0 (UnkStruct_ov84_0223B5A0 * param0, UnkStruct_0207CDEC * param1, u32 param2) +void ov84_0223F8D0 (UnkStruct_ov84_0223B5A0 * param0, BagItem * param1, u32 param2) { - u16 v0 = param1->unk_00; + u16 v0 = param1->item; if (v0 < 420) { v0 = v0 - 328 + 1; sub_0200C648(param0->unk_110, 2, v0, 2, 2, ¶m0->unk_04[0], 0, param2 + 5); - ov84_0223F81C(param0, param1->unk_02, param2, ((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((0 & 0xff) << 0)))); + ov84_0223F81C(param0, param1->quantity, param2, ((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((0 & 0xff) << 0)))); } else { v0 = v0 - 420 + 1; sub_0200C5BC(param0->unk_110, v0, 2, 1, ¶m0->unk_04[0], 16, param2 + 5); @@ -331,10 +331,10 @@ void ov84_0223F8D0 (UnkStruct_ov84_0223B5A0 * param0, UnkStruct_0207CDEC * param } } -void ov84_0223F94C (UnkStruct_ov84_0223B5A0 * param0, UnkStruct_0207CDEC * param1, u32 param2) +void ov84_0223F94C (UnkStruct_ov84_0223B5A0 * param0, BagItem * param1, u32 param2) { - sub_0200C648(param0->unk_110, 2, sub_0207D344(param1->unk_00) + 1, 2, 2, ¶m0->unk_04[0], 0, param2 + 5); - ov84_0223F81C(param0, param1->unk_02, param2, ((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((0 & 0xff) << 0)))); + sub_0200C648(param0->unk_110, 2, Item_BerryNumber(param1->item) + 1, 2, 2, ¶m0->unk_04[0], 0, param2 + 5); + ov84_0223F81C(param0, param1->quantity, param2, ((u32)(((1 & 0xff) << 16) | ((2 & 0xff) << 8) | ((0 & 0xff) << 0)))); } static void * ov84_0223F994 (UnkStruct_ov84_0223B5A0 * param0, NNSG2dCharacterData ** param1) diff --git a/src/overlay084/ov84_022403F4.c b/src/overlay084/ov84_022403F4.c index 10187bdf07..bf2c774b31 100644 --- a/src/overlay084/ov84_022403F4.c +++ b/src/overlay084/ov84_022403F4.c @@ -234,12 +234,12 @@ static void ov84_022404C0 (UnkStruct_ov84_0223B5A0 * param0) sub_0200CC3C(param0->unk_D8, param0->unk_DC, param0->unk_D4, 10, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 49405); sub_0200CC3C(param0->unk_D8, param0->unk_DC, param0->unk_D4, 36, 0, NNS_G2D_VRAM_TYPE_2DSUB, 49406); sub_0200CBDC(param0->unk_D8, param0->unk_DC, 62, 4, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 49408); - sub_0200CBDC(param0->unk_D8, param0->unk_DC, 16, sub_0207CE78(0, 1), 0, NNS_G2D_VRAM_TYPE_2DMAIN, 49407); + sub_0200CBDC(param0->unk_D8, param0->unk_DC, 16, Item_FileID(0, 1), 0, NNS_G2D_VRAM_TYPE_2DMAIN, 49407); sub_0207C948(param0->unk_D8, param0->unk_DC, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 49409); sub_0207CAC4(param0->unk_D8, param0->unk_DC, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 49410); sub_0200CD0C(param0->unk_D8, param0->unk_DC, param0->unk_D4, v1, 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 49401); sub_0200CD0C(param0->unk_D8, param0->unk_DC, param0->unk_D4, 20, 0, 2, NNS_G2D_VRAM_TYPE_2DMAIN, 49402); - sub_0200CC9C(param0->unk_D8, param0->unk_DC, 16, sub_0207CE78(0, 2), 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 49404); + sub_0200CC9C(param0->unk_D8, param0->unk_DC, 16, Item_FileID(0, 2), 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 49404); sub_0200CC9C(param0->unk_D8, param0->unk_DC, 62, 10, 0, 2, NNS_G2D_VRAM_TYPE_2DMAIN, 49405); sub_0207C97C(param0->unk_D8, param0->unk_DC, NNS_G2D_VRAM_TYPE_2DMAIN, 49406); sub_0200CD0C(param0->unk_D8, param0->unk_DC, param0->unk_D4, 37, 0, 1, NNS_G2D_VRAM_TYPE_2DSUB, 49403); @@ -249,7 +249,7 @@ static void ov84_022404C0 (UnkStruct_ov84_0223B5A0 * param0) sub_0200CE24(param0->unk_D8, param0->unk_DC, param0->unk_D4, 30, 0, 49404); sub_0200CE24(param0->unk_D8, param0->unk_DC, param0->unk_D4, 9, 0, 49405); sub_0200CE24(param0->unk_D8, param0->unk_DC, param0->unk_D4, 35, 0, 49406); - sub_0200CE0C(param0->unk_D8, param0->unk_DC, 16, Item_GetIndexOfIconNCER(), 0, 49407); + sub_0200CE0C(param0->unk_D8, param0->unk_DC, 16, Item_IconNCERFile(), 0, 49407); sub_0200CE0C(param0->unk_D8, param0->unk_DC, 62, 5, 0, 49408); sub_0200CE54(param0->unk_D8, param0->unk_DC, param0->unk_D4, 0, 0, 49401); sub_0200CE54(param0->unk_D8, param0->unk_DC, param0->unk_D4, 23, 0, 49402); @@ -257,7 +257,7 @@ static void ov84_022404C0 (UnkStruct_ov84_0223B5A0 * param0) sub_0200CE54(param0->unk_D8, param0->unk_DC, param0->unk_D4, 29, 0, 49404); sub_0200CE54(param0->unk_D8, param0->unk_DC, param0->unk_D4, 8, 0, 49405); sub_0200CE54(param0->unk_D8, param0->unk_DC, param0->unk_D4, 34, 0, 49406); - sub_0200CE3C(param0->unk_D8, param0->unk_DC, 16, Item_GetIndexOfIconNANR(), 0, 49407); + sub_0200CE3C(param0->unk_D8, param0->unk_DC, 16, Item_IconNANRFile(), 0, 49407); sub_0200CE3C(param0->unk_D8, param0->unk_DC, 62, 6, 0, 49408); sub_0207C9EC(param0->unk_D8, param0->unk_DC, 49409, 49409); } @@ -319,8 +319,8 @@ void ov84_02240ABC (UnkStruct_ov84_0223B5A0 * param0) void ov84_02240AD8 (UnkStruct_ov84_0223B5A0 * param0, u16 param1) { - sub_0200D948(param0->unk_D8, param0->unk_DC, 16, sub_0207CE78(param1, 1), 0, 49407); - sub_0200D97C(param0->unk_D8, param0->unk_DC, 16, sub_0207CE78(param1, 2), 0, 49404); + sub_0200D948(param0->unk_D8, param0->unk_DC, 16, Item_FileID(param1, 1), 0, 49407); + sub_0200D97C(param0->unk_D8, param0->unk_DC, 16, Item_FileID(param1, 2), 0, 49404); } void ov84_02240B34 (UnkStruct_ov84_0223B5A0 * param0, u8 param1) @@ -442,7 +442,7 @@ void ov84_02240D5C (UnkStruct_ov84_0223B5A0 * param0, u16 param1, u8 param2) return; } - v0 = GetMoveFromTMOrHMItemID(param1); + v0 = Item_MoveForTMHM(param1); v1 = MoveTable_LoadParam(v0, MOVEATTRIBUTE_TYPE); v2 = MoveTable_LoadParam(v0, MOVEATTRIBUTE_CLASS); diff --git a/src/overlay085/ov85_02241440.c b/src/overlay085/ov85_02241440.c index d64876ccc1..4e28df37d5 100644 --- a/src/overlay085/ov85_02241440.c +++ b/src/overlay085/ov85_02241440.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020203AC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_berry_data_decl.h" #include "struct_defs/struct_0205AA50.h" diff --git a/src/overlay086/ov86_0223B140.c b/src/overlay086/ov86_0223B140.c index 81728d1e2a..ef99e02a45 100644 --- a/src/overlay086/ov86_0223B140.c +++ b/src/overlay086/ov86_0223B140.c @@ -14,7 +14,7 @@ #include "struct_decls/struct_020203AC_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/pokemon.h" diff --git a/src/overlay087/ov87_021D106C.c b/src/overlay087/ov87_021D106C.c index f0326c0441..df34e2c25d 100644 --- a/src/overlay087/ov87_021D106C.c +++ b/src/overlay087/ov87_021D106C.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "overlay087/struct_ov87_021D0D80_decl.h" diff --git a/src/overlay088/ov88_0223B140.c b/src/overlay088/ov88_0223B140.c index b1d22d3a84..2fcaaf59b8 100644 --- a/src/overlay088/ov88_0223B140.c +++ b/src/overlay088/ov88_0223B140.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_decls/struct_0202B628_decl.h" @@ -1387,7 +1387,7 @@ static void ov88_0223C8D8 (UnkStruct_0205AA50 * param0, int param1, Party * para sub_0201ADA4(¶m0[32 + param1], 0); v1 = Strbuf_Init(20, 26); - Item_GetNameIntoString(v1, v2, 26); + Item_LoadName(v1, v2, 26); ov88_0223EC78(¶m0[32 + param1], v1, 9, 0, 3, 0); Strbuf_Free(v1); } diff --git a/src/overlay088/ov88_0223E9C4.c b/src/overlay088/ov88_0223E9C4.c index decb5c436e..a1633d33f7 100644 --- a/src/overlay088/ov88_0223E9C4.c +++ b/src/overlay088/ov88_0223E9C4.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_02013A04_t.h" #include "struct_defs/struct_020279FC.h" diff --git a/src/overlay090/ov90_021D0D80.c b/src/overlay090/ov90_021D0D80.c index 0628593e79..8dc96d21b5 100644 --- a/src/overlay090/ov90_021D0D80.c +++ b/src/overlay090/ov90_021D0D80.c @@ -12,7 +12,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202D750_decl.h" #include "struct_decls/struct_0202D764_decl.h" #include "struct_decls/struct_0203068C_decl.h" diff --git a/src/overlay091/ov91_021D0D80.c b/src/overlay091/ov91_021D0D80.c index 9f233c71d9..1164a8026b 100644 --- a/src/overlay091/ov91_021D0D80.c +++ b/src/overlay091/ov91_021D0D80.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "constdata/const_020F410C.h" diff --git a/src/overlay092/ov92_021D0D80.c b/src/overlay092/ov92_021D0D80.c index d006ec80e5..000455a553 100644 --- a/src/overlay092/ov92_021D0D80.c +++ b/src/overlay092/ov92_021D0D80.c @@ -12,7 +12,7 @@ #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020203AC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202C878_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/overlay094/ov94_0223C610.c b/src/overlay094/ov94_0223C610.c index ec00d67b4e..0c3a3c262a 100644 --- a/src/overlay094/ov94_0223C610.c +++ b/src/overlay094/ov94_0223C610.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "overlay084/struct_ov84_0223BA5C.h" diff --git a/src/overlay094/ov94_0223D0C4.c b/src/overlay094/ov94_0223D0C4.c index f5ad715124..fd4ca1c5f9 100644 --- a/src/overlay094/ov94_0223D0C4.c +++ b/src/overlay094/ov94_0223D0C4.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/box_pokemon.h" @@ -544,7 +544,7 @@ void ov94_0223D910 (UnkStruct_0200B144 * param0, UnkStruct_0200B144 * param1, Un v2 = sub_0200B29C(param2, param0, 102, 62); v0 = sub_0200B1EC(param1, v10); - Item_GetNameIntoString(v5, v8, 62); + Item_LoadName(v5, v8, 62); for (v9 = 0; v9 < 5; v9++) { sub_0201ADA4(¶m3[v9], 0x0); diff --git a/src/overlay094/ov94_0223DC04.c b/src/overlay094/ov94_0223DC04.c index 52bf2e03c9..a6f23ba780 100644 --- a/src/overlay094/ov94_0223DC04.c +++ b/src/overlay094/ov94_0223DC04.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/struct_0205AA50.h" diff --git a/src/overlay094/ov94_0223E46C.c b/src/overlay094/ov94_0223E46C.c index 076f2ba559..45dedc76e0 100644 --- a/src/overlay094/ov94_0223E46C.c +++ b/src/overlay094/ov94_0223E46C.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay094/const_ov94_02245FD4.h" diff --git a/src/overlay094/ov94_0223FB48.c b/src/overlay094/ov94_0223FB48.c index 3e29798469..feefeb1fab 100644 --- a/src/overlay094/ov94_0223FB48.c +++ b/src/overlay094/ov94_0223FB48.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/box_pokemon.h" #include "struct_decls/struct_020797DC_decl.h" diff --git a/src/overlay094/ov94_022414B8.c b/src/overlay094/ov94_022414B8.c index 5925cd4e5b..4904fa634e 100644 --- a/src/overlay094/ov94_022414B8.c +++ b/src/overlay094/ov94_022414B8.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_defs/pokemon.h" #include "struct_defs/box_pokemon.h" diff --git a/src/overlay094/ov94_02244950.c b/src/overlay094/ov94_02244950.c index a84261ffe7..bd4ce7dc38 100644 --- a/src/overlay094/ov94_02244950.c +++ b/src/overlay094/ov94_02244950.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "overlay094/struct_ov94_0223FD4C.h" diff --git a/src/overlay095/ov95_02246C20.c b/src/overlay095/ov95_02246C20.c index 8b62c68db6..a12d9883c6 100644 --- a/src/overlay095/ov95_02246C20.c +++ b/src/overlay095/ov95_02246C20.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/box_pokemon.h" #include "overlay095/struct_ov95_02247004_decl.h" #include "overlay095/struct_ov95_022472C4_decl.h" diff --git a/src/overlay095/ov95_02247B6C.c b/src/overlay095/ov95_02247B6C.c index 71ad58836e..553f73f5b3 100644 --- a/src/overlay095/ov95_02247B6C.c +++ b/src/overlay095/ov95_02247B6C.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/box_pokemon.h" #include "overlay095/struct_ov95_02247628_decl.h" #include "overlay095/struct_ov95_0224773C_decl.h" diff --git a/src/overlay095/ov95_0224B3D8.c b/src/overlay095/ov95_0224B3D8.c index 559ecc52e9..6f89ae1be0 100644 --- a/src/overlay095/ov95_0224B3D8.c +++ b/src/overlay095/ov95_0224B3D8.c @@ -11,7 +11,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/box_pokemon.h" #include "overlay095/struct_ov95_02247628_decl.h" #include "overlay095/struct_ov95_0224773C_decl.h" diff --git a/src/overlay096/ov96_0223BCE0.c b/src/overlay096/ov96_0223BCE0.c index c41ba03a50..92c5fd9d14 100644 --- a/src/overlay096/ov96_0223BCE0.c +++ b/src/overlay096/ov96_0223BCE0.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay096/struct_ov96_0223BF40_decl.h" #include "struct_defs/struct_02049A68.h" diff --git a/src/overlay097/ov97_0222AE60.c b/src/overlay097/ov97_0222AE60.c index 10aef5c541..c572af45e2 100644 --- a/src/overlay097/ov97_0222AE60.c +++ b/src/overlay097/ov97_0222AE60.c @@ -8,7 +8,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202442C_decl.h" #include "struct_decls/struct_02025E5C_decl.h" #include "struct_decls/struct_02025E6C_decl.h" diff --git a/src/overlay097/ov97_0222C174.c b/src/overlay097/ov97_0222C174.c index 67528347bd..1edc146480 100644 --- a/src/overlay097/ov97_0222C174.c +++ b/src/overlay097/ov97_0222C174.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202442C_decl.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02026324_decl.h" diff --git a/src/overlay097/ov97_0222D30C.c b/src/overlay097/ov97_0222D30C.c index 77a70ef6fe..0b467764a5 100644 --- a/src/overlay097/ov97_0222D30C.c +++ b/src/overlay097/ov97_0222D30C.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202442C_decl.h" #include "struct_decls/struct_02025CCC_decl.h" #include "struct_defs/pokemon.h" diff --git a/src/overlay097/ov97_02230410.c b/src/overlay097/ov97_02230410.c index ef2eb9f6e2..214d7b3d4d 100644 --- a/src/overlay097/ov97_02230410.c +++ b/src/overlay097/ov97_02230410.c @@ -15,7 +15,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202442C_decl.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/overlay097/ov97_02233B18.c b/src/overlay097/ov97_02233B18.c index 619f9a3a55..853f82d7b3 100644 --- a/src/overlay097/ov97_02233B18.c +++ b/src/overlay097/ov97_02233B18.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02024440_decl.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_021C0794_decl.h" @@ -1250,10 +1250,10 @@ static void ov97_02234B0C (UnkStruct_ov97_02234A2C * param0, BoxPokemonGBA * par v2 = GetGBABoxMonData(param1, 12, NULL); if (v2) { - v3 = sub_0207CF10(v2); + v3 = Item_FromGBAID(v2); v8 = Strbuf_Init(64, 78); - Item_GetNameIntoString(v8, v3, 78); + Item_LoadName(v8, v3, 78); v4.unk_3C = v8; v4.unk_34 = -1; diff --git a/src/overlay097/ov97_02236380.c b/src/overlay097/ov97_02236380.c index 36775ea535..93c8420a95 100644 --- a/src/overlay097/ov97_02236380.c +++ b/src/overlay097/ov97_02236380.c @@ -1370,7 +1370,7 @@ void BoxMonGBAToBoxMon (BoxPokemonGBA * param0, BoxPokemon * param1) v1 = GetGBABoxMonData(param0, 12, NULL); if (v1) { - v1 = sub_0207CF10(v1); + v1 = Item_FromGBAID(v1); } SetBoxMonData(param1, 6, (u8 *)&v1); diff --git a/src/overlay097/ov97_02237694.c b/src/overlay097/ov97_02237694.c index a2a02f5859..12671e4cf1 100644 --- a/src/overlay097/ov97_02237694.c +++ b/src/overlay097/ov97_02237694.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_021C0794_decl.h" @@ -658,7 +658,7 @@ static void ov97_022380C8 (UnkStruct_ov97_0223F550 * param0, int param1, UnkStru break; } - ov97_02237B0C(16, sub_0207CE78(v0, 1), sub_0207CE78(v0, 2), Item_GetIndexOfIconNCER(), Item_GetIndexOfIconNANR(), 1); + ov97_02237B0C(16, Item_FileID(v0, 1), Item_FileID(v0, 2), Item_IconNCERFile(), Item_IconNANRFile(), 1); ov97_02237C80((0 * FX32_ONE), (256 * FX32_ONE)); param0->unk_26C = ov97_02237D14(1, param0->unk_26C, HW_LCD_WIDTH / 2, 0, 0); diff --git a/src/overlay098/ov98_022471C8.c b/src/overlay098/ov98_022471C8.c index 0bc123d4b9..bfc0cf6caf 100644 --- a/src/overlay098/ov98_022471C8.c +++ b/src/overlay098/ov98_022471C8.c @@ -14,7 +14,7 @@ #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_020149F0_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025CCC_decl.h" #include "struct_decls/struct_0202B370_decl.h" diff --git a/src/overlay098/ov98_022499C8.c b/src/overlay098/ov98_022499C8.c index ed28970ef7..379a574fc7 100644 --- a/src/overlay098/ov98_022499C8.c +++ b/src/overlay098/ov98_022499C8.c @@ -2,7 +2,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "heap.h" #include "error_handling.h" diff --git a/src/overlay099/ov99_021D1A54.c b/src/overlay099/ov99_021D1A54.c index ccf8d931c4..04f822fb98 100644 --- a/src/overlay099/ov99_021D1A54.c +++ b/src/overlay099/ov99_021D1A54.c @@ -4,7 +4,7 @@ #include "data_021BF67C.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0200D0F4.h" #include "overlay099/struct_ov99_021D2CB0.h" diff --git a/src/overlay099/ov99_021D3E78.c b/src/overlay099/ov99_021D3E78.c index 2e3216e779..07707a189a 100644 --- a/src/overlay099/ov99_021D3E78.c +++ b/src/overlay099/ov99_021D3E78.c @@ -4,7 +4,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay099/struct_ov99_021D3E78_decl.h" #include "struct_defs/struct_0205AA50.h" diff --git a/src/overlay100/ov100_021D46C8.c b/src/overlay100/ov100_021D46C8.c index d4f6d22a7a..c7b9b5489b 100644 --- a/src/overlay100/ov100_021D46C8.c +++ b/src/overlay100/ov100_021D46C8.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020985E4.h" #include "overlay100/struct_ov100_021D46C8.h" diff --git a/src/overlay102/ov102_021D0D80.c b/src/overlay102/ov102_021D0D80.c index b3a3d11708..d5ea2c399c 100644 --- a/src/overlay102/ov102_021D0D80.c +++ b/src/overlay102/ov102_021D0D80.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/overlay104/ov104_0222DCE0.c b/src/overlay104/ov104_0222DCE0.c index 69f150afab..c8adf79e70 100644 --- a/src/overlay104/ov104_0222DCE0.c +++ b/src/overlay104/ov104_0222DCE0.c @@ -4,7 +4,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202C878_decl.h" #include "struct_defs/pokemon.h" diff --git a/src/overlay104/ov104_0222FBE4.c b/src/overlay104/ov104_0222FBE4.c index a734c8e119..77b0e55629 100644 --- a/src/overlay104/ov104_0222FBE4.c +++ b/src/overlay104/ov104_0222FBE4.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_02014014_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202440C_decl.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202B370_decl.h" diff --git a/src/overlay104/ov104_02231F74.c b/src/overlay104/ov104_02231F74.c index a219ee600a..109520c969 100644 --- a/src/overlay104/ov104_02231F74.c +++ b/src/overlay104/ov104_02231F74.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "overlay063/struct_ov63_0222BEC0_decl.h" #include "overlay104/struct_ov104_0222E930_decl.h" diff --git a/src/overlay104/ov104_022332B4.c b/src/overlay104/ov104_022332B4.c index 46cc934749..265d9c3a45 100644 --- a/src/overlay104/ov104_022332B4.c +++ b/src/overlay104/ov104_022332B4.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "overlay104/struct_ov104_0222E930_decl.h" diff --git a/src/overlay104/ov104_022358E8.c b/src/overlay104/ov104_022358E8.c index 31b25ffd87..a752cb9a65 100644 --- a/src/overlay104/ov104_022358E8.c +++ b/src/overlay104/ov104_022358E8.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_party_decl.h" #include "overlay104/struct_ov104_0222E930_decl.h" diff --git a/src/overlay104/ov104_022361B4.c b/src/overlay104/ov104_022361B4.c index 35af889061..3faf3dee91 100644 --- a/src/overlay104/ov104_022361B4.c +++ b/src/overlay104/ov104_022361B4.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_020302DC_decl.h" #include "struct_decls/struct_0203041C_decl.h" diff --git a/src/overlay104/ov104_02237378.c b/src/overlay104/ov104_02237378.c index 0b0e855797..ec255ca648 100644 --- a/src/overlay104/ov104_02237378.c +++ b/src/overlay104/ov104_02237378.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_02014014_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/overlay104/ov104_0223A7F4.c b/src/overlay104/ov104_0223A7F4.c index f4c9522ab8..3acc3a54b7 100644 --- a/src/overlay104/ov104_0223A7F4.c +++ b/src/overlay104/ov104_0223A7F4.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/pokemon.h" diff --git a/src/overlay104/ov104_0223B6F4.c b/src/overlay104/ov104_0223B6F4.c index ac6982c191..ce4832d613 100644 --- a/src/overlay104/ov104_0223B6F4.c +++ b/src/overlay104/ov104_0223B6F4.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0203068C_decl.h" #include "struct_defs/pokemon.h" diff --git a/src/overlay104/ov104_0223BCBC.c b/src/overlay104/ov104_0223BCBC.c index 3564dc9803..2074755298 100644 --- a/src/overlay104/ov104_0223BCBC.c +++ b/src/overlay104/ov104_0223BCBC.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/overlay104/ov104_0223DC7C.c b/src/overlay104/ov104_0223DC7C.c index 3afc520dd5..4e3534c048 100644 --- a/src/overlay104/ov104_0223DC7C.c +++ b/src/overlay104/ov104_0223DC7C.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_02012CE0_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_020127E8.h" diff --git a/src/overlay105/ov105_02241AE0.c b/src/overlay105/ov105_02241AE0.c index 1cf72d08f1..48b57f89d1 100644 --- a/src/overlay105/ov105_02241AE0.c +++ b/src/overlay105/ov105_02241AE0.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/pokemon.h" #include "struct_defs/box_pokemon.h" diff --git a/src/overlay106/ov106_02241AE0.c b/src/overlay106/ov106_02241AE0.c index 9265a24461..744449aaf0 100644 --- a/src/overlay106/ov106_02241AE0.c +++ b/src/overlay106/ov106_02241AE0.c @@ -12,7 +12,7 @@ #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/overlay107/ov107_02241AE0.c b/src/overlay107/ov107_02241AE0.c index db2a1dca60..6ee43b42d6 100644 --- a/src/overlay107/ov107_02241AE0.c +++ b/src/overlay107/ov107_02241AE0.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_020302DC_decl.h" #include "struct_decls/struct_0203041C_decl.h" diff --git a/src/overlay107/ov107_02245EB0.c b/src/overlay107/ov107_02245EB0.c index 70961fb548..7f0c7c285e 100644 --- a/src/overlay107/ov107_02245EB0.c +++ b/src/overlay107/ov107_02245EB0.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_020302DC_decl.h" #include "struct_decls/struct_0203041C_decl.h" diff --git a/src/overlay107/ov107_02249604.c b/src/overlay107/ov107_02249604.c index cb5bd86d77..e717bb005e 100644 --- a/src/overlay107/ov107_02249604.c +++ b/src/overlay107/ov107_02249604.c @@ -68,10 +68,10 @@ void ov107_02249604 (UnkStruct_ov107_02249954 * param0, Party * param1, u8 param v1 = NARC_ctor(NARC_INDEX_ITEMTOOL__ITEMDATA__ITEM_ICON, 100); - param0->unk_1A0[1][0] = sub_02009A4C(param0->unk_190[0], v1, sub_0207CE78(0, 1), 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 100); - param0->unk_1A0[1][1] = sub_020098B8(param0->unk_190[1], 16, sub_0207CE78(0, 2), 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 3, 100); - param0->unk_1A0[1][2] = sub_02009BC4(param0->unk_190[2], v1, Item_GetIndexOfIconNCER(), 0, 1, 2, 100); - param0->unk_1A0[1][3] = sub_02009BC4(param0->unk_190[3], v1, Item_GetIndexOfIconNANR(), 0, 1, 3, 100); + param0->unk_1A0[1][0] = sub_02009A4C(param0->unk_190[0], v1, Item_FileID(0, 1), 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 100); + param0->unk_1A0[1][1] = sub_020098B8(param0->unk_190[1], 16, Item_FileID(0, 2), 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 3, 100); + param0->unk_1A0[1][2] = sub_02009BC4(param0->unk_190[2], v1, Item_IconNCERFile(), 0, 1, 2, 100); + param0->unk_1A0[1][3] = sub_02009BC4(param0->unk_190[3], v1, Item_IconNANRFile(), 0, 1, 3, 100); NARC_dtor(v1); ov107_02249A70(param0); @@ -186,7 +186,7 @@ void ov107_022499BC (UnkStruct_ov107_02249954 * param0, u16 param1) v0 = sub_02009DC8(param0->unk_190[0], 1); - sub_02009968(param0->unk_190[0], v0, 16, sub_0207CE78(param1, 1), 0, 100); + sub_02009968(param0->unk_190[0], v0, 16, Item_FileID(param1, 1), 0, 100); sub_0200A4C0(v0); return; @@ -198,7 +198,7 @@ void ov107_022499FC (UnkStruct_ov107_02249954 * param0, u16 param1) v0 = sub_02009DC8(param0->unk_190[1], 1); - sub_020099D4(param0->unk_190[1], v0, 16, sub_0207CE78(param1, 2), 0, 100); + sub_020099D4(param0->unk_190[1], v0, 16, Item_FileID(param1, 2), 0, 100); sub_0200A6B8(v0); return; diff --git a/src/overlay108/ov108_02241AE0.c b/src/overlay108/ov108_02241AE0.c index c30e81d9c2..565c15380a 100644 --- a/src/overlay108/ov108_02241AE0.c +++ b/src/overlay108/ov108_02241AE0.c @@ -11,7 +11,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_020304A0_decl.h" #include "struct_decls/struct_020305B8_decl.h" diff --git a/src/overlay109/ov109_021D0D80.c b/src/overlay109/ov109_021D0D80.c index d30b743f59..fe2d3d484c 100644 --- a/src/overlay109/ov109_021D0D80.c +++ b/src/overlay109/ov109_021D0D80.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020203AC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/overlay109/ov109_021D3D50.c b/src/overlay109/ov109_021D3D50.c index 8884e7b728..0064ccfb03 100644 --- a/src/overlay109/ov109_021D3D50.c +++ b/src/overlay109/ov109_021D3D50.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/overlay110/ov110_021D0D80.c b/src/overlay110/ov110_021D0D80.c index 323671b01b..1f68906738 100644 --- a/src/overlay110/ov110_021D0D80.c +++ b/src/overlay110/ov110_021D0D80.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202D750_decl.h" #include "struct_decls/struct_0203068C_decl.h" #include "struct_decls/struct_020308A0_decl.h" diff --git a/src/overlay111/ov111_021D0D80.c b/src/overlay111/ov111_021D0D80.c index de2729d406..a6488d8040 100644 --- a/src/overlay111/ov111_021D0D80.c +++ b/src/overlay111/ov111_021D0D80.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_02015920_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_021C0794_decl.h" #include "overlay111/struct_ov111_021D0F7C_decl.h" #include "overlay111/struct_ov111_021D33F4_decl.h" diff --git a/src/overlay112/ov112_0225C700.c b/src/overlay112/ov112_0225C700.c index 28d7a0645f..3f1a4ea266 100644 --- a/src/overlay112/ov112_0225C700.c +++ b/src/overlay112/ov112_0225C700.c @@ -11,7 +11,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020218BC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay066/struct_ov66_0222DFF8_decl.h" #include "overlay066/struct_ov66_0223177C_decl.h" diff --git a/src/overlay113/ov113_0225C700.c b/src/overlay113/ov113_0225C700.c index 708ff499e6..519a0db9ee 100644 --- a/src/overlay113/ov113_0225C700.c +++ b/src/overlay113/ov113_0225C700.c @@ -17,7 +17,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020203AC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_party_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/overlay113/ov113_02260620.c b/src/overlay113/ov113_02260620.c index 48e95084db..522c44d1ff 100644 --- a/src/overlay113/ov113_02260620.c +++ b/src/overlay113/ov113_02260620.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "overlay066/struct_ov66_0222DFF8_decl.h" #include "overlay066/struct_ov66_0222E71C_decl.h" diff --git a/src/overlay114/ov114_0225C700.c b/src/overlay114/ov114_0225C700.c index 49a26e7ffa..c73ec65962 100644 --- a/src/overlay114/ov114_0225C700.c +++ b/src/overlay114/ov114_0225C700.c @@ -16,7 +16,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/overlay115/ov115_02260CEC.c b/src/overlay115/ov115_02260CEC.c index a6537f9674..a328cd51e2 100644 --- a/src/overlay115/ov115_02260CEC.c +++ b/src/overlay115/ov115_02260CEC.c @@ -15,7 +15,7 @@ #include "struct_decls/struct_020203AC_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "overlay114/struct_ov114_0225CAD4_decl.h" #include "struct_defs/struct_0200C738.h" diff --git a/src/overlay116/ov116_02261870.c b/src/overlay116/ov116_02261870.c index 19be8f6475..3f7c8ee60e 100644 --- a/src/overlay116/ov116_02261870.c +++ b/src/overlay116/ov116_02261870.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/struct_0200D0F4.h" diff --git a/src/overlay117/ov117_02260668.c b/src/overlay117/ov117_02260668.c index 55659fd1cc..053704596e 100644 --- a/src/overlay117/ov117_02260668.c +++ b/src/overlay117/ov117_02260668.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020203AC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/struct_020170F4.h" diff --git a/src/overlay117/ov117_02263AF0.c b/src/overlay117/ov117_02263AF0.c index b646de45ac..97c2403384 100644 --- a/src/overlay117/ov117_02263AF0.c +++ b/src/overlay117/ov117_02263AF0.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_02012744_decl.h" #include "struct_decls/struct_02012CE0_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_020127E8.h" diff --git a/src/overlay118/ov118_021D0D80.c b/src/overlay118/ov118_021D0D80.c index 79540eb507..44b42dd82e 100644 --- a/src/overlay118/ov118_021D0D80.c +++ b/src/overlay118/ov118_021D0D80.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_02014014_decl.h" #include "struct_decls/struct_020203AC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/struct_0207F248.h" diff --git a/src/overlay119/ov119_021D0D80.c b/src/overlay119/ov119_021D0D80.c index 823abeacc4..9835638a11 100644 --- a/src/overlay119/ov119_021D0D80.c +++ b/src/overlay119/ov119_021D0D80.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_02014014_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_020203AC_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/box_pokemon.h" diff --git a/src/unk_02002B7C.c b/src/unk_02002B7C.c index 3135d13a0f..4b1be69d49 100644 --- a/src/unk_02002B7C.c +++ b/src/unk_02002B7C.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_02023350_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_02002328.h" #include "struct_defs/struct_02002D18.h" diff --git a/src/unk_0200AC5C.c b/src/unk_0200AC5C.c index 8a9e987c40..2450bc99e8 100644 --- a/src/unk_0200AC5C.c +++ b/src/unk_0200AC5C.c @@ -4,7 +4,7 @@ #include "inlines.h" #include "struct_decls/struct_02006C24_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "narc.h" #include "unk_0200AC5C.h" diff --git a/src/unk_0200B29C.c b/src/unk_0200B29C.c index 9e18142123..8cbe100180 100644 --- a/src/unk_0200B29C.c +++ b/src/unk_0200B29C.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "unk_0200AC5C.h" #include "unk_0200B29C.h" diff --git a/src/unk_0200B358.c b/src/unk_0200B358.c index 2d37de88b3..66e583c06e 100644 --- a/src/unk_0200B358.c +++ b/src/unk_0200B358.c @@ -6,7 +6,7 @@ #include "constants/pokemon.h" #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202B4A0_decl.h" #include "struct_defs/box_pokemon.h" diff --git a/src/unk_02013A04.c b/src/unk_02013A04.c index 75a28a04fb..5616d83b4a 100644 --- a/src/unk_02013A04.c +++ b/src/unk_02013A04.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02013A04_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_02013A04_t.h" diff --git a/src/unk_020149F0.c b/src/unk_020149F0.c index 68bb2a813b..66033f7f24 100644 --- a/src/unk_020149F0.c +++ b/src/unk_020149F0.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_020149F0_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" diff --git a/src/unk_02014A84.c b/src/unk_02014A84.c index c8117fa951..b379cb6b3b 100644 --- a/src/unk_02014A84.c +++ b/src/unk_02014A84.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_02014A84.h" diff --git a/src/unk_02014D38.c b/src/unk_02014D38.c index 603ab9b8db..ad1604ed60 100644 --- a/src/unk_02014D38.c +++ b/src/unk_02014D38.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_021C0794_decl.h" #include "unk_02006E3C.h" diff --git a/src/unk_020158A8.c b/src/unk_020158A8.c index c3fc0a7250..2f9ff8c086 100644 --- a/src/unk_020158A8.c +++ b/src/unk_020158A8.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020158A8.h" diff --git a/src/unk_0201D670.c b/src/unk_0201D670.c index 4a88144275..02987b9320 100644 --- a/src/unk_0201D670.c +++ b/src/unk_0201D670.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "functypes/funcptr_0201CE28.h" #include "struct_defs/struct_0201D670.h" diff --git a/src/unk_02025E68.c b/src/unk_02025E68.c index 7d5e828c76..3df6d16925 100644 --- a/src/unk_02025E68.c +++ b/src/unk_02025E68.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_02025E6C.h" diff --git a/src/unk_0202602C.c b/src/unk_0202602C.c index c6da3f6265..422cafcfde 100644 --- a/src/unk_0202602C.c +++ b/src/unk_0202602C.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02026030_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/unk_02026150.c b/src/unk_02026150.c index 309c23a56a..0820cb95ce 100644 --- a/src/unk_02026150.c +++ b/src/unk_02026150.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02026030_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/unk_020277A4.c b/src/unk_020277A4.c index c9e7578d53..44d48cdc1c 100644 --- a/src/unk_020277A4.c +++ b/src/unk_020277A4.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_021C0794_decl.h" #include "struct_defs/struct_02014A84.h" diff --git a/src/unk_020298BC.c b/src/unk_020298BC.c index 3373487bd5..3af3807f9e 100644 --- a/src/unk_020298BC.c +++ b/src/unk_020298BC.c @@ -3,7 +3,7 @@ #include "inlines.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/unk_0202ACE0.c b/src/unk_0202ACE0.c index 5a564787c3..3a82efb972 100644 --- a/src/unk_0202ACE0.c +++ b/src/unk_0202ACE0.c @@ -4,7 +4,7 @@ #include "assert.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_021C0794_decl.h" #include "struct_defs/struct_0202B370.h" diff --git a/src/unk_0202B37C.c b/src/unk_0202B37C.c index 9b8db6c4ee..e5f1982fef 100644 --- a/src/unk_0202B37C.c +++ b/src/unk_0202B37C.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_021C0794_decl.h" #include "struct_defs/struct_0202B4A0.h" diff --git a/src/unk_0202DF8C.c b/src/unk_0202DF8C.c index 880e707769..48edc3347f 100644 --- a/src/unk_0202DF8C.c +++ b/src/unk_0202DF8C.c @@ -3,7 +3,7 @@ #include "inlines.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/unk_0202E840.c b/src/unk_0202E840.c index d9d594e86c..adff24a4a9 100644 --- a/src/unk_0202E840.c +++ b/src/unk_0202E840.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202CD88_decl.h" #include "struct_decls/struct_0203068C_decl.h" diff --git a/src/unk_02030A80.c b/src/unk_02030A80.c index 71e0660f4a..8ac5086b6e 100644 --- a/src/unk_02030A80.c +++ b/src/unk_02030A80.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025CCC_decl.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202783C_decl.h" diff --git a/src/unk_0203909C.c b/src/unk_0203909C.c index 6f2346c632..28d2e4bdb9 100644 --- a/src/unk_0203909C.c +++ b/src/unk_0203909C.c @@ -2,7 +2,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/unk_02039814.c b/src/unk_02039814.c index de28e99ba1..a97c969f96 100644 --- a/src/unk_02039814.c +++ b/src/unk_02039814.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/unk_02039A64.c b/src/unk_02039A64.c index a8387880fd..a36cbbb0f4 100644 --- a/src/unk_02039A64.c +++ b/src/unk_02039A64.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/unk_0203A9C8.c b/src/unk_0203A9C8.c index 11d281b716..f5df88e099 100644 --- a/src/unk_0203A9C8.c +++ b/src/unk_0203A9C8.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_decls/struct_020507E4_decl.h" @@ -1114,7 +1114,7 @@ BOOL sub_0203B7C0 (UnkStruct_020508D4 * param0) { UnkStruct_02097728 * v8; - v8 = sub_0203D920(v0, 2, v2->unk_22, sub_0207D2F0(v2->unk_24), 11); + v8 = sub_0203D920(v0, 2, v2->unk_22, Item_MailNumber(v2->unk_24), 11); v1->unk_25C = v8; if (v2->unk_20 == 10) { @@ -1297,7 +1297,7 @@ static BOOL sub_0203BC5C (UnkStruct_020508D4 * param0) v4.unk_04 = sub_0207CB94(v2); v4.unk_06 = sub_0207CBA4(v2); v4.unk_00 = param0; - v5 = Item_GetAttribute(v4.unk_04, 6, 11); + v5 = Item_LoadParam(v4.unk_04, 6, 11); v3 = (UnkFuncPtr_0203BC5C)sub_020683F4(0, v5); v3(&v4, &v1->unk_230); } @@ -1345,7 +1345,7 @@ static BOOL sub_0203BC5C (UnkStruct_020508D4 * param0) UnkStruct_02097728 * v11; UnkStruct_0203C540 * v12; - v11 = sub_0203D920(v0, 2, v9, sub_0207D2F0(v10), 11); + v11 = sub_0203D920(v0, 2, v9, Item_MailNumber(v10), 11); v1->unk_25C = v11; v1->unk_260 = sub_0203C540(v10, 0, (u8)v9); sub_0203B674(v1, sub_0203C558); @@ -1698,7 +1698,7 @@ static void sub_0203C2D8 (UnkStruct_020508D4 * param0, u16 param1) v6 = 0; for (v3 = 0; v3 < 64; v3++) { - param1 = sub_0207D354(v3); + param1 = Item_ForBerryNumber(v3); if (sub_0207D688(v2, param1, 1, 11) == 1) { sub_02097320(v1->unk_25C, param1, 0); diff --git a/src/unk_0203D1B8.c b/src/unk_0203D1B8.c index 5c0743baa0..074109badf 100644 --- a/src/unk_0203D1B8.c +++ b/src/unk_0203D1B8.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_020067E8_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202783C_decl.h" #include "struct_decls/struct_02029C68_decl.h" diff --git a/src/unk_0203E880.c b/src/unk_0203E880.c index 2a80da6c7b..7b9509d303 100644 --- a/src/unk_0203E880.c +++ b/src/unk_0203E880.c @@ -4,7 +4,7 @@ #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0203E724_decl.h" #include "struct_decls/struct_0203EF60_decl.h" #include "struct_decls/struct_020507E4_decl.h" diff --git a/src/unk_0203F6C4.c b/src/unk_0203F6C4.c index b144c859c5..4d91b382a6 100644 --- a/src/unk_0203F6C4.c +++ b/src/unk_0203F6C4.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02014EC4_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202440C_decl.h" #include "struct_decls/struct_02025CCC_decl.h" #include "struct_decls/struct_02025E6C_decl.h" diff --git a/src/unk_02046C7C.c b/src/unk_02046C7C.c index b3d900e799..8a35ca8c4f 100644 --- a/src/unk_02046C7C.c +++ b/src/unk_02046C7C.c @@ -4,7 +4,7 @@ #include "inlines.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0203E724_decl.h" #include "struct_defs/pokemon.h" diff --git a/src/unk_020474B8.c b/src/unk_020474B8.c index 10c776dbce..c8d1f050e3 100644 --- a/src/unk_020474B8.c +++ b/src/unk_020474B8.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0203E724_decl.h" #include "struct_defs/pokemon.h" @@ -139,7 +139,7 @@ BOOL sub_02047660 (UnkStruct_0203E724 * param0) u16 v3 = inline_02049538(param0); u16 v4; - v4 = GetMoveFromTMOrHMItemID(v3); + v4 = Item_MoveForTMHM(v3); sub_0200B630(*v1, v2, v4); return 0; diff --git a/src/unk_02048BD0.c b/src/unk_02048BD0.c index 7d0ba90b54..97f3740de2 100644 --- a/src/unk_02048BD0.c +++ b/src/unk_02048BD0.c @@ -4,7 +4,7 @@ #include "inlines.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202B4A0_decl.h" #include "struct_decls/struct_0203E724_decl.h" diff --git a/src/unk_02048DD8.c b/src/unk_02048DD8.c index 27d2181b43..980b217dd6 100644 --- a/src/unk_02048DD8.c +++ b/src/unk_02048DD8.c @@ -4,7 +4,7 @@ #include "inlines.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202440C_decl.h" #include "struct_decls/struct_0202A750_decl.h" #include "struct_decls/struct_0202CD88_decl.h" diff --git a/src/unk_0204AEE8.c b/src/unk_0204AEE8.c index 1698eabaf5..e298e042dd 100644 --- a/src/unk_0204AEE8.c +++ b/src/unk_0204AEE8.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_defs/pokemon.h" diff --git a/src/unk_0204B830.c b/src/unk_0204B830.c index 4e2677b216..841093184c 100644 --- a/src/unk_0204B830.c +++ b/src/unk_0204B830.c @@ -4,7 +4,7 @@ #include "inlines.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0203E724_decl.h" #include "struct_decls/struct_020507E4_decl.h" diff --git a/src/unk_0204CFFC.c b/src/unk_0204CFFC.c index 882c5787ab..f24457b436 100644 --- a/src/unk_0204CFFC.c +++ b/src/unk_0204CFFC.c @@ -313,7 +313,7 @@ BOOL sub_0204D614 (UnkStruct_0203E724 * param0) v4 = GetMonData(v1, MON_DATA_FRIENDSHIP, NULL); if (v2 > 0) { - if (Item_GetAttribute(GetMonData(v1, MON_DATA_HELD_ITEM, NULL), 1, 11) == 53) { + if (Item_LoadParam(GetMonData(v1, MON_DATA_HELD_ITEM, NULL), 1, 11) == 53) { v2 = v2 * 150 / 100; } diff --git a/src/unk_0204E75C.c b/src/unk_0204E75C.c index 2b197d2f13..577787c8bf 100644 --- a/src/unk_0204E75C.c +++ b/src/unk_0204E75C.c @@ -83,7 +83,7 @@ BOOL sub_0204E934 (UnkStruct_0203E724 * param0) u16 v1 = inline_02049538(param0); u16 * v2 = inline_0204FCAC(param0); - *v2 = (u16)Item_GetAttribute(v1, 5, 11); + *v2 = (u16)Item_LoadParam(v1, 5, 11); return 0; } diff --git a/src/unk_02051D8C.c b/src/unk_02051D8C.c index b1b500b074..750d729540 100644 --- a/src/unk_02051D8C.c +++ b/src/unk_02051D8C.c @@ -6,7 +6,7 @@ #include "data_021BF67C.h" #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_decls/struct_0202B628_decl.h" diff --git a/src/unk_020528D0.c b/src/unk_020528D0.c index 79c36f92b2..919dc00797 100644 --- a/src/unk_020528D0.c +++ b/src/unk_020528D0.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0203A790_decl.h" #include "struct_decls/struct_020508D4_decl.h" diff --git a/src/unk_02052C6C.c b/src/unk_02052C6C.c index 921738d955..0506b071d3 100644 --- a/src/unk_02052C6C.c +++ b/src/unk_02052C6C.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202CD88_decl.h" #include "struct_decls/struct_020507E4_decl.h" diff --git a/src/unk_020530C8.c b/src/unk_020530C8.c index 989f6ce80e..6b735e932e 100644 --- a/src/unk_020530C8.c +++ b/src/unk_020530C8.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0203A790_decl.h" #include "struct_decls/struct_020507E4_decl.h" #include "struct_decls/struct_020508D4_decl.h" diff --git a/src/unk_0205A0D8.c b/src/unk_0205A0D8.c index d2c4d6c4ff..a20511b6f5 100644 --- a/src/unk_0205A0D8.c +++ b/src/unk_0205A0D8.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_020149F0_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_020508D4_decl.h" #include "struct_defs/pokemon.h" diff --git a/src/unk_0205B33C.c b/src/unk_0205B33C.c index f8648b92da..f82db163e3 100644 --- a/src/unk_0205B33C.c +++ b/src/unk_0205B33C.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02014EC4_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0205B43C_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/unk_0205D8CC.c b/src/unk_0205D8CC.c index 81159c61ad..9684dabaa5 100644 --- a/src/unk_0205D8CC.c +++ b/src/unk_0205D8CC.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_020279FC.h" #include "struct_defs/struct_0205AA50.h" diff --git a/src/unk_020683F4.c b/src/unk_020683F4.c index c934e1d11b..1486f19d1e 100644 --- a/src/unk_020683F4.c +++ b/src/unk_020683F4.c @@ -3,7 +3,7 @@ #include "data_021BF67C.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_020507E4_decl.h" #include "struct_decls/struct_020508D4_decl.h" #include "struct_decls/struct_02061AB4_decl.h" @@ -605,7 +605,7 @@ static void sub_02068A34 (UnkStruct_02068630 * param0, const UnkStruct_020684D0 v2->unk_1C = v0; v2->unk_24 = param0->unk_04; v2->unk_22 = param0->unk_06; - v2->unk_26 = GetMoveFromTMOrHMItemID(param0->unk_04); + v2->unk_26 = Item_MoveForTMHM(param0->unk_04); sub_0203CD84(v0, &Unk_020F1E88, v2); v1->unk_25C = v2; @@ -620,7 +620,7 @@ static void sub_02068ACC (UnkStruct_02068630 * param0, const UnkStruct_020684D0 v0 = sub_02050A60(param0->unk_00); v1 = sub_02050A64(param0->unk_00); - v2 = sub_0203D94C(v0, 3, sub_0207D2F0(param0->unk_04), 11); + v2 = sub_0203D94C(v0, 3, Item_MailNumber(param0->unk_04), 11); v1->unk_260 = sub_0203C540(param0->unk_04, 3, 0); v1->unk_25C = v2; @@ -1154,7 +1154,7 @@ BOOL sub_02069238 (UnkStruct_0203CDB0 * param0) } v3 = (u16)sub_0207D3FC(sub_0207D990(param0->unk_0C)); - v4 = (u16)Item_GetAttribute(v3, 6, 11); + v4 = (u16)Item_LoadParam(v3, 6, 11); v2 = (UnkFuncPtr_02069238)sub_020683F4(2, v4); v1 = (UnkFuncPtr_020EF79C)sub_020683F4(1, v4); diff --git a/src/unk_0206CCB0.c b/src/unk_0206CCB0.c index ec4a6e610b..adf702fbc8 100644 --- a/src/unk_0206CCB0.c +++ b/src/unk_0206CCB0.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202440C_decl.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_02026324_decl.h" diff --git a/src/unk_0206F314.c b/src/unk_0206F314.c index 90e3d1cfa3..2b8006bd39 100644 --- a/src/unk_0206F314.c +++ b/src/unk_0206F314.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_0202E8C0_decl.h" #include "struct_decls/struct_020508D4_decl.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/unk_02071CFC.c b/src/unk_02071CFC.c index f1089107ca..0d491266c9 100644 --- a/src/unk_02071CFC.c +++ b/src/unk_02071CFC.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0203CDB0_sub2_t.h" diff --git a/src/unk_020722AC.c b/src/unk_020722AC.c index 4c04229756..73a6183e95 100644 --- a/src/unk_020722AC.c +++ b/src/unk_020722AC.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02028430_decl.h" #include "struct_decls/struct_020508D4_decl.h" #include "struct_defs/pokemon.h" @@ -948,7 +948,7 @@ static void sub_02072F30 (UnkStruct_02072334 * param0, UnkStruct_021C0794 * para v7->unk_01 = 1; v7->unk_04 = sub_02028310(v6); v7->unk_05 = sub_02028314(v6); - v7->unk_06 = sub_0207D310(v7->unk_05); + v7->unk_06 = Item_ForMailNumber(v7->unk_05); Strbuf_CopyChars(v7->unk_08, sub_0202830C(v6)); diff --git a/src/unk_02073C2C.c b/src/unk_02073C2C.c index 75ed834050..0a1732bf40 100644 --- a/src/unk_02073C2C.c +++ b/src/unk_02073C2C.c @@ -9,7 +9,7 @@ #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02015F84_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_decls/struct_0202CC84_decl.h" #include "struct_decls/party_pokemon.h" @@ -1120,7 +1120,7 @@ static u32 sub_020745D0 (BoxPokemon * param0, int param1, void * param2) case MON_DATA_177: case MON_DATA_178: if ((v2->species == SPECIES_ARCEUS) && (v2->unk_0D == 121)) { - v0 = sub_02077988(Item_GetAttribute(v2->item, 1, 0)); + v0 = sub_02077988(Item_LoadParam(v2->item, 1, 0)); } else { v0 = sub_020759CC(v2->species, v3->form, 6 + (param1 - 177)); } @@ -2374,7 +2374,7 @@ void sub_02075C74 (Pokemon * param0, u8 param1, u16 param2) } v1 = GetMonData(param0, MON_DATA_HELD_ITEM, NULL); - v5 = Item_GetAttribute(v1, 1, 0); + v5 = Item_LoadParam(v1, 1, 0); v4 = 0; v2 = GetMonData(param0, MON_DATA_FRIENDSHIP, NULL); @@ -3217,7 +3217,7 @@ u16 sub_02076B94 (Party * param0, Pokemon * param1, u8 param2, u16 param3, int * v6 = GetMonData(param1, MON_DATA_PERSONALITY, NULL); v8 = GetMonData(param1, MON_DATA_BEAUTY, NULL); v9 = (v6 & 0xffff0000) >> 16; - v7 = Item_GetAttribute(v1, 1, 0); + v7 = Item_LoadParam(v1, 1, 0); if (v0 != 64) { if ((v7 == 64) && (param2 != 3)) { @@ -4031,7 +4031,7 @@ void sub_02077930 (BoxPokemon * param0) v2 = sub_02074570(param0, MON_DATA_HELD_ITEM, NULL); if ((v0 == 493) && (v1 == 121)) { - v3 = sub_02077988(Item_GetAttribute(v2, 1, 0)); + v3 = sub_02077988(Item_LoadParam(v2, 1, 0)); SetBoxMonData(param0, 112, &v3); } } diff --git a/src/unk_02079170.c b/src/unk_02079170.c index 24ed690b9a..6cb6e6ff74 100644 --- a/src/unk_02079170.c +++ b/src/unk_02079170.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_021C0794_decl.h" diff --git a/src/unk_020797C8.c b/src/unk_020797C8.c index 7360e6e188..3aff684bda 100644 --- a/src/unk_020797C8.c +++ b/src/unk_020797C8.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/box_pokemon.h" diff --git a/src/unk_0207AE68.c b/src/unk_0207AE68.c index 5264b7d7d7..02c5e1a986 100644 --- a/src/unk_0207AE68.c +++ b/src/unk_0207AE68.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_decls/struct_0202CD88_decl.h" #include "struct_decls/struct_02056B24_decl.h" diff --git a/src/unk_0207CB08.c b/src/unk_0207CB08.c index a7e7a26480..5b77411f93 100644 --- a/src/unk_0207CB08.c +++ b/src/unk_0207CB08.c @@ -3,7 +3,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02029D04_decl.h" #include "struct_decls/struct_0202CA1C_decl.h" #include "struct_decls/struct_021C0794_decl.h" @@ -53,7 +53,7 @@ void sub_0207CB2C (UnkStruct_0207CB08 * param0, UnkStruct_021C0794 * param1, u8 param0->unk_66 = 0; } -void sub_0207CB48 (UnkStruct_0207CB08 * param0, UnkStruct_0207CDEC * param1, u8 param2, u8 param3) +void sub_0207CB48 (UnkStruct_0207CB08 * param0, BagItem * param1, u8 param2, u8 param3) { param0->unk_04[param3].unk_00 = param1; param0->unk_04[param3].unk_08 = param2; diff --git a/src/unk_0207D3B8.c b/src/unk_0207D3B8.c index 6661d8c289..eada0addf9 100644 --- a/src/unk_0207D3B8.c +++ b/src/unk_0207D3B8.c @@ -13,14 +13,14 @@ #include "unk_0207D3B8.h" typedef struct UnkStruct_0207D3C0_t { - UnkStruct_0207CDEC unk_00[165]; - UnkStruct_0207CDEC unk_294[50]; - UnkStruct_0207CDEC unk_35C[100]; - UnkStruct_0207CDEC unk_4EC[12]; - UnkStruct_0207CDEC unk_51C[40]; - UnkStruct_0207CDEC unk_5BC[64]; - UnkStruct_0207CDEC unk_6BC[15]; - UnkStruct_0207CDEC unk_6F8[30]; + BagItem unk_00[165]; + BagItem unk_294[50]; + BagItem unk_35C[100]; + BagItem unk_4EC[12]; + BagItem unk_51C[40]; + BagItem unk_5BC[64]; + BagItem unk_6BC[15]; + BagItem unk_6F8[30]; u32 unk_770; } UnkStruct_0207D3C0; @@ -44,7 +44,7 @@ typedef struct UnkStruct_0207D99C_t { UnkStruct_0207D99C_sub2 unk_14; } UnkStruct_0207D99C; -static u32 sub_0207D40C(UnkStruct_0207D3C0 * param0, u16 param1, UnkStruct_0207CDEC ** param2, u32 * param3, u32 param4); +static u32 sub_0207D40C(UnkStruct_0207D3C0 * param0, u16 param1, BagItem ** param2, u32 * param3, u32 param4); int sub_0207D3B8 (void) { @@ -81,9 +81,9 @@ void sub_0207D404 (UnkStruct_0207D3C0 * param0, u32 param1) param0->unk_770 = param1; } -static u32 sub_0207D40C (UnkStruct_0207D3C0 * param0, u16 param1, UnkStruct_0207CDEC ** param2, u32 * param3, u32 param4) +static u32 sub_0207D40C (UnkStruct_0207D3C0 * param0, u16 param1, BagItem ** param2, u32 * param3, u32 param4) { - u32 v0 = Item_GetAttribute(param1, 5, param4); + u32 v0 = Item_LoadParam(param1, 5, param4); switch (v0) { case 7: @@ -123,14 +123,14 @@ static u32 sub_0207D40C (UnkStruct_0207D3C0 * param0, u16 param1, UnkStruct_0207 return v0; } -static UnkStruct_0207CDEC * sub_0207D4B4 (UnkStruct_0207CDEC * param0, u32 param1, u16 param2, u16 param3, u16 param4) +static BagItem * sub_0207D4B4 (BagItem * param0, u32 param1, u16 param2, u16 param3, u16 param4) { u32 v0; u32 v1 = 0xffffffff; for (v0 = 0; v0 < param1; v0++) { - if (param0[v0].unk_00 == param2) { - if ((param0[v0].unk_02 + param3) > param4) { + if (param0[v0].item == param2) { + if ((param0[v0].quantity + param3) > param4) { return NULL; } @@ -138,7 +138,7 @@ static UnkStruct_0207CDEC * sub_0207D4B4 (UnkStruct_0207CDEC * param0, u32 param } if (v1 == 0xffffffff) { - if ((param0[v0].unk_00 == 0) && (param0[v0].unk_02 == 0)) { + if ((param0[v0].item == 0) && (param0[v0].quantity == 0)) { v1 = v0; } } @@ -151,9 +151,9 @@ static UnkStruct_0207CDEC * sub_0207D4B4 (UnkStruct_0207CDEC * param0, u32 param return ¶m0[v1]; } -static UnkStruct_0207CDEC * sub_0207D518 (UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 param3) +static BagItem * sub_0207D518 (UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 param3) { - UnkStruct_0207CDEC * v0; + BagItem * v0; u32 v1; u32 v2; @@ -177,14 +177,14 @@ BOOL sub_0207D55C (UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 para BOOL sub_0207D570 (UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 param3) { - UnkStruct_0207CDEC * v0 = sub_0207D518(param0, param1, param2, param3); + BagItem * v0 = sub_0207D518(param0, param1, param2, param3); if (v0 == NULL) { return 0; } - v0->unk_00 = param1; - v0->unk_02 += param2; + v0->item = param1; + v0->quantity += param2; { u32 v1; @@ -200,13 +200,13 @@ BOOL sub_0207D570 (UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 para return 1; } -static UnkStruct_0207CDEC * sub_0207D5B8 (UnkStruct_0207CDEC * param0, u32 param1, u16 param2, u16 param3) +static BagItem * sub_0207D5B8 (BagItem * param0, u32 param1, u16 param2, u16 param3) { u32 v0; for (v0 = 0; v0 < param1; v0++) { - if (param0[v0].unk_00 == param2) { - if (param0[v0].unk_02 >= param3) { + if (param0[v0].item == param2) { + if (param0[v0].quantity >= param3) { return ¶m0[v0]; } else { return NULL; @@ -217,9 +217,9 @@ static UnkStruct_0207CDEC * sub_0207D5B8 (UnkStruct_0207CDEC * param0, u32 param return NULL; } -static UnkStruct_0207CDEC * sub_0207D5E8 (UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 param3) +static BagItem * sub_0207D5E8 (UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 param3) { - UnkStruct_0207CDEC * v0; + BagItem * v0; u32 v1; sub_0207D40C(param0, param1, &v0, &v1, param3); @@ -228,16 +228,16 @@ static UnkStruct_0207CDEC * sub_0207D5E8 (UnkStruct_0207D3C0 * param0, u16 param BOOL sub_0207D60C (UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 param3) { - UnkStruct_0207CDEC * v0 = sub_0207D5E8(param0, param1, param2, param3); + BagItem * v0 = sub_0207D5E8(param0, param1, param2, param3); if (v0 == NULL) { return 0; } - v0->unk_02 -= param2; + v0->quantity -= param2; - if (v0->unk_02 == 0) { - v0->unk_00 = 0; + if (v0->quantity == 0) { + v0->item = 0; } { @@ -250,18 +250,18 @@ BOOL sub_0207D60C (UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 para return 1; } -BOOL sub_0207D658 (UnkStruct_0207CDEC * param0, u32 param1, u16 param2, u16 param3, u32 param4) +BOOL sub_0207D658 (BagItem * param0, u32 param1, u16 param2, u16 param3, u32 param4) { - UnkStruct_0207CDEC * v0 = sub_0207D5B8(param0, param1, param2, param3); + BagItem * v0 = sub_0207D5B8(param0, param1, param2, param3); if (v0 == NULL) { return 0; } - v0->unk_02 -= param3; + v0->quantity -= param3; - if (v0->unk_02 == 0) { - v0->unk_00 = 0; + if (v0->quantity == 0) { + v0->item = 0; } sub_0207D780(param0, param1); @@ -280,7 +280,7 @@ BOOL sub_0207D688 (UnkStruct_0207D3C0 * param0, u16 param1, u16 param2, u32 para BOOL sub_0207D69C (UnkStruct_0207D3C0 * param0, u32 param1) { - UnkStruct_0207CDEC * v0; + BagItem * v0; u32 v1; u32 v2; @@ -322,7 +322,7 @@ BOOL sub_0207D69C (UnkStruct_0207D3C0 * param0, u32 param1) } for (v2 = 0; v2 < v1; v2++) { - if (v0[v2].unk_00 != 0) { + if (v0[v2].item != 0) { return 1; } } @@ -332,29 +332,29 @@ BOOL sub_0207D69C (UnkStruct_0207D3C0 * param0, u32 param1) u16 sub_0207D730 (UnkStruct_0207D3C0 * param0, u16 param1, u32 param2) { - UnkStruct_0207CDEC * v0 = sub_0207D5E8(param0, param1, 1, param2); + BagItem * v0 = sub_0207D5E8(param0, param1, 1, param2); if (v0 == NULL) { return 0; } - return v0->unk_02; + return v0->quantity; } -u16 sub_0207D748 (UnkStruct_0207CDEC * param0, u32 param1, u16 param2, u32 param3) +u16 sub_0207D748 (BagItem * param0, u32 param1, u16 param2, u32 param3) { - UnkStruct_0207CDEC * v0 = sub_0207D5B8(param0, param1, param2, 1); + BagItem * v0 = sub_0207D5B8(param0, param1, param2, 1); if (v0 == NULL) { return 0; } - return v0->unk_02; + return v0->quantity; } -static void sub_0207D75C (UnkStruct_0207CDEC * param0, UnkStruct_0207CDEC * param1) +static void sub_0207D75C (BagItem * param0, BagItem * param1) { - UnkStruct_0207CDEC v0; + BagItem v0; v0 = *param0; @@ -362,26 +362,26 @@ static void sub_0207D75C (UnkStruct_0207CDEC * param0, UnkStruct_0207CDEC * para *param1 = v0; } -void sub_0207D780 (UnkStruct_0207CDEC * param0, const u32 param1) +void sub_0207D780 (BagItem * param0, const u32 param1) { u32 v0, v1; for (v0 = 0; v0 < param1 - 1; v0++) { for (v1 = v0 + 1; v1 < param1; v1++) { - if (param0[v0].unk_02 == 0) { + if (param0[v0].quantity == 0) { sub_0207D75C(¶m0[v0], ¶m0[v1]); } } } } -void sub_0207D7CC (UnkStruct_0207CDEC * param0, const u32 param1) +void sub_0207D7CC (BagItem * param0, const u32 param1) { u32 v0, v1; for (v0 = 0; v0 < param1 - 1; v0++) { for (v1 = v0 + 1; v1 < param1; v1++) { - if ((param0[v0].unk_02 == 0) || ((param0[v1].unk_02 != 0) && (param0[v0].unk_00 > param0[v1].unk_00))) { + if ((param0[v0].quantity == 0) || ((param0[v1].quantity != 0) && (param0[v0].item > param0[v1].item))) { sub_0207D75C(¶m0[v0], ¶m0[v1]); } } @@ -427,9 +427,9 @@ void * sub_0207D824 (UnkStruct_0207D3C0 * param0, const u8 * param1, u32 param2) return v0; } -UnkStruct_0207CDEC * sub_0207D910 (UnkStruct_0207D3C0 * param0, u16 param1, u16 param2) +BagItem * sub_0207D910 (UnkStruct_0207D3C0 * param0, u16 param1, u16 param2) { - UnkStruct_0207CDEC * v0; + BagItem * v0; u16 v1; switch (param1) { diff --git a/src/unk_0207E0B8.c b/src/unk_0207E0B8.c index 34f74a315c..e691510d6e 100644 --- a/src/unk_0207E0B8.c +++ b/src/unk_0207E0B8.c @@ -6,9 +6,8 @@ #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" -#include "struct_decls/struct_itemdata_decl.h" #include "constdata/const_020F1E88.h" @@ -2583,7 +2582,7 @@ static int sub_0208107C (UnkStruct_0207F248 * param0) { ItemData * v0; - v0 = Item_LoadDataOrGFX(param0->unk_5A4->unk_24, 0, 12); + v0 = Item_Load(param0->unk_5A4->unk_24, 0, 12); if ((param0->unk_5A4->unk_24 == 466) && (sub_02077B14(Party_GetPokemonBySlotIndex(param0->unk_5A4->unk_00, param0->unk_B11)) == 1)) { param0->unk_5A4->unk_38 = 1; @@ -2592,13 +2591,13 @@ static int sub_0208107C (UnkStruct_0207F248 * param0) return 31; } - if ((Item_GetAttributeFromStruct(v0, 34) != 0) || (Item_GetAttributeFromStruct(v0, 35) != 0)) { + if ((Item_Get(v0, 34) != 0) || (Item_Get(v0, 35) != 0)) { Heap_FreeToHeap(v0); sub_020866A0(param0, 0); return 6; } - if ((Item_GetAttributeFromStruct(v0, 36) != 0) && (Item_GetAttributeFromStruct(v0, 37) == 0)) { + if ((Item_Get(v0, 36) != 0) && (Item_Get(v0, 37) == 0)) { Heap_FreeToHeap(v0); sub_020866A0(param0, 1); return 6; @@ -2607,7 +2606,7 @@ static int sub_0208107C (UnkStruct_0207F248 * param0) if (sub_0209693C(param0->unk_5A4->unk_00, param0->unk_5A4->unk_24, param0->unk_B11, 0, 12) == 1) { sub_0207D60C(param0->unk_5A4->unk_04, param0->unk_5A4->unk_24, 1, 12); - if (Item_GetAttributeFromStruct(v0, 26) != 0) { + if (Item_Get(v0, 26) != 0) { Pokemon * v1 = Party_GetPokemonBySlotIndex(param0->unk_5A4->unk_00, param0->unk_B11); param0->unk_5A4->unk_38 = sub_02076B94(NULL, v1, 3, param0->unk_5A4->unk_24, ¶m0->unk_5A4->unk_3C); diff --git a/src/unk_020819DC.c b/src/unk_020819DC.c index 9182e83e47..fcc377ed49 100644 --- a/src/unk_020819DC.c +++ b/src/unk_020819DC.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/struct_0201D738.h" diff --git a/src/unk_02084B70.c b/src/unk_02084B70.c index 4bd11bba34..f07743f64d 100644 --- a/src/unk_02084B70.c +++ b/src/unk_02084B70.c @@ -3,9 +3,8 @@ #include "data_021BF67C.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" -#include "struct_decls/struct_itemdata_decl.h" #include "struct_defs/struct_0203CDB0.h" #include "struct_defs/struct_0207F248.h" @@ -56,34 +55,34 @@ static u8 sub_02084B70 (u16 param0) ItemData * v0; s32 v1; - v0 = Item_LoadDataOrGFX(param0, 0, 12); + v0 = Item_Load(param0, 0, 12); - if (Item_GetAttributeFromStruct(v0, 14) != 1) { + if (Item_Get(v0, 14) != 1) { Heap_FreeToHeap(v0); return 28; } - if ((Item_GetAttributeFromStruct(v0, 27) != 0) || (Item_GetAttributeFromStruct(v0, 28) != 0) || (Item_GetAttributeFromStruct(v0, 29) != 0) || (Item_GetAttributeFromStruct(v0, 30) != 0) || (Item_GetAttributeFromStruct(v0, 31) != 0) || (Item_GetAttributeFromStruct(v0, 32) != 0) || (Item_GetAttributeFromStruct(v0, 33) != 0)) { + if ((Item_Get(v0, 27) != 0) || (Item_Get(v0, 28) != 0) || (Item_Get(v0, 29) != 0) || (Item_Get(v0, 30) != 0) || (Item_Get(v0, 31) != 0) || (Item_Get(v0, 32) != 0) || (Item_Get(v0, 33) != 0)) { Heap_FreeToHeap(v0); return 0; } - if (Item_GetAttributeFromStruct(v0, 24) != 0) { + if (Item_Get(v0, 24) != 0) { Heap_FreeToHeap(v0); return 1; } - if (Item_GetAttributeFromStruct(v0, 25) != 0) { + if (Item_Get(v0, 25) != 0) { Heap_FreeToHeap(v0); return 2; } - v1 = Item_GetAttributeFromStruct(v0, 15); - v1 += (Item_GetAttributeFromStruct(v0, 16) << 1); - v1 += (Item_GetAttributeFromStruct(v0, 17) << 2); - v1 += (Item_GetAttributeFromStruct(v0, 18) << 3); - v1 += (Item_GetAttributeFromStruct(v0, 19) << 4); - v1 += (Item_GetAttributeFromStruct(v0, 20) << 5); + v1 = Item_Get(v0, 15); + v1 += (Item_Get(v0, 16) << 1); + v1 += (Item_Get(v0, 17) << 2); + v1 += (Item_Get(v0, 18) << 3); + v1 += (Item_Get(v0, 19) << 4); + v1 += (Item_Get(v0, 20) << 5); switch (v1) { case 0x1: @@ -105,7 +104,7 @@ static u8 sub_02084B70 (u16 param0) Heap_FreeToHeap(v0); return 8; case 0x3f: - if (Item_GetAttributeFromStruct(v0, 38) != 0) { + if (Item_Get(v0, 38) != 0) { Heap_FreeToHeap(v0); return 11; } else { @@ -114,17 +113,17 @@ static u8 sub_02084B70 (u16 param0) } } - if (Item_GetAttributeFromStruct(v0, 21) != 0) { + if (Item_Get(v0, 21) != 0) { Heap_FreeToHeap(v0); return 10; } - if (Item_GetAttributeFromStruct(v0, 38) != 0) { + if (Item_Get(v0, 38) != 0) { Heap_FreeToHeap(v0); return 11; } - v1 = Item_GetAttributeFromStruct(v0, 48); + v1 = Item_Get(v0, 48); if (v1 > 0) { Heap_FreeToHeap(v0); @@ -136,7 +135,7 @@ static u8 sub_02084B70 (u16 param0) return 18; } - v1 = Item_GetAttributeFromStruct(v0, 49); + v1 = Item_Get(v0, 49); if (v1 > 0) { Heap_FreeToHeap(v0); @@ -148,7 +147,7 @@ static u8 sub_02084B70 (u16 param0) return 19; } - v1 = Item_GetAttributeFromStruct(v0, 50); + v1 = Item_Get(v0, 50); if (v1 > 0) { Heap_FreeToHeap(v0); @@ -160,7 +159,7 @@ static u8 sub_02084B70 (u16 param0) return 20; } - v1 = Item_GetAttributeFromStruct(v0, 51); + v1 = Item_Get(v0, 51); if (v1 > 0) { Heap_FreeToHeap(v0); @@ -172,7 +171,7 @@ static u8 sub_02084B70 (u16 param0) return 21; } - v1 = Item_GetAttributeFromStruct(v0, 52); + v1 = Item_Get(v0, 52); if (v1 > 0) { Heap_FreeToHeap(v0); @@ -184,7 +183,7 @@ static u8 sub_02084B70 (u16 param0) return 22; } - v1 = Item_GetAttributeFromStruct(v0, 53); + v1 = Item_Get(v0, 53); if (v1 > 0) { Heap_FreeToHeap(v0); @@ -196,22 +195,22 @@ static u8 sub_02084B70 (u16 param0) return 23; } - if (Item_GetAttributeFromStruct(v0, 26) != 0) { + if (Item_Get(v0, 26) != 0) { Heap_FreeToHeap(v0); return 24; } - if (Item_GetAttributeFromStruct(v0, 34) != 0) { + if (Item_Get(v0, 34) != 0) { Heap_FreeToHeap(v0); return 25; } - if (Item_GetAttributeFromStruct(v0, 35) != 0) { + if (Item_Get(v0, 35) != 0) { Heap_FreeToHeap(v0); return 26; } - if ((Item_GetAttributeFromStruct(v0, 36) != 0) || (Item_GetAttributeFromStruct(v0, 37) != 0)) { + if ((Item_Get(v0, 36) != 0) || (Item_Get(v0, 37) != 0)) { Heap_FreeToHeap(v0); return 27; } @@ -544,7 +543,7 @@ static int sub_02085704 (void * param0) BOOL sub_020857A8 (u16 param0) { - if (Item_GetAttribute(param0, 24, 12) != 0) { + if (Item_LoadParam(param0, 24, 12) != 0) { return 1; } @@ -944,7 +943,7 @@ u8 sub_02086104 (UnkStruct_0207F248 * param0, Pokemon * param1) } } - if (sub_02077FB4(param1, Item_GetTMOrHMNumberFromID(param0->unk_5A4->unk_24)) == 0) { + if (sub_02077FB4(param1, Item_TMHMNumber(param0->unk_5A4->unk_24)) == 0) { return 0xff; } @@ -1147,7 +1146,7 @@ static void sub_02086590 (UnkStruct_0207F248 * param0, Pokemon * param1, u32 par sub_02074B30(param1, 58 + param2, &v0); if (param0->unk_5A4->unk_24 != 0) { - if (Item_IsMoveHM(param0->unk_5A4->unk_26) == 0) { + if (Item_IsHMMove(param0->unk_5A4->unk_26) == 0) { sub_0207D60C(param0->unk_5A4->unk_04, param0->unk_5A4->unk_24, 1, 12); } diff --git a/src/unk_0208694C.c b/src/unk_0208694C.c index 0ebe80af13..dc6b859210 100644 --- a/src/unk_0208694C.c +++ b/src/unk_0208694C.c @@ -13,7 +13,7 @@ #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020218BC_decl.h" #include "struct_decls/struct_02022550_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_decls/struct_02087A10_decl.h" diff --git a/src/unk_02089604.c b/src/unk_02089604.c index b0b6f6a9f1..5e3324fb13 100644 --- a/src/unk_02089604.c +++ b/src/unk_02089604.c @@ -3,7 +3,7 @@ #include "data_021BF67C.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_02089688.h" diff --git a/src/unk_0208A3F4.c b/src/unk_0208A3F4.c index 51de0e3586..3f18ac28f1 100644 --- a/src/unk_0208A3F4.c +++ b/src/unk_0208A3F4.c @@ -10,7 +10,7 @@ #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02012CE0_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_020127E8.h" diff --git a/src/unk_0208C324.c b/src/unk_0208C324.c index 62e8b308ba..4adbe53925 100644 --- a/src/unk_0208C324.c +++ b/src/unk_0208C324.c @@ -771,7 +771,7 @@ static int sub_0208CD44 (UnkStruct_0208D7BC * param0) sub_02005748(1501); if (param0->unk_6A5_0 != 4) { - if ((Item_IsMoveHM(param0->unk_250.unk_34[param0->unk_6A5_0]) == 1) && (param0->unk_24C->unk_18 != 0)) { + if ((Item_IsHMMove(param0->unk_250.unk_34[param0->unk_6A5_0]) == 1) && (param0->unk_24C->unk_18 != 0)) { sub_0200D3EC(param0->unk_41C[18], 0); sub_0208E46C(param0); sub_020914F8(param0); diff --git a/src/unk_0208FCF8.c b/src/unk_0208FCF8.c index 37bb7b445f..d06b9d70b6 100644 --- a/src/unk_0208FCF8.c +++ b/src/unk_0208FCF8.c @@ -2,7 +2,7 @@ #include #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/struct_0205AA50.h" diff --git a/src/unk_02092494.c b/src/unk_02092494.c index fe2c5dae0d..4f92d537c0 100644 --- a/src/unk_02092494.c +++ b/src/unk_02092494.c @@ -1,7 +1,7 @@ #include #include -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02025E6C_decl.h" #include "struct_defs/pokemon.h" diff --git a/src/unk_02094EDC.c b/src/unk_02094EDC.c index 97d23a231e..fa0848e2e4 100644 --- a/src/unk_02094EDC.c +++ b/src/unk_02094EDC.c @@ -4,7 +4,7 @@ #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_02007C7C_decl.h" #include "struct_decls/struct_0200B144_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/pokemon.h" #include "struct_defs/struct_02008A90.h" diff --git a/src/unk_02096420.c b/src/unk_02096420.c index 989f8b3d87..07d795128f 100644 --- a/src/unk_02096420.c +++ b/src/unk_02096420.c @@ -3,7 +3,6 @@ #include "struct_defs/pokemon.h" #include "struct_decls/struct_party_decl.h" -#include "struct_decls/struct_itemdata_decl.h" #include "heap.h" #include "unk_02073C2C.h" @@ -25,44 +24,44 @@ u8 sub_02096420 (Pokemon * param0, u16 param1, u16 param2, u32 param3) ItemData * v0; s32 v1[8]; - v0 = Item_LoadDataOrGFX(param1, 0, param3); + v0 = Item_Load(param1, 0, param3); - if (Item_GetAttributeFromStruct(v0, 14) != 1) { + if (Item_Get(v0, 14) != 1) { Heap_FreeToHeap(v0); return 0; } v1[0] = GetMonData(param0, MON_DATA_160, NULL); - if (Item_GetAttributeFromStruct(v0, 15) != 0) { + if (Item_Get(v0, 15) != 0) { if ((v1[0] & 0x7) != 0) { Heap_FreeToHeap(v0); return 1; } } - if (Item_GetAttributeFromStruct(v0, 16) != 0) { + if (Item_Get(v0, 16) != 0) { if ((v1[0] & (0x8 | 0x80)) != 0) { Heap_FreeToHeap(v0); return 1; } } - if (Item_GetAttributeFromStruct(v0, 17) != 0) { + if (Item_Get(v0, 17) != 0) { if ((v1[0] & 0x10) != 0) { Heap_FreeToHeap(v0); return 1; } } - if (Item_GetAttributeFromStruct(v0, 18) != 0) { + if (Item_Get(v0, 18) != 0) { if ((v1[0] & 0x20) != 0) { Heap_FreeToHeap(v0); return 1; } } - if (Item_GetAttributeFromStruct(v0, 19) != 0) { + if (Item_Get(v0, 19) != 0) { if ((v1[0] & 0x40) != 0) { Heap_FreeToHeap(v0); return 1; @@ -71,47 +70,47 @@ u8 sub_02096420 (Pokemon * param0, u16 param1, u16 param2, u32 param3) v1[0] = GetMonData(param0, MON_DATA_163, NULL); - if (((Item_GetAttributeFromStruct(v0, 23) != 0) || (Item_GetAttributeFromStruct(v0, 24) != 0)) && (Item_GetAttributeFromStruct(v0, 25) == 0)) { + if (((Item_Get(v0, 23) != 0) || (Item_Get(v0, 24) != 0)) && (Item_Get(v0, 25) == 0)) { if (v1[0] == 0) { Heap_FreeToHeap(v0); return 1; } - } else if (Item_GetAttributeFromStruct(v0, 38) != 0) { + } else if (Item_Get(v0, 38) != 0) { if ((v1[0] != 0) && (v1[0] < GetMonData(param0, MON_DATA_164, NULL))) { Heap_FreeToHeap(v0); return 1; } } - if (Item_GetAttributeFromStruct(v0, 25) != 0) { + if (Item_Get(v0, 25) != 0) { if (GetMonData(param0, MON_DATA_161, NULL) < 100) { Heap_FreeToHeap(v0); return 1; } } - if (Item_GetAttributeFromStruct(v0, 26) != 0) { + if (Item_Get(v0, 26) != 0) { if (sub_02076B94(NULL, param0, 3, param1, NULL) != 0) { Heap_FreeToHeap(v0); return 1; } } - if ((Item_GetAttributeFromStruct(v0, 34) != 0) || (Item_GetAttributeFromStruct(v0, 35) != 0)) { + if ((Item_Get(v0, 34) != 0) || (Item_Get(v0, 35) != 0)) { if ((GetMonData(param0, MON_DATA_62 + param2, NULL) < 3) && (MoveTable_CalcMaxPP(GetMonData(param0, MON_DATA_MOVE1 + param2, NULL), 0) >= 5)) { Heap_FreeToHeap(v0); return 1; } } - if (Item_GetAttributeFromStruct(v0, 36) != 0) { + if (Item_Get(v0, 36) != 0) { if (sub_02096F34(param0, param2) == 1) { Heap_FreeToHeap(v0); return 1; } } - if (Item_GetAttributeFromStruct(v0, 37) != 0) { + if (Item_Get(v0, 37) != 0) { for (v1[0] = 0; v1[0] < 4; v1[0]++) { if (sub_02096F34(param0, v1[0]) == 1) { Heap_FreeToHeap(v0); @@ -128,8 +127,8 @@ u8 sub_02096420 (Pokemon * param0, u16 param1, u16 param2, u32 param3) v1[5] = GetMonData(param0, MON_DATA_SPDEF_EV, NULL); if (GetMonData(param0, MON_DATA_SPECIES, NULL) != 292) { - if (Item_GetAttributeFromStruct(v0, 39) != 0) { - v1[6] = Item_GetAttributeFromStruct(v0, 48); + if (Item_Get(v0, 39) != 0) { + v1[6] = Item_Get(v0, 48); if (v1[6] > 0) { if ((v1[0] < 100) && ((v1[0] + v1[1] + v1[2] + v1[3] + v1[4] + v1[5]) < 510)) { @@ -150,8 +149,8 @@ u8 sub_02096420 (Pokemon * param0, u16 param1, u16 param2, u32 param3) } } - if (Item_GetAttributeFromStruct(v0, 40) != 0) { - v1[6] = Item_GetAttributeFromStruct(v0, 49); + if (Item_Get(v0, 40) != 0) { + v1[6] = Item_Get(v0, 49); if (v1[6] > 0) { if ((v1[1] < 100) && ((v1[0] + v1[1] + v1[2] + v1[3] + v1[4] + v1[5]) < 510)) { @@ -171,8 +170,8 @@ u8 sub_02096420 (Pokemon * param0, u16 param1, u16 param2, u32 param3) } } - if (Item_GetAttributeFromStruct(v0, 41) != 0) { - v1[6] = Item_GetAttributeFromStruct(v0, 50); + if (Item_Get(v0, 41) != 0) { + v1[6] = Item_Get(v0, 50); if (v1[6] > 0) { if ((v1[2] < 100) && ((v1[0] + v1[1] + v1[2] + v1[3] + v1[4] + v1[5]) < 510)) { @@ -192,8 +191,8 @@ u8 sub_02096420 (Pokemon * param0, u16 param1, u16 param2, u32 param3) } } - if (Item_GetAttributeFromStruct(v0, 42) != 0) { - v1[6] = Item_GetAttributeFromStruct(v0, 51); + if (Item_Get(v0, 42) != 0) { + v1[6] = Item_Get(v0, 51); if (v1[6] > 0) { if ((v1[3] < 100) && ((v1[0] + v1[1] + v1[2] + v1[3] + v1[4] + v1[5]) < 510)) { @@ -213,8 +212,8 @@ u8 sub_02096420 (Pokemon * param0, u16 param1, u16 param2, u32 param3) } } - if (Item_GetAttributeFromStruct(v0, 43) != 0) { - v1[6] = Item_GetAttributeFromStruct(v0, 52); + if (Item_Get(v0, 43) != 0) { + v1[6] = Item_Get(v0, 52); if (v1[6] > 0) { if ((v1[4] < 100) && ((v1[0] + v1[1] + v1[2] + v1[3] + v1[4] + v1[5]) < 510)) { @@ -234,8 +233,8 @@ u8 sub_02096420 (Pokemon * param0, u16 param1, u16 param2, u32 param3) } } - if (Item_GetAttributeFromStruct(v0, 44) != 0) { - v1[6] = Item_GetAttributeFromStruct(v0, 53); + if (Item_Get(v0, 44) != 0) { + v1[6] = Item_Get(v0, 53); if (v1[6] > 0) { if ((v1[5] < 100) && ((v1[0] + v1[1] + v1[2] + v1[3] + v1[4] + v1[5]) < 510)) { @@ -273,9 +272,9 @@ u8 sub_02096954 (Pokemon * param0, u16 param1, u16 param2, u16 param3, u32 param u8 v2; u8 v3; - v0 = Item_LoadDataOrGFX(param1, 0, param4); + v0 = Item_Load(param1, 0, param4); - if (Item_GetAttributeFromStruct(v0, 14) != 1) { + if (Item_Get(v0, 14) != 1) { Heap_FreeToHeap(v0); return 0; } @@ -286,27 +285,27 @@ u8 sub_02096954 (Pokemon * param0, u16 param1, u16 param2, u16 param3, u32 param v1[0] = GetMonData(param0, MON_DATA_160, NULL); v1[1] = v1[0]; - if (Item_GetAttributeFromStruct(v0, 15) != 0) { + if (Item_Get(v0, 15) != 0) { v1[1] &= (0x7 ^ 0xffffffff); v3 = 1; } - if (Item_GetAttributeFromStruct(v0, 16) != 0) { + if (Item_Get(v0, 16) != 0) { v1[1] &= ((0x8 | 0x80 | 0xf00) ^ 0xffffffff); v3 = 1; } - if (Item_GetAttributeFromStruct(v0, 17) != 0) { + if (Item_Get(v0, 17) != 0) { v1[1] &= (0x10 ^ 0xffffffff); v3 = 1; } - if (Item_GetAttributeFromStruct(v0, 18) != 0) { + if (Item_Get(v0, 18) != 0) { v1[1] &= (0x20 ^ 0xffffffff); v3 = 1; } - if (Item_GetAttributeFromStruct(v0, 19) != 0) { + if (Item_Get(v0, 19) != 0) { v1[1] &= (0x40 ^ 0xffffffff); v3 = 1; } @@ -319,16 +318,16 @@ u8 sub_02096954 (Pokemon * param0, u16 param1, u16 param2, u16 param3, u32 param v1[0] = GetMonData(param0, MON_DATA_163, NULL); v1[1] = GetMonData(param0, MON_DATA_164, NULL); - if (((Item_GetAttributeFromStruct(v0, 23) != 0) || (Item_GetAttributeFromStruct(v0, 24) != 0)) && (Item_GetAttributeFromStruct(v0, 25) != 0)) { + if (((Item_Get(v0, 23) != 0) || (Item_Get(v0, 24) != 0)) && (Item_Get(v0, 25) != 0)) { if (v1[0] == 0) { - sub_020970AC(param0, v1[0], v1[1], Item_GetAttributeFromStruct(v0, 54)); + sub_020970AC(param0, v1[0], v1[1], Item_Get(v0, 54)); v2 = 1; } v3 = 1; - } else if (Item_GetAttributeFromStruct(v0, 38) != 0) { + } else if (Item_Get(v0, 38) != 0) { if (v1[0] < v1[1]) { - sub_020970AC(param0, v1[0], v1[1], Item_GetAttributeFromStruct(v0, 54)); + sub_020970AC(param0, v1[0], v1[1], Item_Get(v0, 54)); v2 = 1; } @@ -337,7 +336,7 @@ u8 sub_02096954 (Pokemon * param0, u16 param1, u16 param2, u16 param3, u32 param v1[2] = GetMonData(param0, MON_DATA_161, NULL); - if (Item_GetAttributeFromStruct(v0, 25) != 0) { + if (Item_Get(v0, 25) != 0) { if (v1[2] < 100) { sub_0207536C(param0, MON_DATA_EXP, sub_02075A70(param0)); sub_0207418C(param0); @@ -353,17 +352,17 @@ u8 sub_02096954 (Pokemon * param0, u16 param1, u16 param2, u16 param3, u32 param v3 = 1; } - if (Item_GetAttributeFromStruct(v0, 26) != 0) { + if (Item_Get(v0, 26) != 0) { v3 = 1; } - if (Item_GetAttributeFromStruct(v0, 34) != 0) { + if (Item_Get(v0, 34) != 0) { if (sub_02097004(param0, param2, 1) == 1) { v2 = 1; } v3 = 1; - } else if (Item_GetAttributeFromStruct(v0, 35) != 0) { + } else if (Item_Get(v0, 35) != 0) { if (sub_02097004(param0, param2, 3) == 1) { v2 = 1; } @@ -371,15 +370,15 @@ u8 sub_02096954 (Pokemon * param0, u16 param1, u16 param2, u16 param3, u32 param v3 = 1; } - if (Item_GetAttributeFromStruct(v0, 36) != 0) { - if (sub_02096F84(param0, param2, Item_GetAttributeFromStruct(v0, 55)) == 1) { + if (Item_Get(v0, 36) != 0) { + if (sub_02096F84(param0, param2, Item_Get(v0, 55)) == 1) { v2 = 1; } v3 = 1; - } else if (Item_GetAttributeFromStruct(v0, 37) != 0) { + } else if (Item_Get(v0, 37) != 0) { for (v1[0] = 0; v1[0] < 4; v1[0]++) { - if (sub_02096F84(param0, v1[0], Item_GetAttributeFromStruct(v0, 55)) == 1) { + if (sub_02096F84(param0, v1[0], Item_Get(v0, 55)) == 1) { v2 = 1; } } @@ -395,8 +394,8 @@ u8 sub_02096954 (Pokemon * param0, u16 param1, u16 param2, u16 param3, u32 param v1[5] = GetMonData(param0, MON_DATA_SPDEF_EV, NULL); if (GetMonData(param0, MON_DATA_SPECIES, NULL) != 292) { - if (Item_GetAttributeFromStruct(v0, 39) != 0) { - v1[7] = Item_GetAttributeFromStruct(v0, 48); + if (Item_Get(v0, 39) != 0) { + v1[7] = Item_Get(v0, 48); v1[6] = sub_020970EC(v1[0], (v1[1] + v1[2] + v1[3] + v1[4] + v1[5]), v1[7]); if (v1[6] != -1) { @@ -412,8 +411,8 @@ u8 sub_02096954 (Pokemon * param0, u16 param1, u16 param2, u16 param3, u32 param } } - if (Item_GetAttributeFromStruct(v0, 40) != 0) { - v1[7] = Item_GetAttributeFromStruct(v0, 49); + if (Item_Get(v0, 40) != 0) { + v1[7] = Item_Get(v0, 49); v1[6] = sub_020970EC(v1[1], (v1[0] + v1[2] + v1[3] + v1[4] + v1[5]), v1[7]); if (v1[6] != -1) { @@ -428,8 +427,8 @@ u8 sub_02096954 (Pokemon * param0, u16 param1, u16 param2, u16 param3, u32 param } } - if (Item_GetAttributeFromStruct(v0, 41) != 0) { - v1[7] = Item_GetAttributeFromStruct(v0, 50); + if (Item_Get(v0, 41) != 0) { + v1[7] = Item_Get(v0, 50); v1[6] = sub_020970EC(v1[2], (v1[0] + v1[1] + v1[3] + v1[4] + v1[5]), v1[7]); if (v1[6] != -1) { @@ -444,8 +443,8 @@ u8 sub_02096954 (Pokemon * param0, u16 param1, u16 param2, u16 param3, u32 param } } - if (Item_GetAttributeFromStruct(v0, 42) != 0) { - v1[7] = Item_GetAttributeFromStruct(v0, 51); + if (Item_Get(v0, 42) != 0) { + v1[7] = Item_Get(v0, 51); v1[6] = sub_020970EC(v1[3], (v1[0] + v1[1] + v1[2] + v1[4] + v1[5]), v1[7]); if (v1[6] != -1) { @@ -460,8 +459,8 @@ u8 sub_02096954 (Pokemon * param0, u16 param1, u16 param2, u16 param3, u32 param } } - if (Item_GetAttributeFromStruct(v0, 43) != 0) { - v1[7] = Item_GetAttributeFromStruct(v0, 52); + if (Item_Get(v0, 43) != 0) { + v1[7] = Item_Get(v0, 52); v1[6] = sub_020970EC(v1[4], (v1[0] + v1[1] + v1[2] + v1[3] + v1[5]), v1[7]); if (v1[6] != -1) { @@ -476,8 +475,8 @@ u8 sub_02096954 (Pokemon * param0, u16 param1, u16 param2, u16 param3, u32 param } } - if (Item_GetAttributeFromStruct(v0, 44) != 0) { - v1[7] = Item_GetAttributeFromStruct(v0, 53); + if (Item_Get(v0, 44) != 0) { + v1[7] = Item_Get(v0, 53); v1[6] = sub_020970EC(v1[5], (v1[0] + v1[1] + v1[2] + v1[3] + v1[4]), v1[7]); if (v1[6] != -1) { @@ -500,22 +499,22 @@ u8 sub_02096954 (Pokemon * param0, u16 param1, u16 param2, u16 param3, u32 param v1[0] = GetMonData(param0, MON_DATA_FRIENDSHIP, NULL); if (v1[0] < 100) { - if (Item_GetAttributeFromStruct(v0, 45) != 0) { - if (sub_020971D0(param0, v1[0], Item_GetAttributeFromStruct(v0, 56), param3, param4) == 0) { + if (Item_Get(v0, 45) != 0) { + if (sub_020971D0(param0, v1[0], Item_Get(v0, 56), param3, param4) == 0) { Heap_FreeToHeap(v0); return v2; } } } else if ((v1[0] >= 100) && (v1[0] < 200)) { - if (Item_GetAttributeFromStruct(v0, 46) != 0) { - if (sub_020971D0(param0, v1[0], Item_GetAttributeFromStruct(v0, 57), param3, param4) == 0) { + if (Item_Get(v0, 46) != 0) { + if (sub_020971D0(param0, v1[0], Item_Get(v0, 57), param3, param4) == 0) { Heap_FreeToHeap(v0); return v2; } } } else if ((v1[0] >= 200) && (v1[0] <= 255)) { - if (Item_GetAttributeFromStruct(v0, 47) != 0) { - if (sub_020971D0(param0, v1[0], Item_GetAttributeFromStruct(v0, 58), param3, param4) == 0) { + if (Item_Get(v0, 47) != 0) { + if (sub_020971D0(param0, v1[0], Item_Get(v0, 58), param3, param4) == 0) { Heap_FreeToHeap(v0); return v2; } @@ -686,24 +685,24 @@ static u8 sub_02097144 (Pokemon * param0, ItemData * param1) } if (v0 < 100) { - if (Item_GetAttributeFromStruct(param1, 45) != 0) { - if (Item_GetAttributeFromStruct(param1, 56) > 0) { + if (Item_Get(param1, 45) != 0) { + if (Item_Get(param1, 56) > 0) { return 1; } } return 0; } else if ((v0 >= 100) && (v0 < 200)) { - if (Item_GetAttributeFromStruct(param1, 46) != 0) { - if (Item_GetAttributeFromStruct(param1, 57) > 0) { + if (Item_Get(param1, 46) != 0) { + if (Item_Get(param1, 57) > 0) { return 1; } } return 0; } else if ((v0 >= 200) && (v0 < 255)) { - if (Item_GetAttributeFromStruct(param1, 47) != 0) { - if (Item_GetAttributeFromStruct(param1, 58) > 0) { + if (Item_Get(param1, 47) != 0) { + if (Item_Get(param1, 58) > 0) { return 1; } } @@ -725,7 +724,7 @@ static u8 sub_020971D0 (Pokemon * param0, s32 param1, s32 param2, u16 param3, u3 } if (param2 > 0) { - if (Item_GetAttribute(GetMonData(param0, MON_DATA_HELD_ITEM, NULL), 1, param4) == 53) { + if (Item_LoadParam(GetMonData(param0, MON_DATA_HELD_ITEM, NULL), 1, param4) == 53) { param2 = param2 * 150 / 100; } diff --git a/src/unk_02097624.c b/src/unk_02097624.c index 2e423b8ace..69e9707952 100644 --- a/src/unk_02097624.c +++ b/src/unk_02097624.c @@ -208,7 +208,7 @@ int sub_020977E4 (UnkStruct_02028430 * param0, u16 param1, Pokemon * param2, int return 0xFFFFFFFF; } - v0 = sub_0207D310(sub_02028314(v1)); + v0 = Item_ForMailNumber(sub_02028314(v1)); sub_02074B30(param2, 170, v1); sub_02074B30(param2, 6, &v0); diff --git a/src/unk_020998EC.c b/src/unk_020998EC.c index bb12016429..265e30cb73 100644 --- a/src/unk_020998EC.c +++ b/src/unk_020998EC.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_02014D38_decl.h" #include "struct_decls/struct_02014EC4_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_02026324_decl.h" #include "struct_decls/struct_0209747C_decl.h" #include "struct_decls/struct_020998EC_decl.h" diff --git a/src/unk_02099DFC.c b/src/unk_02099DFC.c index f4f47dd8e9..cd67528b0e 100644 --- a/src/unk_02099DFC.c +++ b/src/unk_02099DFC.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_021C0794_decl.h" #include "struct_defs/struct_0203CC84.h" diff --git a/src/unk_0209A2C4.c b/src/unk_0209A2C4.c index a7305a0f78..f7510aec08 100644 --- a/src/unk_0209A2C4.c +++ b/src/unk_0209A2C4.c @@ -7,7 +7,7 @@ #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_021C0794_decl.h" #include "struct_defs/struct_0203CC84.h" diff --git a/src/unk_0209A74C.c b/src/unk_0209A74C.c index b08a68462d..acf26ca65e 100644 --- a/src/unk_0209A74C.c +++ b/src/unk_0209A74C.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/unk_0209AA74.c b/src/unk_0209AA74.c index 66dc2f4a1d..408c717cc8 100644 --- a/src/unk_0209AA74.c +++ b/src/unk_0209AA74.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_02018340_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_defs/struct_0205AA50.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/unk_0209ACF4.c b/src/unk_0209ACF4.c index ff8e13ab47..add4e95ec4 100644 --- a/src/unk_0209ACF4.c +++ b/src/unk_0209ACF4.c @@ -6,7 +6,7 @@ #include "struct_decls/struct_0200B144_decl.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_020149F0_decl.h" -#include "struct_decls/struct_02023790_decl.h" +#include "strbuf.h" #include "struct_decls/struct_020508D4_decl.h" #include "struct_decls/struct_0209747C_decl.h"