Skip to content

Commit

Permalink
Flowers count as Tall Grass
Browse files Browse the repository at this point in the history
By mapping it to Short Grass and enabling encounters.
  • Loading branch information
kevinvanrijn committed Sep 10, 2024
1 parent 81d599e commit 3dcbb96
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Binary file modified data/tilesets/primary/general/metatile_attributes.bin
Binary file not shown.
2 changes: 2 additions & 0 deletions src/fldeff_cut.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ bool8 SetUpFieldMove_Cut(void)
{
tileBehavior = MapGridGetMetatileBehaviorAt(x, y);
if (MetatileBehavior_IsPokeGrass(tileBehavior) == TRUE
|| MetatileBehavior_IsShortGrass(tileBehavior) == TRUE
|| MetatileBehavior_IsAshGrass(tileBehavior) == TRUE)
{
// Standing in front of grass.
Expand Down Expand Up @@ -248,6 +249,7 @@ bool8 SetUpFieldMove_Cut(void)
u8 tileArrayId = ((sHyperCutStruct[i].y * 5) + 12) + (sHyperCutStruct[i].x);
tileBehavior = MapGridGetMetatileBehaviorAt(x, y);
if (MetatileBehavior_IsPokeGrass(tileBehavior) == TRUE
|| MetatileBehavior_IsShortGrass(tileBehavior) == TRUE
|| MetatileBehavior_IsAshGrass(tileBehavior) == TRUE)
{
gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu;
Expand Down
3 changes: 2 additions & 1 deletion src/metatile_behavior.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ static const u8 sTileBitAttributes[NUM_METATILE_BEHAVIORS] =
[MB_LONG_GRASS] = TILE_FLAG_UNUSED | TILE_FLAG_HAS_ENCOUNTERS,
[MB_UNUSED_05] = TILE_FLAG_HAS_ENCOUNTERS,
[MB_DEEP_SAND] = TILE_FLAG_UNUSED | TILE_FLAG_HAS_ENCOUNTERS,
[MB_SHORT_GRASS] = TILE_FLAG_UNUSED,
[MB_SHORT_GRASS] = TILE_FLAG_UNUSED | TILE_FLAG_HAS_ENCOUNTERS,
[MB_CAVE] = TILE_FLAG_UNUSED | TILE_FLAG_HAS_ENCOUNTERS,
[MB_LONG_GRASS_SOUTH_EDGE] = TILE_FLAG_UNUSED,
[MB_NO_RUNNING] = TILE_FLAG_UNUSED,
Expand Down Expand Up @@ -1270,6 +1270,7 @@ bool8 MetatileBehavior_IsCuttableGrass(u8 metatileBehavior)
{
if (metatileBehavior == MB_TALL_GRASS
|| metatileBehavior == MB_LONG_GRASS
|| metatileBehavior == MB_SHORT_GRASS
|| metatileBehavior == MB_ASHGRASS
|| metatileBehavior == MB_LONG_GRASS_SOUTH_EDGE)
return TRUE;
Expand Down

0 comments on commit 3dcbb96

Please sign in to comment.