summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2020-02-26 13:14:53 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2020-02-26 13:15:21 -0500
commitcac0681b2c11b7184545cc42d4bd209d6000b42c (patch)
treebd4d9775c281c1533c576e6a435e9a0e481fd677
parent933bc3c01ab3e77c5f18770a8893e3424259ce77 (diff)
Name cut grass metatiles
-rw-r--r--include/constants/metatile_labels.h24
-rw-r--r--include/global.fieldmap.h2
-rw-r--r--src/fldeff_cut.c42
3 files changed, 58 insertions, 10 deletions
diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h
index b71e7d08f..ca4a92263 100644
--- a/include/constants/metatile_labels.h
+++ b/include/constants/metatile_labels.h
@@ -2,6 +2,14 @@
#define GUARD_METATILE_LABELS_H
// gTileset_General
+#define METATILE_General_Plain_Mowed 0x001
+#define METATILE_General_ThinTreeTop_Grass 0x00A
+#define METATILE_General_WideTreeTopLeft_Grass 0x00B
+#define METATILE_General_WideTreeTopRight_Grass 0x00C
+#define METATILE_General_Plain_Grass 0x00D
+#define METATILE_General_WideTreeTopLeft_Mowed 0x00E
+#define METATILE_General_WideTreeTopRight_Mowed 0x00F
+#define METATILE_General_ThinTreeTop_Mowed 0x013
#define METATILE_General_CalmWater 0x12B
// gTileset_Mart
@@ -127,4 +135,20 @@
#define METATILE_TrainerTower_Floor_ShadeBottomLeft 0x287
#define METATILE_TrainerTower_CounterBarrier 0x2B4
+// gTileset_ViridianForest
+#define METATILE_ViridianForest_HugeTreeTopMiddle_Grass 0x284
+#define METATILE_ViridianForest_HugeTreeTopMiddle_Mowed 0x281
+
+// gTileset_CeladonCity
+#define METATILE_CeladonCity_CyclingRoad_Grass 0x352
+#define METATILE_CeladonCity_CyclingRoad_Mowed 0x33E
+
+// gTileset_FuchsiaCity
+#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Grass 0x300
+#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Grass 0x301
+#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Grass 0x302
+#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Mowed 0x310
+#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Mowed 0x311
+#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Mowed 0x312
+
#endif // GUARD_METATILE_LABELS_H
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index c599b68ab..a4d6880b1 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -15,6 +15,8 @@ enum
typedef void (*TilesetCB)(void);
+#define METATILE_ID(tileset, name) (METATILE_##tileset##_##name)
+
struct Tileset
{
/*0x00*/ bool8 isCompressed;
diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c
index 64165ae8f..8617a1aaa 100644
--- a/src/fldeff_cut.c
+++ b/src/fldeff_cut.c
@@ -16,6 +16,7 @@
#include "trig.h"
#include "constants/event_objects.h"
#include "constants/songs.h"
+#include "constants/metatile_labels.h"
#define CUT_GRASS_SPRITE_COUNT 8
@@ -32,16 +33,37 @@ static void SpriteCallback_CutGrass_Cleanup(struct Sprite * sprite);
static void FieldMoveCallback_CutTree(void);
static const u16 sCutGrassMetatileMapping[][2] = {
- {0x000d, 0x0001},
- {0x000a, 0x0013},
- {0x000b, 0x000e},
- {0x000c, 0x000f},
- {0x0352, 0x033e},
- {0x0300, 0x0310},
- {0x0301, 0x0311},
- {0x0302, 0x0312},
- {0x0284, 0x0281},
- {0xffff, 0xffff}
+ {
+ METATILE_ID(General, Plain_Grass),
+ METATILE_ID(General, Plain_Mowed)
+ }, {
+ METATILE_ID(General, ThinTreeTop_Grass),
+ METATILE_ID(General, ThinTreeTop_Mowed)
+ }, {
+ METATILE_ID(General, WideTreeTopLeft_Grass),
+ METATILE_ID(General, WideTreeTopLeft_Mowed)
+ }, {
+ METATILE_ID(General, WideTreeTopRight_Grass),
+ METATILE_ID(General, WideTreeTopRight_Mowed)
+ }, {
+ METATILE_ID(CeladonCity, CyclingRoad_Grass),
+ METATILE_ID(CeladonCity, CyclingRoad_Mowed)
+ }, {
+ METATILE_ID(FuchsiaCity, SafariZoneTreeTopLeft_Grass),
+ METATILE_ID(FuchsiaCity, SafariZoneTreeTopLeft_Mowed)
+ }, {
+ METATILE_ID(FuchsiaCity, SafariZoneTreeTopMiddle_Grass),
+ METATILE_ID(FuchsiaCity, SafariZoneTreeTopMiddle_Mowed)
+ }, {
+ METATILE_ID(FuchsiaCity, SafariZoneTreeTopRight_Grass),
+ METATILE_ID(FuchsiaCity, SafariZoneTreeTopRight_Mowed)
+ }, {
+ METATILE_ID(ViridianForest, HugeTreeTopMiddle_Grass),
+ METATILE_ID(ViridianForest, HugeTreeTopMiddle_Mowed)
+ }, {
+ 0xffff,
+ 0xffff
+ }
};
static const struct OamData sOamData_FldEff_CutGrass = {