From 92858a8106fa84180b0ddc5958aaf41a736f392b Mon Sep 17 00:00:00 2001 From: lhearachel Date: Mon, 4 Sep 2023 11:14:27 -0700 Subject: [PATCH] Rename Item_ID -> Item_FileID --- include/item.h | 2 +- src/item.c | 4 ++-- src/overlay007/ov7_0224CD28.c | 4 ++-- src/overlay013/ov13_02227BDC.c | 8 ++++---- src/overlay016/ov16_0225177C.c | 2 +- src/overlay019/ov19_021DB8E4.c | 4 ++-- src/overlay019/ov19_021DE3E8.c | 10 +++++----- src/overlay084/ov84_022403F4.c | 8 ++++---- src/overlay097/ov97_02237694.c | 2 +- src/overlay107/ov107_02249604.c | 8 ++++---- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/item.h b/include/item.h index 3466b01aab..24c5a9fbb2 100644 --- a/include/item.h +++ b/include/item.h @@ -165,7 +165,7 @@ void Item_MoveInPocket(void *pocket, u16 srcSlot, u16 dstSlot); * @param type The type of ID to get. * @return The item's ID of the specified type. */ -u16 Item_ID(u16 item, enum ItemFileType type); +u16 Item_FileID(u16 item, enum ItemFileType type); /** * @brief Get the ID of an item which matches the given GBA-era item ID. diff --git a/src/item.c b/src/item.c index 19ca154122..d922af68ff 100644 --- a/src/item.c +++ b/src/item.c @@ -707,7 +707,7 @@ void Item_MoveInPocket(void *pocket, u16 srcSlot, u16 dstSlot) items[dstSlot] = item; } -u16 Item_ID(u16 item, enum ItemFileType type) +u16 Item_FileID(u16 item, enum ItemFileType type) { switch (type) { case ITEM_FILE_TYPE_DATA: @@ -1052,7 +1052,7 @@ u8 Item_IsHerbalMedicine(u16 item) void* ItemTable_Load(int heapID) { - int maxItem = Item_ID(NUM_ITEMS, ITEM_FILE_TYPE_DATA); + 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); } diff --git a/src/overlay007/ov7_0224CD28.c b/src/overlay007/ov7_0224CD28.c index dd855aadfe..c06a859a3e 100644 --- a/src/overlay007/ov7_0224CD28.c +++ b/src/overlay007/ov7_0224CD28.c @@ -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, Item_ID(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, Item_ID(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/overlay013/ov13_02227BDC.c b/src/overlay013/ov13_02227BDC.c index 224a38443e..f6b0febd17 100644 --- a/src/overlay013/ov13_02227BDC.c +++ b/src/overlay013/ov13_02227BDC.c @@ -97,8 +97,8 @@ 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, Item_ID(1, 1), 0, NNS_G2D_VRAM_TYPE_2DSUB, 46263 + v1); - sub_0200CDC4(param0->unk_08, 3, v0, param0->unk_30C, v2, Item_ID(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_IconNCERFile(), 0, 46263); @@ -109,12 +109,12 @@ static void ov13_02227C54 (UnkStruct_ov13_02227244 * param0) 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, Item_ID(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, Item_ID(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_0225177C.c b/src/overlay016/ov16_0225177C.c index 9f64a4d6c7..f064996736 100644 --- a/src/overlay016/ov16_0225177C.c +++ b/src/overlay016/ov16_0225177C.c @@ -6961,7 +6961,7 @@ s32 ov16_0225B0FC (BattleContext * param0, u16 param1, u16 param2) ItemData * v0; u16 v1; - v1 = Item_ID(param1, 0); + v1 = Item_FileID(param1, 0); v0 = ItemTable_Index(param0->aiContext.itemTable, v1); return Item_Get(v0, param2); diff --git a/src/overlay019/ov19_021DB8E4.c b/src/overlay019/ov19_021DB8E4.c index 08bcb21520..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, Item_ID(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, Item_ID(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_021DE3E8.c b/src/overlay019/ov19_021DE3E8.c index 542e6c6ad7..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, Item_ID(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, Item_ID(v0, 1), 0, Unk_ov19_021E04CC[v3].unk_00, 0, 0, 10); - sub_02006E84(16, Item_ID(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, Item_ID(param2, 1), 0, Unk_ov19_021E04CC[param1].unk_00, 0, 0, 10); - sub_02006E84(16, Item_ID(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/overlay084/ov84_022403F4.c b/src/overlay084/ov84_022403F4.c index aafb71823a..a5608d0f97 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, Item_ID(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, Item_ID(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); @@ -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, Item_ID(param1, 1), 0, 49407); - sub_0200D97C(param0->unk_D8, param0->unk_DC, 16, Item_ID(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) diff --git a/src/overlay097/ov97_02237694.c b/src/overlay097/ov97_02237694.c index 9b20613d11..12671e4cf1 100644 --- a/src/overlay097/ov97_02237694.c +++ b/src/overlay097/ov97_02237694.c @@ -658,7 +658,7 @@ static void ov97_022380C8 (UnkStruct_ov97_0223F550 * param0, int param1, UnkStru break; } - ov97_02237B0C(16, Item_ID(v0, 1), Item_ID(v0, 2), Item_IconNCERFile(), Item_IconNANRFile(), 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/overlay107/ov107_02249604.c b/src/overlay107/ov107_02249604.c index e66a16b5b2..e717bb005e 100644 --- a/src/overlay107/ov107_02249604.c +++ b/src/overlay107/ov107_02249604.c @@ -68,8 +68,8 @@ 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, Item_ID(0, 1), 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 100); - param0->unk_1A0[1][1] = sub_020098B8(param0->unk_190[1], 16, Item_ID(0, 2), 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 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); @@ -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, Item_ID(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, Item_ID(param1, 2), 0, 100); + sub_020099D4(param0->unk_190[1], v0, 16, Item_FileID(param1, 2), 0, 100); sub_0200A6B8(v0); return;