diff options
Diffstat (limited to 'src/region_map.c')
-rw-r--r-- | src/region_map.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/region_map.c b/src/region_map.c index 3a902ec0e..f97d67ffc 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -3471,7 +3471,7 @@ static void GetPlayerPositionOnRegionMap(void) const struct MapHeader * mapHeader; struct WarpData * warp; - switch (get_map_light_level_by_bank_and_number(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum)) + switch (GetMapTypeByGroupAndId(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum)) { default: case 1: @@ -3495,12 +3495,12 @@ static void GetPlayerPositionOnRegionMap(void) y = gSaveBlock1Ptr->escapeWarp.y; break; case 9: - mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1Ptr->warp2.mapGroup, gSaveBlock1Ptr->warp2.mapNum); + mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1Ptr->dynamicWarp.mapGroup, gSaveBlock1Ptr->dynamicWarp.mapNum); gUnknown_20399E4->field_014 = mapHeader->regionMapSectionId; width = mapHeader->mapLayout->width; height = mapHeader->mapLayout->height; - x = gSaveBlock1Ptr->warp2.x; - y = gSaveBlock1Ptr->warp2.y; + x = gSaveBlock1Ptr->dynamicWarp.x; + y = gSaveBlock1Ptr->dynamicWarp.y; break; case 8: if ((gUnknown_20399E4->field_014 = gMapHeader.regionMapSectionId) != MAPSEC_SPECIAL_AREA) @@ -3510,7 +3510,7 @@ static void GetPlayerPositionOnRegionMap(void) } else { - warp = &gSaveBlock1Ptr->warp2; + warp = &gSaveBlock1Ptr->dynamicWarp; mapHeader = Overworld_GetMapHeaderByGroupAndId(warp->mapGroup, warp->mapNum); gUnknown_20399E4->field_014 = mapHeader->regionMapSectionId; } @@ -4318,7 +4318,7 @@ static void sub_80C4F08(u8 taskId) case 4: if ((sub_80C3AC8(0) == 2 || sub_80C3AC8(0) == 4) && GetRegionMapPermission(MAPPERM_3) == TRUE) { - switch (get_map_light_level_by_bank_and_number(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum)) + switch (GetMapTypeByGroupAndId(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum)) { case 4: case 8: @@ -4388,7 +4388,7 @@ static void sub_80C527C(u16 mapsec) u16 idx = mapsec - MAPSECS_KANTO; if (sMapsecToSpawn[idx][2]) { - sub_805546C(sMapsecToSpawn[idx][2]); + SetWarpDestinationToHealLocation(sMapsecToSpawn[idx][2]); SetUsedFlyQuestLogEvent(sMapsecToSpawn[idx]); } else |