Sync bg_event macros with pokeruby
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
// Includes
|
||||
#include "global.h"
|
||||
#include "constants/bg_event_constants.h"
|
||||
#include "constants/decorations.h"
|
||||
#include "malloc.h"
|
||||
#include "main.h"
|
||||
@@ -335,7 +336,7 @@ void sub_80E8EE0(struct MapEvents const *events)
|
||||
|
||||
for (bgEventIndex = 0; bgEventIndex < events->bgEventCount; bgEventIndex ++)
|
||||
{
|
||||
if (events->bgEvents[bgEventIndex].kind == 8)
|
||||
if (events->bgEvents[bgEventIndex].kind == BG_EVENT_SECRET_BASE)
|
||||
{
|
||||
for (j = 0; j < 20; j ++)
|
||||
{
|
||||
@@ -600,7 +601,7 @@ void sub_80E9608(struct Coords16 *coords, struct MapEvents *events)
|
||||
|
||||
for (bgEventIdx = 0; bgEventIdx < events->bgEventCount; bgEventIdx ++)
|
||||
{
|
||||
if (events->bgEvents[bgEventIdx].kind == 8 && coords->x == events->bgEvents[bgEventIdx].x + 7 && coords->y == events->bgEvents[bgEventIdx].y + 7)
|
||||
if (events->bgEvents[bgEventIdx].kind == BG_EVENT_SECRET_BASE && coords->x == events->bgEvents[bgEventIdx].x + 7 && coords->y == events->bgEvents[bgEventIdx].y + 7)
|
||||
{
|
||||
sCurSecretBaseId = events->bgEvents[bgEventIdx].bgUnion.secretBaseId;
|
||||
break;
|
||||
@@ -780,7 +781,7 @@ void sub_80E9AD0(void)
|
||||
events = gMapHeader.events;
|
||||
for (i = 0; i < events->bgEventCount; i ++)
|
||||
{
|
||||
if (events->bgEvents[i].kind == 8 && gSaveBlock1Ptr->secretBases[0].secretBaseId == events->bgEvents[i].bgUnion.secretBaseId)
|
||||
if (events->bgEvents[i].kind == BG_EVENT_SECRET_BASE && gSaveBlock1Ptr->secretBases[0].secretBaseId == events->bgEvents[i].bgUnion.secretBaseId)
|
||||
{
|
||||
tile = MapGridGetMetatileIdAt(events->bgEvents[i].x + 7, events->bgEvents[i].y + 7);
|
||||
for (j = 0; j < 7; j ++)
|
||||
|
||||
Reference in New Issue
Block a user