mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 19:24:16 +01:00
Added budport to the map as a fly destination (temporary map & location)
This commit is contained in:
parent
9951094e81
commit
3bb5951def
@ -1,5 +1,5 @@
|
|||||||
static const u8 sRegionMap_MapSectionLayout[MAP_HEIGHT][MAP_WIDTH] = {
|
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_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_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},
|
{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},
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
{
|
{
|
||||||
"map_section": "MAPSEC_BUDPORT_CITY",
|
"map_section": "MAPSEC_BUDPORT_CITY",
|
||||||
"name": "BUDPORT CITY",
|
"name": "BUDPORT CITY",
|
||||||
"x": 2,
|
"x": 0,
|
||||||
"y": 2,
|
"y": 0,
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"height": 1
|
"height": 1
|
||||||
},
|
},
|
||||||
|
@ -1042,7 +1042,8 @@ static u8 Debug_CheckToggleFlags(u8 id)
|
|||||||
result = FlagGet(FLAG_SYS_B_DASH);
|
result = FlagGet(FLAG_SYS_B_DASH);
|
||||||
break;
|
break;
|
||||||
case DEBUG_FLAGVAR_MENU_ITEM_TOGGLE_LOCATIONS:
|
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_OLDALE_TOWN) &&
|
||||||
FlagGet(FLAG_VISITED_DEWFORD_TOWN) &&
|
FlagGet(FLAG_VISITED_DEWFORD_TOWN) &&
|
||||||
FlagGet(FLAG_VISITED_LAVARIDGE_TOWN) &&
|
FlagGet(FLAG_VISITED_LAVARIDGE_TOWN) &&
|
||||||
@ -1584,6 +1585,7 @@ static void DebugAction_Util_HealParty(u8 taskId)
|
|||||||
}
|
}
|
||||||
static void DebugAction_Util_Fly(u8 taskId)
|
static void DebugAction_Util_Fly(u8 taskId)
|
||||||
{
|
{
|
||||||
|
FlagSet(FLAG_VISITED_BUDPORT_CITY);
|
||||||
FlagSet(FLAG_VISITED_LITTLEROOT_TOWN);
|
FlagSet(FLAG_VISITED_LITTLEROOT_TOWN);
|
||||||
FlagSet(FLAG_VISITED_OLDALE_TOWN);
|
FlagSet(FLAG_VISITED_OLDALE_TOWN);
|
||||||
FlagSet(FLAG_VISITED_DEWFORD_TOWN);
|
FlagSet(FLAG_VISITED_DEWFORD_TOWN);
|
||||||
@ -2380,6 +2382,7 @@ static void DebugAction_FlagsVars_ToggleFlyFlags(u8 taskId)
|
|||||||
{
|
{
|
||||||
PlaySE(SE_PC_OFF);
|
PlaySE(SE_PC_OFF);
|
||||||
|
|
||||||
|
FlagClear(FLAG_VISITED_BUDPORT_CITY);
|
||||||
FlagClear(FLAG_VISITED_LITTLEROOT_TOWN);
|
FlagClear(FLAG_VISITED_LITTLEROOT_TOWN);
|
||||||
FlagClear(FLAG_VISITED_OLDALE_TOWN);
|
FlagClear(FLAG_VISITED_OLDALE_TOWN);
|
||||||
FlagClear(FLAG_VISITED_DEWFORD_TOWN);
|
FlagClear(FLAG_VISITED_DEWFORD_TOWN);
|
||||||
@ -2403,7 +2406,8 @@ static void DebugAction_FlagsVars_ToggleFlyFlags(u8 taskId)
|
|||||||
{
|
{
|
||||||
PlaySE(SE_PC_LOGIN);
|
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_OLDALE_TOWN);
|
||||||
FlagSet(FLAG_VISITED_DEWFORD_TOWN);
|
FlagSet(FLAG_VISITED_DEWFORD_TOWN);
|
||||||
FlagSet(FLAG_VISITED_LAVARIDGE_TOWN);
|
FlagSet(FLAG_VISITED_LAVARIDGE_TOWN);
|
||||||
|
@ -1859,6 +1859,35 @@ static void CreateFlyDestIcons(void)
|
|||||||
x = (x + MAPCURSOR_X_MIN) * 8 + 4;
|
x = (x + MAPCURSOR_X_MIN) * 8 + 4;
|
||||||
y = (y + MAPCURSOR_Y_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)
|
if (width == 2)
|
||||||
shape = SPRITE_SHAPE(16x8);
|
shape = SPRITE_SHAPE(16x8);
|
||||||
else if (height == 2)
|
else if (height == 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user