Name cut grass metatiles

This commit is contained in:
PikalaxALT
2020-02-26 13:14:53 -05:00
parent 933bc3c01a
commit cac0681b2c
3 changed files with 58 additions and 10 deletions
+24
View File
@@ -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
+2
View File
@@ -15,6 +15,8 @@ enum
typedef void (*TilesetCB)(void);
#define METATILE_ID(tileset, name) (METATILE_##tileset##_##name)
struct Tileset
{
/*0x00*/ bool8 isCompressed;
+32 -10
View File
@@ -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 = {