label metatiles in fldeff_cut.c

This commit is contained in:
garak 2019-06-11 22:22:50 -04:00 committed by huderlem
parent 8b26bd1e09
commit 9f8a30e4e7
3 changed files with 111 additions and 129 deletions

View File

@ -2,10 +2,19 @@
#define GUARD_METATILE_LABELS_H
// gTileset_General
#define METATILE_General_MuddySlope_Frame0 0x0E8
#define METATILE_General_MuddySlope_Frame1 0x0E9
#define METATILE_General_MuddySlope_Frame2 0x0EA
#define METATILE_General_MuddySlope_Frame3 0x0EB
#define METATILE_General_MuddySlope_Frame0 0x0E8
#define METATILE_General_MuddySlope_Frame1 0x0E9
#define METATILE_General_MuddySlope_Frame2 0x0EA
#define METATILE_General_MuddySlope_Frame3 0x0EB
#define METATILE_General_Grass 0x001
#define METATILE_General_TallGrass 0x00D
#define METATILE_General_LongGrass 0x015
#define METATILE_General_TallGrass_TreeUp 0x025
#define METATILE_General_Grass_TreeUp 0x00E
#define METATILE_General_TallGrass_TreeLeft 0x1C6
#define METATILE_General_TallGrass_TreeRight 0x1C7
#define METATILE_General_Grass_TreeLeft 0x1CE
#define METATILE_General_Grass_TreeRight 0x1CF
// gTileset_Building
#define METATILE_Building_PC_Off 0x004
@ -101,10 +110,17 @@
#define METATILE_Pacifidlog_SubmergedLogs_Vertical1 0x262
// gTileset_Fortree
#define METATILE_Fortree_BridgeOverGrass_Raised 0x24E
#define METATILE_Fortree_BridgeOverGrass_Lowered 0x24F
#define METATILE_Fortree_BridgeOverTrees_Raised 0x256
#define METATILE_Fortree_BridgeOverTrees_Lowered 0x257
#define METATILE_Fortree_LongGrass_Root 0x208
#define METATILE_Fortree_BridgeOverGrass_Raised 0x24E
#define METATILE_Fortree_BridgeOverGrass_Lowered 0x24F
#define METATILE_Fortree_BridgeOverTrees_Raised 0x256
#define METATILE_Fortree_BridgeOverTrees_Lowered 0x257
#define METATILE_Fortree_SecretBase_LongGrass_TopLeft 0x279
#define METATILE_Fortree_SecretBase_LongGrass_TopMid 0x27A
#define METATILE_Fortree_SecretBase_LongGrass_TopRight 0x27B
#define METATILE_Fortree_SecretBase_LongGrass_BottomLeft 0x281
#define METATILE_Fortree_SecretBase_LongGrass_BottomMid 0x282
#define METATILE_Fortree_SecretBase_LongGrass_BottomRight 0x283
// gTileset_SootopolisGym
#define METATILE_SootopolisGym_Ice_Cracked 0x20E
@ -113,10 +129,11 @@
// gTileset_Fallarbor
#define METATILE_Fallarbor_AshGrass 0x20A
#define METATILE_Fallarbor_NormalGrass 0x212
#define METATILE_Fallarbor_AshField 0x218
// gTileset_Lavaridge
#define METATILE_Lavaridge_NormalGrass 0x206
#define METATILE_Lavaridge_AshGrass 0x207
#define METATILE_Lavaridge_LavaField 0x271
#endif // GUARD_METATILE_LABELS_H

View File

