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 authored and ElGHT committed Sep 12, 2024
1 parent e1d1f1f commit 1c6c437
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Binary file modified data/tilesets/primary/general/metatile_attributes.bin
Binary file not shown.
1 change: 1 addition & 0 deletions include/constants/metatile_labels.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@
#define METATILE_General_SecretBase_TreeRight 0x027
#define METATILE_General_SecretBase_VineLeft 0x036
#define METATILE_General_SecretBase_VineRight 0x037
#define METATILE_General_ShortGrass 0x004
#define METATILE_General_TallGrass 0x00D
#define METATILE_General_TallGrass_TreeLeft 0x1C6
#define METATILE_General_TallGrass_TreeRight 0x1C7
Expand Down
3 changes: 3 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 Expand Up @@ -360,6 +362,7 @@ static void SetCutGrassMetatile(s16 x, s16 y)
case METATILE_Fortree_LongGrass_Root:
case METATILE_General_LongGrass:
case METATILE_General_TallGrass:
case METATILE_General_ShortGrass:
MapGridSetMetatileIdAt(x, y, METATILE_General_Grass);
break;
case METATILE_General_TallGrass_TreeLeft:
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 1c6c437

Please sign in to comment.