Added budport to the map as a fly destination (temporary map & location)

This commit is contained in:
Ninjdai 2023-11-12 03:41:25 +01:00
parent 9951094e81
commit 3bb5951def
4 changed files with 38 additions and 5 deletions

View File

@ -1,5 +1,5 @@
static const u8 sRegionMap_MapSectionLayout[MAP_HEIGHT][MAP_WIDTH] = {
{MAPSEC_NONE, MAPSEC_ROUTE_114, MAPSEC_ROUTE_114, MAPSEC_FALLARBOR_TOWN, MAPSEC_ROUTE_113, MAPSEC_ROUTE_113, MAPSEC_ROUTE_113, MAPSEC_ROUTE_113, MAPSEC_ROUTE_111, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_119, MAPSEC_FORTREE_CITY, MAPSEC_ROUTE_120, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
{MAPSEC_BUDPORT_CITY, MAPSEC_ROUTE_114, MAPSEC_ROUTE_114, MAPSEC_FALLARBOR_TOWN, MAPSEC_ROUTE_113, MAPSEC_ROUTE_113, MAPSEC_ROUTE_113, MAPSEC_ROUTE_113, MAPSEC_ROUTE_111, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_119, MAPSEC_FORTREE_CITY, MAPSEC_ROUTE_120, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
{MAPSEC_NONE, MAPSEC_ROUTE_114, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_MT_CHIMNEY, MAPSEC_MT_CHIMNEY, MAPSEC_ROUTE_111, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_119, MAPSEC_NONE, MAPSEC_ROUTE_120, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
{MAPSEC_ROUTE_115, MAPSEC_ROUTE_114, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_MT_CHIMNEY, MAPSEC_MT_CHIMNEY, MAPSEC_ROUTE_111, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_119, MAPSEC_NONE, MAPSEC_ROUTE_120, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_SAFARI_ZONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
{MAPSEC_ROUTE_115, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_LAVARIDGE_TOWN, MAPSEC_ROUTE_112, MAPSEC_ROUTE_112, MAPSEC_ROUTE_111, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_119, MAPSEC_NONE, MAPSEC_ROUTE_120, MAPSEC_ROUTE_121, MAPSEC_ROUTE_121, MAPSEC_ROUTE_121, MAPSEC_ROUTE_121, MAPSEC_LILYCOVE_CITY, MAPSEC_LILYCOVE_CITY, MAPSEC_ROUTE_124, MAPSEC_ROUTE_124, MAPSEC_ROUTE_124, MAPSEC_ROUTE_124, MAPSEC_ROUTE_125, MAPSEC_ROUTE_125, MAPSEC_NONE, MAPSEC_NONE},

View File

@ -3,8 +3,8 @@
{
"map_section": "MAPSEC_BUDPORT_CITY",
"name": "BUDPORT CITY",
"x": 2,
"y": 2,
"x": 0,
"y": 0,
"width": 1,
"height": 1
},

View File

@ -1042,7 +1042,8 @@ static u8 Debug_CheckToggleFlags(u8 id)
result = FlagGet(FLAG_SYS_B_DASH);
break;
case DEBUG_FLAGVAR_MENU_ITEM_TOGGLE_LOCATIONS:
result = FlagGet(FLAG_VISITED_LITTLEROOT_TOWN) &&
result =FlagGet(FLAG_VISITED_BUDPORT_CITY) &&
FlagGet(FLAG_VISITED_LITTLEROOT_TOWN) &&
FlagGet(FLAG_VISITED_OLDALE_TOWN) &&
FlagGet(FLAG_VISITED_DEWFORD_TOWN) &&
FlagGet(FLAG_VISITED_LAVARIDGE_TOWN) &&
@ -1584,6 +1585,7 @@ static void DebugAction_Util_HealParty(u8 taskId)
}
static void DebugAction_Util_Fly(u8 taskId)
{
FlagSet(FLAG_VISITED_BUDPORT_CITY);
FlagSet(FLAG_VISITED_LITTLEROOT_TOWN);
FlagSet(FLAG_VISITED_OLDALE_TOWN);
FlagSet(FLAG_VISITED_DEWFORD_TOWN);
@ -2380,6 +2382,7 @@ static void DebugAction_FlagsVars_ToggleFlyFlags(u8 taskId)
{
PlaySE(SE_PC_OFF);
FlagClear(FLAG_VISITED_BUDPORT_CITY);
FlagClear(FLAG_VISITED_LITTLEROOT_TOWN);
FlagClear(FLAG_VISITED_OLDALE_TOWN);
FlagClear(FLAG_VISITED_DEWFORD_TOWN);
@ -2403,7 +2406,8 @@ static void DebugAction_FlagsVars_ToggleFlyFlags(u8 taskId)
{
PlaySE(SE_PC_LOGIN);
FlagSet(FLAG_VISITED_LITTLEROOT_TOWN);
FlagSet(FLAG_VISITED_BUDPORT_CITY);
FlagClear(FLAG_VISITED_LITTLEROOT_TOWN);
FlagSet(FLAG_VISITED_OLDALE_TOWN);
FlagSet(FLAG_VISITED_DEWFORD_TOWN);
FlagSet(FLAG_VISITED_LAVARIDGE_TOWN);

View File

@ -1859,6 +1859,35 @@ static void CreateFlyDestIcons(void)
x = (x + MAPCURSOR_X_MIN) * 8 + 4;
y = (y + MAPCURSOR_Y_MIN) * 8 + 4;
if (width == 2)
shape = SPRITE_SHAPE(16x8);
else if (height == 2)
shape = SPRITE_SHAPE(8x16);
else
shape = SPRITE_SHAPE(8x8);
spriteId = CreateSprite(&sFlyDestIconSpriteTemplate, x, y, 10);
if (spriteId != MAX_SPRITES)
{
gSprites[spriteId].oam.shape = shape;
if (FlagGet(canFlyFlag))
gSprites[spriteId].callback = SpriteCB_FlyDestIcon;
else
shape += 3;
StartSpriteAnim(&gSprites[spriteId], shape);
gSprites[spriteId].sIconMapSec = mapSecId;
}
canFlyFlag++;
}
canFlyFlag = FLAG_VISITED_BUDPORT_CITY;
for (mapSecId = MAPSEC_BUDPORT_CITY; mapSecId <= MAPSEC_BUDPORT_CITY; mapSecId++)
{
GetMapSecDimensions(mapSecId, &x, &y, &width, &height);
x = (x + MAPCURSOR_X_MIN) * 8 + 4;
y = (y + MAPCURSOR_Y_MIN) * 8 + 4;
if (width == 2)
shape = SPRITE_SHAPE(16x8);
else if (height == 2)