diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-10-09 12:12:18 -0400 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2021-10-09 13:19:27 -0400 |
commit | 862febe03a354218d3c8bd14d9c7d1a49e8981b8 (patch) | |
tree | 583c9759092167966229324c1cf72868cdd5f0e7 /src/wild_encounter.c | |
parent | 28de627913f04e059f995169299e41ce4c2544f0 (diff) |
Add MAP_OFFSET
Diffstat (limited to 'src/wild_encounter.c')
-rw-r--r-- | src/wild_encounter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 8bcb17605..32316c119 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -70,7 +70,7 @@ static u16 GetRoute119WaterTileNum(s16 x, s16 y, u8 section) { for (xCur = 0; xCur < gMapHeader.mapLayout->width; xCur++) { - u8 tileBehaviorId = MapGridGetMetatileBehaviorAt(xCur + 7, yCur + 7); + u8 tileBehaviorId = MapGridGetMetatileBehaviorAt(xCur + MAP_OFFSET, yCur + MAP_OFFSET); if (MetatileBehavior_IsSurfableAndNotWaterfall(tileBehaviorId) == TRUE) { tileNum++; @@ -95,8 +95,8 @@ static bool8 CheckFeebas(void) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE119)) { GetXYCoordsOneStepInFrontOfPlayer(&x, &y); - x -= 7; - y -= 7; + x -= MAP_OFFSET; + y -= MAP_OFFSET; if (y >= gRoute119WaterTileData[3 * 0 + 0] && y <= gRoute119WaterTileData[3 * 0 + 1]) route119Section = 0; |