diff options
author | Marcus Huderle <huderlem@gmail.com> | 2018-07-11 11:12:26 -0500 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2018-07-11 11:12:26 -0500 |
commit | 7d375972ba0e5a8a17fecbd223dd6de6e87b6090 (patch) | |
tree | dd9dc3d2c03bd3f2cb512189dfba57f315298a45 /src/item_use.c | |
parent | 8ffd7a70fc6d059f04a0588d2956d4f02f7eeb5d (diff) |
Sync bg_event macros with pokeruby
Diffstat (limited to 'src/item_use.c')
-rwxr-xr-x | src/item_use.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/item_use.c b/src/item_use.c index 6bdfe1c54..9031338dd 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -5,6 +5,7 @@ #include "berry.h" #include "bike.h" #include "coins.h" +#include "constants/bg_event_constants.h" #include "constants/flags.h" #include "constants/items.h" #include "constants/songs.h" @@ -371,7 +372,7 @@ bool8 ItemfinderCheckForHiddenItems(const struct MapEvents *events, u8 taskId) gTasks[taskId].data[2] = FALSE; for (i = 0; i < events->bgEventCount; i++) { - if (events->bgEvents[i].kind == 7 && !FlagGet(events->bgEvents[i].bgUnion.hiddenItem.hiddenItemId + 0x1F4)) + if (events->bgEvents[i].kind == BG_EVENT_HIDDEN_ITEM && !FlagGet(events->bgEvents[i].bgUnion.hiddenItem.hiddenItemId + 0x1F4)) { distanceX = (u16)events->bgEvents[i].x + 7; newDistanceX = distanceX - x; @@ -398,7 +399,7 @@ bool8 sub_80FD6D4(const struct MapEvents *events, s16 x, s16 y) for (i = 0; i < bgEventCount; i++) { - 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 (bgEvent[i].kind == BG_EVENT_HIDDEN_ITEM && 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 + 0x1F4)) return TRUE; |