summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-08-11 09:31:20 -0400
committerGriffinR <griffin.g.richards@gmail.com>2021-08-11 09:31:20 -0400
commitd951d7c36354abe5518d07c57bda43efe645bc02 (patch)
tree2be8c8864d1d83db08d306c46cd747aa82dd36ed /src
parentd391486247cc9f29d85787d6711f7cb993cf6585 (diff)
Use tag constants in region_map.c
Diffstat (limited to 'src')
-rw-r--r--src/region_map.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/region_map.c b/src/region_map.c
index 1a25d140c..4e547b5fb 100644
--- a/src/region_map.c
+++ b/src/region_map.c
@@ -48,6 +48,12 @@
#define FLYDESTICON_RED_OUTLINE 6
+enum {
+ TAG_CURSOR,
+ TAG_PLAYER_ICON,
+ TAG_FLY_ICON,
+};
+
// Static type declarations
struct MultiNameFlyDest
@@ -237,13 +243,13 @@ static const union AnimCmd *const sRegionMapCursorAnimTable[] =
static const struct SpritePalette sRegionMapCursorSpritePalette =
{
.data = sRegionMapCursorPal,
- .tag = 0
+ .tag = TAG_CURSOR
};
static const struct SpriteTemplate sRegionMapCursorSpriteTemplate =
{
- .tileTag = 0,
- .paletteTag = 0,
+ .tileTag = TAG_CURSOR,
+ .paletteTag = TAG_CURSOR,
.oam = &sRegionMapCursorOam,
.anims = sRegionMapCursorAnimTable,
.images = NULL,
@@ -419,7 +425,7 @@ static const struct WindowTemplate sFlyMapWindowTemplates[] =
static const struct SpritePalette sFlyTargetIconsSpritePalette =
{
.data = sFlyTargetIcons_Pal,
- .tag = 2
+ .tag = TAG_FLY_ICON
};
static const u16 sRedOutlineFlyDestinations[][2] =
@@ -497,8 +503,8 @@ static const union AnimCmd *const sFlyDestIcon_Anims[] =
static const struct SpriteTemplate sFlyDestIconSpriteTemplate =
{
- .tileTag = 2,
- .paletteTag = 2,
+ .tileTag = TAG_FLY_ICON,
+ .paletteTag = TAG_FLY_ICON,
.oam = &sFlyDestIcon_OamData,
.anims = sFlyDestIcon_Anims,
.images = NULL,
@@ -1692,8 +1698,8 @@ void CB2_OpenFlyMap(void)
break;
case 4:
InitRegionMap(&sFlyMap->regionMap, FALSE);
- CreateRegionMapCursor(0, 0);
- CreateRegionMapPlayerIcon(1, 1);
+ CreateRegionMapCursor(TAG_CURSOR, TAG_CURSOR);
+ CreateRegionMapPlayerIcon(TAG_PLAYER_ICON, TAG_PLAYER_ICON);
sFlyMap->mapSecId = sFlyMap->regionMap.mapSecId;
StringFill(sFlyMap->nameBuffer, CHAR_SPACE, MAP_NAME_LENGTH);
sDrawFlyDestTextWindow = TRUE;
@@ -1827,7 +1833,7 @@ static void LoadFlyDestIcons(void)
LZ77UnCompWram(sFlyTargetIcons_Gfx, sFlyMap->tileBuffer);
sheet.data = sFlyMap->tileBuffer;
sheet.size = sizeof(sFlyMap->tileBuffer);
- sheet.tag = 2;
+ sheet.tag = TAG_FLY_ICON;
LoadSpriteSheet(&sheet);
LoadSpritePalette(&sFlyTargetIconsSpritePalette);
CreateFlyDestIcons();