Skip to content

Commit

Permalink
Fix defines in MAP_NUM and MAP_GROUP
Browse files Browse the repository at this point in the history
  • Loading branch information
Bassoonian committed Aug 14, 2024
1 parent a3d5f54 commit 5fefd74
Show file tree
Hide file tree
Showing 34 changed files with 452 additions and 451 deletions.
4 changes: 2 additions & 2 deletions data/maps/BirthIsland_Exterior/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ BirthIsland_Exterior_EventScript_Complete::
BirthIsland_Exterior_EventScript_Deoxys::
waitse
setfieldeffectargument 0, LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK
setfieldeffectargument 1, MAP_NUM(BIRTH_ISLAND_EXTERIOR)
setfieldeffectargument 2, MAP_GROUP(BIRTH_ISLAND_EXTERIOR)
setfieldeffectargument 1, MAP_NUM(MAP_BIRTH_ISLAND_EXTERIOR)
setfieldeffectargument 2, MAP_GROUP(MAP_BIRTH_ISLAND_EXTERIOR)
dofieldeffect FLDEFF_DESTROY_DEOXYS_ROCK
playbgm MUS_RG_ENCOUNTER_DEOXYS, FALSE
waitfieldeffect FLDEFF_DESTROY_DEOXYS_ROCK
Expand Down
4 changes: 2 additions & 2 deletions include/constants/maps.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#define MAP_UNDEFINED (0xFF | (0xFF << 8))

#define MAP_GROUP(map) (MAP_##map >> 8)
#define MAP_NUM(map) (MAP_##map & 0xFF)
#define MAP_GROUP(map) (map >> 8)
#define MAP_NUM(map) (map & 0xFF)

