From 13b02fc8232ce61062afe46ca13a1930a3bbc286 Mon Sep 17 00:00:00 2001 From: slipstream/RoL Date: Thu, 25 May 2017 16:33:34 +0100 Subject: item.c: Replace item identifier with item enum CopyItemName() hardcoded the Enigma Berry identifier, replaced it with ITEM_ENIGMA_BERRY. It still hardcodes berry identifier 0x2B (Enigma Berry), but that's because I can't seem to find a similar enum for berries. --- src/item.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/item.c b/src/item.c index ad2b9aed3..742a1462f 100644 --- a/src/item.c +++ b/src/item.c @@ -1,5 +1,6 @@ #include "global.h" #include "item.h" +#include "items.h" #include "string_util.h" #include "strings.h" @@ -29,9 +30,9 @@ static void CompactPCItems(void); void CopyItemName(u16 itemId, u8 *string) { - if (itemId == 0xAF) + if (itemId == ITEM_ENIGMA_BERRY) { - StringCopy(string, GetBerryInfo(0x2B)->name); + StringCopy(string, GetBerryInfo(0x2B)->name); // berry 0x2b = enigma berry StringAppend(string, gOtherText_Berry2); } else -- cgit v1.2.3