summaryrefslogtreecommitdiff
path: root/src/field/item_use.c
diff options
context:
space:
mode:
authorcamthesaxman <cameronghall@cox.net>2018-01-02 11:16:06 -0600
committercamthesaxman <cameronghall@cox.net>2018-01-02 11:16:06 -0600
commit0f5b0005676cd3db623eb557f86cf92b1e020827 (patch)
tree257857a4bed89a1d9410a9945efd63a76ea16582 /src/field/item_use.c
parent28e98d9df7db41f9dcc813ad4e0b37c568833aee (diff)
parent397f32f29dbcd8fb6ad47afe5ba1ee354ca2b5c7 (diff)
Merge branch 'master' into decompile_easy_chat
Diffstat (limited to 'src/field/item_use.c')
-rw-r--r--src/field/item_use.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/field/item_use.c b/src/field/item_use.c
index 37cd8ba78..e1fdddce0 100644
--- a/src/field/item_use.c
+++ b/src/field/item_use.c
@@ -14,6 +14,7 @@
#include "fieldmap.h"
#include "item.h"
#include "item_menu.h"
+#include "constants/flags.h"
#include "constants/items.h"
#include "mail.h"
#include "main.h"
@@ -328,7 +329,7 @@ bool8 ItemfinderCheckForHiddenItems(struct MapEvents *events, u8 taskId)
for (i = 0; i < events->bgEventCount; i++)
{
- if ((events -> bgEvents[i].kind == 7) && !FlagGet(events -> bgEvents[i].bgUnion.hiddenItem.hiddenItemId + 600))
+ if ((events -> bgEvents[i].kind == 7) && !FlagGet(events -> bgEvents[i].bgUnion.hiddenItem.hiddenItemId + FLAG_HIDDEN_ITEMS_START))
{
// do a distance lookup of each item so long as the index remains less than the objects on the current map.
distanceX = (u16)events -> bgEvents[i].x + 7;
@@ -360,7 +361,7 @@ bool8 HiddenItemAtPos(struct MapEvents *events, s16 x, s16 y)
{
if (bgEvent[i].kind == 7 && x == (u16)bgEvent[i].x && y == (u16)bgEvent[i].y) // hidden item and coordinates matches x and y passed?
{
- if (!FlagGet(bgEvent[i].bgUnion.hiddenItem.hiddenItemId + 600))
+ if (!FlagGet(bgEvent[i].bgUnion.hiddenItem.hiddenItemId + FLAG_HIDDEN_ITEMS_START))
return TRUE;
else
return FALSE;
@@ -921,7 +922,7 @@ static void PrepareItemUseMessage(void)
void ItemUseOutOfBattle_Repel(u8 var)
{
- if (VarGet(VAR_REPEL_STEP_COUNT) == FALSE)
+ if (VarGet(VAR_REPEL_STEP_COUNT) == 0)
{
VarSet(VAR_REPEL_STEP_COUNT, ItemId_GetHoldEffectParam(gSpecialVar_ItemId));
PrepareItemUseMessage();