summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorslipstream/RoL <l33twax@yahoo.com>2017-05-25 16:33:34 +0100
committerGitHub <noreply@github.com>2017-05-25 16:33:34 +0100
commit13b02fc8232ce61062afe46ca13a1930a3bbc286 (patch)
treefb3484fa9a9cd0231de8765bb8aad2bf5577ae13
parentf86f229017d6e03f211b623139d357680db5ceeb (diff)
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.
-rw-r--r--src/item.c5
1 files changed, 3 insertions, 2 deletions
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