From 189d387f01104a715d788690fbc76d987ea3d6e1 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Fri, 22 Feb 2019 03:08:48 -0500 Subject: Add macros for metatile manipulation --- src/battle_pyramid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/battle_pyramid.c') diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index 340c17c59..92ff257b0 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -1267,7 +1267,7 @@ static u8 GetPostBattleDirectionHintTextIndex(int *hintType, u8 minDistanceForEx { for (x = 0; x < 32; x++) { - if ((map[x] & 0x3FF) == FLOOR_EXIT_METATILE) + if ((map[x] & MAP_METATILE_ID_MASK) == FLOOR_EXIT_METATILE) { x += 7 - gEventObjects[gSelectedEventObject].initialCoords.x; y += 7 - gEventObjects[gSelectedEventObject].initialCoords.y; @@ -1568,7 +1568,7 @@ void GenerateBattlePyramidFloorLayout(u16 *backupMapData, bool8 setPlayerPositio { for (x = 0; x < mapLayout->width; x++) { - if ((layoutMap[x] & 0x3FF) != FLOOR_EXIT_METATILE) + if ((layoutMap[x] & MAP_METATILE_ID_MASK) != FLOOR_EXIT_METATILE) { map[x] = layoutMap[x]; } -- cgit v1.2.3 From da0687987d8d4f6cb9a331f30553ffb806e74165 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Tue, 26 Feb 2019 22:56:22 -0500 Subject: Pick better names for constants --- src/battle_pyramid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/battle_pyramid.c') diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index 92ff257b0..34da3a25d 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -1267,7 +1267,7 @@ static u8 GetPostBattleDirectionHintTextIndex(int *hintType, u8 minDistanceForEx { for (x = 0; x < 32; x++) { - if ((map[x] & MAP_METATILE_ID_MASK) == FLOOR_EXIT_METATILE) + if ((map[x] & METATILE_ID_MASK) == FLOOR_EXIT_METATILE) { x += 7 - gEventObjects[gSelectedEventObject].initialCoords.x; y += 7 - gEventObjects[gSelectedEventObject].initialCoords.y; @@ -1568,7 +1568,7 @@ void GenerateBattlePyramidFloorLayout(u16 *backupMapData, bool8 setPlayerPositio { for (x = 0; x < mapLayout->width; x++) { - if ((layoutMap[x] & MAP_METATILE_ID_MASK) != FLOOR_EXIT_METATILE) + if ((layoutMap[x] & METATILE_ID_MASK) != FLOOR_EXIT_METATILE) { map[x] = layoutMap[x]; } -- cgit v1.2.3