Add MAP_OFFSET

This commit is contained in:
GriffinR
2021-10-09 12:12:18 -04:00
parent 28de627913
commit 862febe03a
28 changed files with 261 additions and 391 deletions

View File

@@ -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;