summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDizzyEggg <jajkodizzy@wp.pl>2018-04-29 15:34:14 +0200
committerDizzyEggg <jajkodizzy@wp.pl>2018-04-29 15:34:14 +0200
commit9f9764672470599c7bd9428a0a121ed8b334d061 (patch)
tree5d45466c2f16ebec59bf870d3550f344ee3c3b6c
parentfd40e93cb5fe4eb43551ae1a8f584e86bcc7ecf1 (diff)
make item compile
-rw-r--r--include/item.h11
-rw-r--r--src/berry.c2
-rw-r--r--src/berry_blender.c2
-rw-r--r--src/berry_tag_screen.c6
-rw-r--r--src/item.c11
5 files changed, 16 insertions, 16 deletions
diff --git a/include/item.h b/include/item.h
index 0943f3656..881d3a3d4 100644
--- a/include/item.h
+++ b/include/item.h
@@ -1,6 +1,17 @@
#ifndef GUARD_ITEM_H
#define GUARD_ITEM_H
+// These constants are used in gItems
+enum
+{
+ POCKET_NONE,
+ POCKET_ITEMS,
+ POCKET_POKE_BALLS,
+ POCKET_TM_HM,
+ POCKET_BERRIES,
+ POCKET_KEY_ITEMS,
+};
+
enum
{
ITEMS_POCKET,
diff --git a/src/berry.c b/src/berry.c
index 74b7090c0..e128eb0ec 100644
--- a/src/berry.c
+++ b/src/berry.c
@@ -1218,7 +1218,7 @@ void FieldObjectInteractionRemoveBerryTree(void)
u8 PlayerHasBerries(void)
{
- return IsBagPocketNonEmpty(BAG_BERRIES);
+ return IsBagPocketNonEmpty(POCKET_BERRIES);
}
void ResetBerryTreeSparkleFlags(void)
diff --git a/src/berry_blender.c b/src/berry_blender.c
index 9e6a0fef7..e050ce11e 100644
--- a/src/berry_blender.c
+++ b/src/berry_blender.c
@@ -2472,7 +2472,7 @@ static void CB2_HandleBlenderEndGame(void)
sub_8081F94(&gSendCmd[0]);
if (sBerryBlenderData->yesNoAnswer == 0)
{
- if (IsBagPocketNonEmpty(BAG_BERRIES) == FALSE) // no berries
+ if (IsBagPocketNonEmpty(POCKET_BERRIES) == FALSE) // no berries
{
sBerryBlenderData->playAgainState = CANT_PLAY_NO_BERRIES;
gSendCmd[1] = 0x9999;
diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c
index 1a0d1bce0..9a6e78c81 100644
--- a/src/berry_tag_screen.c
+++ b/src/berry_tag_screen.c
@@ -517,7 +517,7 @@ static void TryChangeDisplayedBerry(u8 taskId, s8 toMove)
s16 *data = gTasks[taskId].data;
s16 currPocketPosition = gUnknown_0203CE58.scrollPosition[3] + gUnknown_0203CE58.cursorPosition[3];
u32 newPocketPosition = currPocketPosition + toMove;
- if (newPocketPosition < 46 && BagGetItemIdByPocketPosition(BAG_BERRIES, newPocketPosition) != 0)
+ if (newPocketPosition < 46 && BagGetItemIdByPocketPosition(POCKET_BERRIES, newPocketPosition) != 0)
{
if (toMove < 0)
data[1] = 2;
@@ -537,7 +537,7 @@ static void HandleBagCursorPositionChange(s8 toMove)
u16 *cursorPos = &gUnknown_0203CE58.cursorPosition[3];
if (toMove > 0)
{
- if (*cursorPos < 4 || BagGetItemIdByPocketPosition(BAG_BERRIES, *scrollPos + 8) == 0)
+ if (*cursorPos < 4 || BagGetItemIdByPocketPosition(POCKET_BERRIES, *scrollPos + 8) == 0)
*cursorPos += toMove;
else
*scrollPos += toMove;
@@ -550,7 +550,7 @@ static void HandleBagCursorPositionChange(s8 toMove)
*scrollPos += toMove;
}
- sBerryTag->berryId = ItemIdToBerryType(BagGetItemIdByPocketPosition(BAG_BERRIES, *scrollPos + *cursorPos));
+ sBerryTag->berryId = ItemIdToBerryType(BagGetItemIdByPocketPosition(POCKET_BERRIES, *scrollPos + *cursorPos));
}
static void Task_DisplayAnotherBerry(u8 taskId)
diff --git a/src/item.c b/src/item.c
index 01166f5d6..975fef3ae 100644
--- a/src/item.c
+++ b/src/item.c
@@ -11,17 +11,6 @@
#include "strings.h"
#include "load_save.h"
-// These constants are used in gItems
-enum
-{
- POCKET_NONE,
- POCKET_ITEMS,
- POCKET_POKE_BALLS,
- POCKET_TM_HM,
- POCKET_BERRIES,
- POCKET_KEY_ITEMS,
-};
-
extern bool8 InBattlePyramid(void);
extern u16 gUnknown_0203CF30[];
extern const struct Item gItems[];