@ -623,7 +623,7 @@ static void AshGrassPerStepCallback(u8 taskId)
if (MapGridGetMetatileIdAt(x, y) == METATILE_ID(Fallarbor, AshGrass))
StartAshFieldEffect(x, y, METATILE_ID(Fallarbor, NormalGrass), 4);
else
StartAshFieldEffect(x, y, 0x206, 4);// unsure what metatile this refers to
StartAshFieldEffect(x, y, METATILE_ID(Lavaridge, NormalGrass), 4);
if (CheckBagHasItem(ITEM_SOOT_SACK, 1))
{
@ -637,7 +637,7 @@ static void AshGrassPerStepCallback(u8 taskId)
static void SetCrackedFloorHoleMetatile(s16 x, s16 y)
{
MapGridSetMetatileIdAt(x, y, MapGridGetMetatileIdAt(x, y) == 0x22f ? 0x206 : 0x237);// again unsure what these are referring to
MapGridSetMetatileIdAt(x, y, MapGridGetMetatileIdAt(x, y) == 0x22f ? 0x206 : 0x237);// unsure what these are referring to
CurrentMapDrawMetatileAt(x, y);
}

View File

@ -20,6 +20,7 @@
#include "constants/event_objects.h"
#include "constants/field_effects.h"
#include "constants/songs.h"
#include "constants/metatile_labels.h"
extern struct MapPosition gPlayerFacingPosition;
@ -29,42 +30,6 @@ extern const u8 FarawayIsland_Interior_EventScript_267EDB[];
extern const u8 gFieldEffectPic_CutGrass[];
extern const u16 gFieldEffectObjectPalette6[];
// tileset 0 as first
#define METATILE_ID_GRASS 0x1
#define METATILE_ID_POKE_GRASS 0xD
#define METATILE_ID_POKE_GRASS_TREE_UP 0x25
#define METATILE_ID_GRASS_TREE_UP 0xE
#define METATILE_ID_POKE_GRASS_TREE_LEFT 0x1C6
#define METATILE_ID_POKE_GRASS_TREE_RIGHT 0x1C7
#define METATILE_ID_GRASS_TREE_LEFT 0x1CE
#define METATILE_ID_GRASS_TREE_RIGHT 0x1CF
#define METATILE_ID_POKE_LONG_GRASS 0x15
// tileset 6 as second
#define METATILE_ID_POKE_STEP_LAVA_GRASS 0x206
#define METATILE_ID_POKE_LAVA_GRASS 0x207
#define METATILE_ID_LAVA_FIELD 0x271
// tileset 7 as second
#define METATILE_ID_POKE_ASH_GRASS 0x20A
#define METATILE_ID_POKE_STEP_ASH_GRASS 0x212
#define METATILE_ID_ASH 0x218
// tileset 8 as second
#define METATILE_ID_POKE_LONG_GRASS_START 0x208
#define METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS 0x279
#define METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS 0x27A
#define METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS 0x27B
#define METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS 0x281
#define METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS 0x282
#define METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS 0x283
// cut 'square' defines
#define CUT_NORMAL_SIDE 3
#define CUT_NORMAL_AREA CUT_NORMAL_SIDE * CUT_NORMAL_SIDE
@ -390,36 +355,36 @@ static void SetCutGrassMetatile(s16 x, s16 y)
switch (metatileId)
{
case METATILE_ID_POKE_LONG_GRASS_START:
case METATILE_ID_POKE_LONG_GRASS:
case METATILE_ID_POKE_GRASS:
MapGridSetMetatileIdAt(x, y, METATILE_ID_GRASS);
case METATILE_ID(Fortree, LongGrass_Root):
case METATILE_ID(General, LongGrass):
case METATILE_ID(General, TallGrass):
MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass));
break;
case METATILE_ID_POKE_GRASS_TREE_LEFT:
MapGridSetMetatileIdAt(x, y, METATILE_ID_GRASS_TREE_LEFT);
case METATILE_ID(General, TallGrass_TreeLeft):
MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass_TreeLeft));
break;
case METATILE_ID_POKE_GRASS_TREE_RIGHT:
MapGridSetMetatileIdAt(x, y, METATILE_ID_GRASS_TREE_RIGHT);
case METATILE_ID(General, TallGrass_TreeRight):
MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass_TreeRight));
break;
case METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS:
MapGridSetMetatileIdAt(x, y, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS);
case METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft):
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft));
break;
case METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS:
MapGridSetMetatileIdAt(x, y, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS);
case METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid):
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid));
break;
case METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS:
MapGridSetMetatileIdAt(x, y, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS);
case METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight):
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight));
break;
case METATILE_ID_POKE_STEP_LAVA_GRASS:
case METATILE_ID_POKE_LAVA_GRASS:
MapGridSetMetatileIdAt(x, y, METATILE_ID_LAVA_FIELD);
case METATILE_ID(Lavaridge, NormalGrass):
case METATILE_ID(Lavaridge, AshGrass):
MapGridSetMetatileIdAt(x, y, METATILE_ID(Lavaridge, LavaField));
break;
case METATILE_ID_POKE_STEP_ASH_GRASS:
case METATILE_ID_POKE_ASH_GRASS:
MapGridSetMetatileIdAt(x, y, METATILE_ID_ASH);
case METATILE_ID(Fallarbor, NormalGrass):
case METATILE_ID(Fallarbor, AshGrass):
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fallarbor, AshField));
break;
case METATILE_ID_POKE_GRASS_TREE_UP:
MapGridSetMetatileIdAt(x, y, METATILE_ID_GRASS_TREE_UP);
case METATILE_ID(General, TallGrass_TreeUp):
MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass_TreeUp));
break;
}
}
@ -437,13 +402,13 @@ static u8 GetLongGrassCaseAt(s16 x, s16 y)
{
u16 metatileId = MapGridGetMetatileIdAt(x, y);
if (metatileId == METATILE_ID_GRASS)
if (metatileId == METATILE_ID(General, Grass))
return LONG_GRASS_FIELD;
else if (metatileId == METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS)
else if (metatileId == METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft))
return LONG_GRASS_BASE_LEFT;
else if (metatileId == METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS)
else if (metatileId == METATILE_ID(Fortree, SecretBase_LongGrass_TopMid))
return LONG_GRASS_BASE_CENTER;
else if (metatileId == METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS)
else if (metatileId == METATILE_ID(Fortree, SecretBase_LongGrass_TopRight))
return LONG_GRASS_BASE_RIGHT;
else
return LONG_GRASS_NONE;
@ -457,34 +422,34 @@ static void SetCutGrassMetatiles(s16 x, s16 y)
for (i = 0; i < sCutSquareSide; i++)
{
s16 currentX = x + i;
if (MapGridGetMetatileIdAt(currentX, y) == METATILE_ID_POKE_LONG_GRASS)
if (MapGridGetMetatileIdAt(currentX, y) == METATILE_ID(General, LongGrass))
{
switch (GetLongGrassCaseAt(currentX, y + 1))
{
case LONG_GRASS_FIELD:
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID_POKE_LONG_GRASS_START);
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID(Fortree, LongGrass_Root));
break;
case LONG_GRASS_BASE_LEFT:
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS);
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft));
break;
case LONG_GRASS_BASE_CENTER:
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS);
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid));
break;
case LONG_GRASS_BASE_RIGHT:
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS);
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight));
break;
}
}
if (MapGridGetMetatileIdAt(currentX, lowerY) == METATILE_ID_GRASS)
if (MapGridGetMetatileIdAt(currentX, lowerY) == METATILE_ID(General, Grass))
{
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID_POKE_LONG_GRASS_START)
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID_GRASS);
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS)
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS);
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS)
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS);
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS)
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS);
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID(Fortree, LongGrass_Root))
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID(General, Grass));
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft))
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft));
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid))
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid));
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight))
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight));
}
}
@ -521,62 +486,62 @@ static void HandleLongGrassOnHyper(u8 caseId, s16 x, s16 y)
if (arr[0] == TRUE)
{
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_POKE_LONG_GRASS_START)
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_GRASS);
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS)
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS);
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS)
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS);
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS)
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS);
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(Fortree, LongGrass_Root))
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(General, Grass));
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft))
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft));
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid))
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid));
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight))
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight));
}
if (arr[1] == TRUE)
{
if (MapGridGetMetatileIdAt(newX, y + 2) == METATILE_ID_POKE_LONG_GRASS)
if (MapGridGetMetatileIdAt(newX, y + 2) == METATILE_ID(General, LongGrass))
{
switch (GetLongGrassCaseAt(newX, y + 3))
{
case LONG_GRASS_FIELD:
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_POKE_LONG_GRASS_START);
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, LongGrass_Root));
break;
case LONG_GRASS_BASE_LEFT:
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS);
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft));
break;
case LONG_GRASS_BASE_CENTER:
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS);
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid));
break;
case LONG_GRASS_BASE_RIGHT:
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS);
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight));
break;
}
}
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID_POKE_LONG_GRASS_START)
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_GRASS);
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS)
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS);
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS)
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS);
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS)
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS);
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID(Fortree, LongGrass_Root))
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(General, Grass));
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft))
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft));
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid))
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid));
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight))
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight));
}
if (arr[2] == TRUE)
{
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_POKE_LONG_GRASS)
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(General, LongGrass))
{
switch (GetLongGrassCaseAt(newX, y + 4))
{
case LONG_GRASS_FIELD:
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_POKE_LONG_GRASS_START);
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, LongGrass_Root));
break;
case LONG_GRASS_BASE_LEFT:
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS);
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft));
break;
case LONG_GRASS_BASE_CENTER:
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS);
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid));
break;
case LONG_GRASS_BASE_RIGHT:
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS);
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight));
break;
}
}
@ -630,16 +595,16 @@ void FixLongGrassMetatilesWindowTop(s16 x, s16 y)
switch (GetLongGrassCaseAt(x, y + 1))
{
case LONG_GRASS_FIELD:
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_POKE_LONG_GRASS_START);
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, LongGrass_Root));
break;
case LONG_GRASS_BASE_LEFT:
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS);
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft));
break;
case LONG_GRASS_BASE_CENTER:
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS);
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid));
break;
case LONG_GRASS_BASE_RIGHT:
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS);
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight));
break;
}
}
@ -647,7 +612,7 @@ void FixLongGrassMetatilesWindowTop(s16 x, s16 y)
void FixLongGrassMetatilesWindowBottom(s16 x, s16 y)
{
if (MapGridGetMetatileIdAt(x, y) == METATILE_ID_GRASS)
if (MapGridGetMetatileIdAt(x, y) == METATILE_ID(General, Grass))
{
u8 metatileBehavior = MapGridGetMetatileBehaviorAt(x, y + 1);
if (MetatileBehavior_IsLongGrassSouthEdge(metatileBehavior))
@ -655,17 +620,17 @@ void FixLongGrassMetatilesWindowBottom(s16 x, s16 y)
s32 metatileId = MapGridGetMetatileIdAt(x, y + 1);
switch (metatileId)
{
case METATILE_ID_POKE_LONG_GRASS_START:
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_GRASS);
case METATILE_ID(Fortree, LongGrass_Root):
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(General, Grass));
break;
case METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS:
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS);
case METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft):
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft));
break;
case METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS:
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS);
case METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid):
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid));
break;
case METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS:
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS);
case METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight):
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight));
break;
}
}