// IDs for dynamic warps. Both are used in the dest_warp_id field for warp events, but they
// are never read in practice. A dest_map of MAP_DYNAMIC is used to indicate that a
Expand Down
2 changes: 1 addition & 1 deletion src/battle_pyramid.c
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@ static bool8 TrySetPyramidObjectEventPositionAtCoords(u8 objType, u8 x, u8 y, u8
const struct MapHeader *mapHeader;
struct ObjectEventTemplate *floorEvents = gSaveBlock1Ptr->objectEventTemplates;

mapHeader = Overworld_GetMapHeaderByGroupAndId(MAP_GROUP(BATTLE_PYRAMID_SQUARE01), floorLayoutOffsets[squareId] + MAP_NUM(BATTLE_PYRAMID_SQUARE01));
mapHeader = Overworld_GetMapHeaderByGroupAndId(MAP_GROUP(MAP_BATTLE_PYRAMID_SQUARE01), floorLayoutOffsets[squareId] + MAP_NUM(MAP_BATTLE_PYRAMID_SQUARE01));
for (i = 0; i < mapHeader->events->objectEventCount; i++)
{
if (mapHeader->events->objectEvents[i].x != x || mapHeader->events->objectEvents[i].y != y)
Expand Down
158 changes: 79 additions & 79 deletions src/battle_setup.c

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions src/braille_puzzles.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ static void DoBrailleRegisteelEffect(void);
bool8 ShouldDoBrailleDigEffect(void)
{
if (!FlagGet(FLAG_SYS_BRAILLE_DIG)
&& (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(SEALED_CHAMBER_OUTER_ROOM)
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(SEALED_CHAMBER_OUTER_ROOM)))
&& (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(MAP_SEALED_CHAMBER_OUTER_ROOM)
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(MAP_SEALED_CHAMBER_OUTER_ROOM)))
{
if (gSaveBlock1Ptr->pos.x == 10 && gSaveBlock1Ptr->pos.y == 3)
return TRUE;
Expand Down Expand Up @@ -167,8 +167,8 @@ static void Task_SealedChamberShakingEffect(u8 taskId)
bool8 ShouldDoBrailleRegirockEffect(void)
{
if (!FlagGet(FLAG_SYS_REGIROCK_PUZZLE_COMPLETED)
&& gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(DESERT_RUINS)
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(DESERT_RUINS))
&& gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(MAP_DESERT_RUINS)
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(MAP_DESERT_RUINS))
{
if (gSaveBlock1Ptr->pos.x == 6 && gSaveBlock1Ptr->pos.y == 23)
{
Expand Down Expand Up @@ -218,7 +218,7 @@ static void DoBrailleRegirockEffect(void)

bool8 ShouldDoBrailleRegisteelEffect(void)
{
if (!FlagGet(FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED) && (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ANCIENT_TOMB) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(ANCIENT_TOMB)))
if (!FlagGet(FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED) && (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(MAP_ANCIENT_TOMB) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(MAP_ANCIENT_TOMB)))
{
if (gSaveBlock1Ptr->pos.x == 8 && gSaveBlock1Ptr->pos.y == 25)
{
Expand Down Expand Up @@ -284,8 +284,8 @@ bool8 ShouldDoBrailleRegicePuzzle(void)
{
u8 i;

if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ISLAND_CAVE)
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(ISLAND_CAVE))
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(MAP_ISLAND_CAVE)
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(MAP_ISLAND_CAVE))
{
if (FlagGet(FLAG_SYS_BRAILLE_REGICE_COMPLETED))
return FALSE;
Expand Down
44 changes: 22 additions & 22 deletions src/data/heal_locations.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
static const struct HealLocation sHealLocations[] =
{
[HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F - 1] = {MAP_GROUP(LITTLEROOT_TOWN_BRENDANS_HOUSE_2F), MAP_NUM(LITTLEROOT_TOWN_BRENDANS_HOUSE_2F), 4, 2},
[HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F - 1] = {MAP_GROUP(LITTLEROOT_TOWN_MAYS_HOUSE_2F), MAP_NUM(LITTLEROOT_TOWN_MAYS_HOUSE_2F), 4, 2},
[HEAL_LOCATION_PETALBURG_CITY - 1] = {MAP_GROUP(PETALBURG_CITY), MAP_NUM(PETALBURG_CITY), 20, 17},
[HEAL_LOCATION_SLATEPORT_CITY - 1] = {MAP_GROUP(SLATEPORT_CITY), MAP_NUM(SLATEPORT_CITY), 19, 20},
[HEAL_LOCATION_MAUVILLE_CITY - 1] = {MAP_GROUP(MAUVILLE_CITY), MAP_NUM(MAUVILLE_CITY), 22, 6},
[HEAL_LOCATION_RUSTBORO_CITY - 1] = {MAP_GROUP(RUSTBORO_CITY), MAP_NUM(RUSTBORO_CITY), 16, 39},
[HEAL_LOCATION_FORTREE_CITY - 1] = {MAP_GROUP(FORTREE_CITY), MAP_NUM(FORTREE_CITY), 5, 7},
[HEAL_LOCATION_LILYCOVE_CITY - 1] = {MAP_GROUP(LILYCOVE_CITY), MAP_NUM(LILYCOVE_CITY), 24, 15},
[HEAL_LOCATION_MOSSDEEP_CITY - 1] = {MAP_GROUP(MOSSDEEP_CITY), MAP_NUM(MOSSDEEP_CITY), 28, 17},
[HEAL_LOCATION_SOOTOPOLIS_CITY - 1] = {MAP_GROUP(SOOTOPOLIS_CITY), MAP_NUM(SOOTOPOLIS_CITY), 43, 32},
[HEAL_LOCATION_EVER_GRANDE_CITY - 1] = {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), 27, 49},
[HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE - 1] = {MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), 5, 9},
[HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE - 1] = {MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), 14, 9},
[HEAL_LOCATION_OLDALE_TOWN - 1] = {MAP_GROUP(OLDALE_TOWN), MAP_NUM(OLDALE_TOWN), 6, 17},
[HEAL_LOCATION_DEWFORD_TOWN - 1] = {MAP_GROUP(DEWFORD_TOWN), MAP_NUM(DEWFORD_TOWN), 2, 11},
[HEAL_LOCATION_LAVARIDGE_TOWN - 1] = {MAP_GROUP(LAVARIDGE_TOWN), MAP_NUM(LAVARIDGE_TOWN), 9, 7},
[HEAL_LOCATION_FALLARBOR_TOWN - 1] = {MAP_GROUP(FALLARBOR_TOWN), MAP_NUM(FALLARBOR_TOWN), 14, 8},
[HEAL_LOCATION_VERDANTURF_TOWN - 1] = {MAP_GROUP(VERDANTURF_TOWN), MAP_NUM(VERDANTURF_TOWN), 16, 4},
[HEAL_LOCATION_PACIFIDLOG_TOWN - 1] = {MAP_GROUP(PACIFIDLOG_TOWN), MAP_NUM(PACIFIDLOG_TOWN), 8, 16},
[HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE - 1] = {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), 18, 6},
[HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR - 1] = {MAP_GROUP(SOUTHERN_ISLAND_EXTERIOR), MAP_NUM(SOUTHERN_ISLAND_EXTERIOR), 15, 20},
[HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST - 1] = {MAP_GROUP(BATTLE_FRONTIER_OUTSIDE_EAST), MAP_NUM(BATTLE_FRONTIER_OUTSIDE_EAST), 3, 52},
[HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F - 1] = {MAP_GROUP(MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F), MAP_NUM(MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F), 4, 2},
[HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F - 1] = {MAP_GROUP(MAP_LITTLEROOT_TOWN_MAYS_HOUSE_2F), MAP_NUM(MAP_LITTLEROOT_TOWN_MAYS_HOUSE_2F), 4, 2},
[HEAL_LOCATION_PETALBURG_CITY - 1] = {MAP_GROUP(MAP_PETALBURG_CITY), MAP_NUM(MAP_PETALBURG_CITY), 20, 17},
[HEAL_LOCATION_SLATEPORT_CITY - 1] = {MAP_GROUP(MAP_SLATEPORT_CITY), MAP_NUM(MAP_SLATEPORT_CITY), 19, 20},
[HEAL_LOCATION_MAUVILLE_CITY - 1] = {MAP_GROUP(MAP_MAUVILLE_CITY), MAP_NUM(MAP_MAUVILLE_CITY), 22, 6},
[HEAL_LOCATION_RUSTBORO_CITY - 1] = {MAP_GROUP(MAP_RUSTBORO_CITY), MAP_NUM(MAP_RUSTBORO_CITY), 16, 39},
[HEAL_LOCATION_FORTREE_CITY - 1] = {MAP_GROUP(MAP_FORTREE_CITY), MAP_NUM(MAP_FORTREE_CITY), 5, 7},
[HEAL_LOCATION_LILYCOVE_CITY - 1] = {MAP_GROUP(MAP_LILYCOVE_CITY), MAP_NUM(MAP_LILYCOVE_CITY), 24, 15},
[HEAL_LOCATION_MOSSDEEP_CITY - 1] = {MAP_GROUP(MAP_MOSSDEEP_CITY), MAP_NUM(MAP_MOSSDEEP_CITY), 28, 17},
[HEAL_LOCATION_SOOTOPOLIS_CITY - 1] = {MAP_GROUP(MAP_SOOTOPOLIS_CITY), MAP_NUM(MAP_SOOTOPOLIS_CITY), 43, 32},
[HEAL_LOCATION_EVER_GRANDE_CITY - 1] = {MAP_GROUP(MAP_EVER_GRANDE_CITY), MAP_NUM(MAP_EVER_GRANDE_CITY), 27, 49},
[HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE - 1] = {MAP_GROUP(MAP_LITTLEROOT_TOWN), MAP_NUM(MAP_LITTLEROOT_TOWN), 5, 9},
[HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE - 1] = {MAP_GROUP(MAP_LITTLEROOT_TOWN), MAP_NUM(MAP_LITTLEROOT_TOWN), 14, 9},
[HEAL_LOCATION_OLDALE_TOWN - 1] = {MAP_GROUP(MAP_OLDALE_TOWN), MAP_NUM(MAP_OLDALE_TOWN), 6, 17},
[HEAL_LOCATION_DEWFORD_TOWN - 1] = {MAP_GROUP(MAP_DEWFORD_TOWN), MAP_NUM(MAP_DEWFORD_TOWN), 2, 11},
[HEAL_LOCATION_LAVARIDGE_TOWN - 1] = {MAP_GROUP(MAP_LAVARIDGE_TOWN), MAP_NUM(MAP_LAVARIDGE_TOWN), 9, 7},
[HEAL_LOCATION_FALLARBOR_TOWN - 1] = {MAP_GROUP(MAP_FALLARBOR_TOWN), MAP_NUM(MAP_FALLARBOR_TOWN), 14, 8},
[HEAL_LOCATION_VERDANTURF_TOWN - 1] = {MAP_GROUP(MAP_VERDANTURF_TOWN), MAP_NUM(MAP_VERDANTURF_TOWN), 16, 4},
[HEAL_LOCATION_PACIFIDLOG_TOWN - 1] = {MAP_GROUP(MAP_PACIFIDLOG_TOWN), MAP_NUM(MAP_PACIFIDLOG_TOWN), 8, 16},
[HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE - 1] = {MAP_GROUP(MAP_EVER_GRANDE_CITY), MAP_NUM(MAP_EVER_GRANDE_CITY), 18, 6},
[HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR - 1] = {MAP_GROUP(MAP_SOUTHERN_ISLAND_EXTERIOR), MAP_NUM(MAP_SOUTHERN_ISLAND_EXTERIOR), 15, 20},
[HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST - 1] = {MAP_GROUP(MAP_BATTLE_FRONTIER_OUTSIDE_EAST), MAP_NUM(MAP_BATTLE_FRONTIER_OUTSIDE_EAST), 3, 52},
};
1 change: 1 addition & 0 deletions src/data/map_group_count.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
static const u8 MAP_GROUP_COUNT[] = {57, 5, 5, 6, 7, 8, 9, 7, 7, 14, 8, 17, 10, 23, 13, 15, 15, 2, 2, 2, 3, 1, 1, 1, 108, 61, 89, 2, 1, 13, 1, 1, 3, 1, 0};
8 changes: 4 additions & 4 deletions src/data/wild_encounters.json.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ const struct WildPokemonHeader {{ wild_encounter_group.label }}[] =
{
## for encounter in wild_encounter_group.encounters
{
.mapGroup = {% if wild_encounter_group.for_maps %}MAP_GROUP({{ removePrefix(encounter.map, "MAP_") }}){% else %}0{% endif %},
.mapNum = {% if wild_encounter_group.for_maps %}MAP_NUM({{ removePrefix(encounter.map, "MAP_") }}){% else %}{{ loop.index1 }}{% endif %},
.mapGroup = {% if wild_encounter_group.for_maps %}MAP_GROUP(MAP_{{ removePrefix(encounter.map, "MAP_") }}){% else %}0{% endif %},
.mapNum = {% if wild_encounter_group.for_maps %}MAP_NUM(MAP_{{ removePrefix(encounter.map, "MAP_") }}){% else %}{{ loop.index1 }}{% endif %},
.landMonsInfo = {% if existsIn(encounter, "land_mons") %}&{{ encounter.base_label }}_LandMonsInfo{% else %}NULL{% endif %},
.waterMonsInfo = {% if existsIn(encounter, "water_mons") %}&{{ encounter.base_label }}_WaterMonsInfo{% else %}NULL{% endif %},
.rockSmashMonsInfo = {% if existsIn(encounter, "rock_smash_mons") %}&{{ encounter.base_label }}_RockSmashMonsInfo{% else %}NULL{% endif %},
.fishingMonsInfo = {% if existsIn(encounter, "fishing_mons") %}&{{ encounter.base_label }}_FishingMonsInfo{% else %}NULL{% endif %},
},
## endfor
{
.mapGroup = MAP_GROUP(UNDEFINED),
.mapNum = MAP_NUM(UNDEFINED),
.mapGroup = MAP_GROUP(MAP_UNDEFINED),
.mapNum = MAP_NUM(MAP_UNDEFINED),
.landMonsInfo = NULL,
.waterMonsInfo = NULL,
.rockSmashMonsInfo = NULL,
Expand Down
4 changes: 2 additions & 2 deletions src/event_object_movement.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,8 +1172,8 @@ static void ClearObjectEvent(struct ObjectEvent *objectEvent)
{
*objectEvent = (struct ObjectEvent){};
objectEvent->localId = OBJ_EVENT_ID_PLAYER;
objectEvent->mapNum = MAP_NUM(UNDEFINED);
objectEvent->mapGroup = MAP_GROUP(UNDEFINED);
objectEvent->mapNum = MAP_NUM(MAP_UNDEFINED);
objectEvent->mapGroup = MAP_GROUP(MAP_UNDEFINED);
objectEvent->movementActionId = MOVEMENT_ACTION_NONE;
}

Expand Down
12 changes: 6 additions & 6 deletions src/faraway_island.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ static u8 GetValidMewMoveDirection(u8 ignoredDir)
void UpdateFarawayIslandStepCounter(void)
{
u16 steps = VarGet(VAR_FARAWAY_ISLAND_STEP_COUNTER);
if (gSaveBlock1Ptr->location.mapNum == MAP_NUM(FARAWAY_ISLAND_INTERIOR)
&& gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(FARAWAY_ISLAND_INTERIOR))
if (gSaveBlock1Ptr->location.mapNum == MAP_NUM(MAP_FARAWAY_ISLAND_INTERIOR)
&& gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(MAP_FARAWAY_ISLAND_INTERIOR))
{
steps++;
if (steps >= 9999)
Expand All @@ -334,8 +334,8 @@ void UpdateFarawayIslandStepCounter(void)

bool8 ObjectEventIsFarawayIslandMew(struct ObjectEvent *objectEvent)
{
if (gSaveBlock1Ptr->location.mapNum == MAP_NUM(FARAWAY_ISLAND_INTERIOR)
&& gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(FARAWAY_ISLAND_INTERIOR))
if (gSaveBlock1Ptr->location.mapNum == MAP_NUM(MAP_FARAWAY_ISLAND_INTERIOR)
&& gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(MAP_FARAWAY_ISLAND_INTERIOR))
{
if (objectEvent->graphicsId == OBJ_EVENT_GFX_MEW)
return TRUE;
Expand All @@ -346,8 +346,8 @@ bool8 ObjectEventIsFarawayIslandMew(struct ObjectEvent *objectEvent)

bool8 IsMewPlayingHideAndSeek(void)
{
if (gSaveBlock1Ptr->location.mapNum == MAP_NUM(FARAWAY_ISLAND_INTERIOR)
&& gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(FARAWAY_ISLAND_INTERIOR))
if (gSaveBlock1Ptr->location.mapNum == MAP_NUM(MAP_FARAWAY_ISLAND_INTERIOR)
&& gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(MAP_FARAWAY_ISLAND_INTERIOR))
{
if (FlagGet(FLAG_CAUGHT_MEW) != TRUE && FlagGet(FLAG_HIDE_MEW) != TRUE)
return TRUE;
Expand Down
4 changes: 2 additions & 2 deletions src/field_control_avatar.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ static void SetupWarp(struct MapHeader *unused, s8 warpEventId, struct MapPositi
warpEvent = &gMapHeader.events->warps[warpEventId];
}

if (warpEvent->mapNum == MAP_NUM(DYNAMIC))
if (warpEvent->mapNum == MAP_NUM(MAP_DYNAMIC))
{
SetWarpDestinationToDynamicWarp(warpEvent->warpId);
}
Expand All @@ -825,7 +825,7 @@ static void SetupWarp(struct MapHeader *unused, s8 warpEventId, struct MapPositi
SetWarpDestinationToMapWarp(warpEvent->mapGroup, warpEvent->mapNum, warpEvent->warpId);
UpdateEscapeWarp(position->x, position->y);
mapHeader = Overworld_GetMapHeaderByGroupAndId(warpEvent->mapGroup, warpEvent->mapNum);
if (mapHeader->events->warps[warpEvent->warpId].mapNum == MAP_NUM(DYNAMIC))
if (mapHeader->events->warps[warpEvent->warpId].mapNum == MAP_NUM(MAP_DYNAMIC))
SetDynamicWarp(mapHeader->events->warps[warpEventId].warpId, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, warpEventId);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/field_door.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,8 @@ static bool8 ShouldUseMultiCorridorDoor(void)
{
if (FlagGet(FLAG_ENABLE_MULTI_CORRIDOR_DOOR))
{
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR)
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR))
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR)
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR))
{
return TRUE;
}
Expand Down
2 changes: 1 addition & 1 deletion src/field_player_avatar.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ bool8 IsPlayerCollidingWithFarawayIslandMew(u8 direction)
playerY = object->currentCoords.y;

MoveCoords(direction, &playerX, &playerY);
mewObjectId = GetObjectEventIdByLocalIdAndMap(1, MAP_NUM(FARAWAY_ISLAND_INTERIOR), MAP_GROUP(FARAWAY_ISLAND_INTERIOR));
mewObjectId = GetObjectEventIdByLocalIdAndMap(1, MAP_NUM(MAP_FARAWAY_ISLAND_INTERIOR), MAP_GROUP(MAP_FARAWAY_ISLAND_INTERIOR));
if (mewObjectId == OBJECT_EVENTS_COUNT)
return FALSE;

Expand Down
Loading

0 comments on commit 5fefd74

Please sign in to comment.