summaryrefslogtreecommitdiff
path: root/src/itemUtils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/itemUtils.c')
-rw-r--r--src/itemUtils.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/itemUtils.c b/src/itemUtils.c
index 1b3cf948..c78c0da3 100644
--- a/src/itemUtils.c
+++ b/src/itemUtils.c
@@ -255,9 +255,9 @@ void ModArrows(s32 arrows) {
EquipSlot IsItemEquipped(u32 itemId) {
EquipSlot equipSlot;
- if (itemId == gSave.stats.itemButtons[SLOT_A]) {
+ if (itemId == gSave.stats.equipped[SLOT_A]) {
equipSlot = EQUIP_SLOT_A;
- } else if (itemId == gSave.stats.itemButtons[SLOT_B]) {
+ } else if (itemId == gSave.stats.equipped[SLOT_B]) {
equipSlot = EQUIP_SLOT_B;
} else {
equipSlot = EQUIP_SLOT_NONE;
@@ -273,17 +273,17 @@ void PutItemOnSlot(u32 itemId) {
}
if (itemId2 - 1 < 0x1f) {
equipSlot = EQUIP_SLOT_NONE;
- if (gSave.stats.itemButtons[SLOT_A] == ITEM_NONE) {
+ if (gSave.stats.equipped[SLOT_A] == ITEM_NONE) {
equipSlot = EQUIP_SLOT_A;
- } else if (gSave.stats.itemButtons[SLOT_B] == ITEM_NONE) {
+ } else if (gSave.stats.equipped[SLOT_B] == ITEM_NONE) {
equipSlot = EQUIP_SLOT_B;
}
if (equipSlot == EQUIP_SLOT_NONE) {
u32 temp = gItemMetaData[itemId2].menuSlot;
- if (temp == gItemMetaData[gSave.stats.itemButtons[SLOT_A]].menuSlot) {
+ if (temp == gItemMetaData[gSave.stats.equipped[SLOT_A]].menuSlot) {
equipSlot = EQUIP_SLOT_A;
} else {
- if (temp == gItemMetaData[gSave.stats.itemButtons[SLOT_B]].menuSlot) {
+ if (temp == gItemMetaData[gSave.stats.equipped[SLOT_B]].menuSlot) {
equipSlot = EQUIP_SLOT_B;
}
}
@@ -302,13 +302,13 @@ void ForceEquipItem(u32 itemId, u32 equipSlot) {
if ((itemId - 1 < 0x1f) && (equipSlot < EQUIP_SLOT_NONE)) {
otherItemSlot = equipSlot == EQUIP_SLOT_A;
- replacedItem = gSave.stats.itemButtons[equipSlot];
- otherItem = gSave.stats.itemButtons[otherItemSlot];
+ replacedItem = gSave.stats.equipped[equipSlot];
+ otherItem = gSave.stats.equipped[otherItemSlot];
if (gItemMetaData[otherItem].menuSlot == gItemMetaData[itemId].menuSlot) {
otherItem = replacedItem;
}
- gSave.stats.itemButtons[equipSlot] = itemId;
- gSave.stats.itemButtons[otherItemSlot] = otherItem;
+ gSave.stats.equipped[equipSlot] = itemId;
+ gSave.stats.equipped[otherItemSlot] = otherItem;
gUnk_0200AF00.unk_13 = 0x7f;
gUnk_0200AF00.unk_14 = 0x7f;
}