summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2020-06-22 08:56:04 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2020-06-22 08:56:04 -0400
commitb15a8c8e7469cc73be299a78a4e114e7f06a90fd (patch)
tree0e8cb5f2de722723d18eab48224491f9a6651452
parent1af603cdb91928dcdc3a703f4c66f78a3ac2bf93 (diff)
Name some fields in itemdata struct
-rw-r--r--arm9/src/itemtool.c10
-rw-r--r--include/constants/items.h9
-rw-r--r--include/itemtool.h12
3 files changed, 20 insertions, 11 deletions
diff --git a/arm9/src/itemtool.c b/arm9/src/itemtool.c
index 2c389512..a8f45903 100644
--- a/arm9/src/itemtool.c
+++ b/arm9/src/itemtool.c
@@ -788,17 +788,17 @@ u32 GetItemAttr_PreloadedItemData(struct ItemData * itemData, u32 attr)
switch (attr)
{
case 0:
- return itemData->unk0;
+ return itemData->price;
case 1:
- return itemData->unk2;
+ return itemData->holdEffect;
case 2:
- return itemData->unk3;
+ return itemData->holdEffectParam;
case 3:
return itemData->unk8_5;
case 4:
return itemData->unk8_6;
case 5:
- return itemData->unk8_7;
+ return itemData->pocket;
case 6:
return itemData->unkA;
case 7:
@@ -814,7 +814,7 @@ u32 GetItemAttr_PreloadedItemData(struct ItemData * itemData, u32 attr)
case 12:
return itemData->unk8_0;
case 13:
- return itemData->unk8_11;
+ return itemData->unk8_B;
case 14:
return itemData->unkC;
default:
diff --git a/include/constants/items.h b/include/constants/items.h
index 3320ce25..76295014 100644
--- a/include/constants/items.h
+++ b/include/constants/items.h
@@ -1,6 +1,15 @@
#ifndef POKEDIAMOND_CONSTANTS_ITEMS_H
#define POKEDIAMOND_CONSTANTS_ITEMS_H
+#define POCKET_ITEMS 0
+#define POCKET_MEDICINE 1
+#define POCKET_BALLS 2
+#define POCKET_TMHMS 3
+#define POCKET_BERRIES 4
+#define POCKET_MAIL 5
+#define POCKET_BATTLE_ITEMS 6
+#define POCKET_KEY_ITEMS 7
+
#define ITEM_NONE 0
#define ITEM_MASTER_BALL 1
#define ITEM_ULTRA_BALL 2
diff --git a/include/itemtool.h b/include/itemtool.h
index 97077744..6b547e83 100644
--- a/include/itemtool.h
+++ b/include/itemtool.h
@@ -79,9 +79,9 @@ struct ItemDataSub
struct ItemData
{
- u16 unk0;
- u8 unk2;
- u8 unk3;
+ u16 price;
+ u8 holdEffect;
+ u8 holdEffectParam;
u8 unk4;
u8 unk5;
u8 unk6;
@@ -89,12 +89,12 @@ struct ItemData
u16 unk8_0:5;
u16 unk8_5:1;
u16 unk8_6:1;
- u16 unk8_7:4;
- u16 unk8_11:5;
+ u16 pocket:4;
+ u16 unk8_B:5;
u8 unkA;
u8 unkB;
u8 unkC;
- u8 unkD;
+ u8 padding;
union {
u8 flat;
struct ItemDataSub sub;