-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fly from Pokenav #5679
base: upcoming
Are you sure you want to change the base?
Fly from Pokenav #5679
Conversation
Could you also make it work with the Town Map item? |
Currently, you can use the PokeNav to fly while indoors (and I'm assuming other areas where flying is usually not possible). |
include/config/overworld.h
Outdated
#define OW_FLAG_PAUSE_TIME 0 // If this flag is set and OW_USE_FAKE_RTC is enabled, seconds on the in-game clock will not advance. | ||
#define OW_FLAG_NO_ENCOUNTER 0 // If this flag is set, wild encounters will be disabled. | ||
#define OW_FLAG_NO_TRAINER_SEE 0 // If this flag is set, trainers will not battle the player unless they're talked to. | ||
#define OW_FLAG_NO_COLLISION 0 // If this flag is set, the player will be able to walk over tiles with collision. Mainly intended for debugging purposes. | ||
#define OW_FLAG_POKE_RIDER 0 // If this flag is set, the player will be able to use fly from the Pokenav Region Map section by pressing 'R' on a city/location they have been to. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define OW_FLAG_PAUSE_TIME 0 // If this flag is set and OW_USE_FAKE_RTC is enabled, seconds on the in-game clock will not advance. | |
#define OW_FLAG_NO_ENCOUNTER 0 // If this flag is set, wild encounters will be disabled. | |
#define OW_FLAG_NO_TRAINER_SEE 0 // If this flag is set, trainers will not battle the player unless they're talked to. | |
#define OW_FLAG_NO_COLLISION 0 // If this flag is set, the player will be able to walk over tiles with collision. Mainly intended for debugging purposes. | |
#define OW_FLAG_POKE_RIDER 0 // If this flag is set, the player will be able to use fly from the Pokenav Region Map section by pressing 'R' on a city/location they have been to. | |
#define OW_FLAG_PAUSE_TIME 0 // If this flag is set and OW_USE_FAKE_RTC is enabled, seconds on the in-game clock will not advance. | |
#define OW_FLAG_NO_ENCOUNTER 0 // If this flag is set, wild encounters will be disabled. | |
#define OW_FLAG_NO_TRAINER_SEE 0 // If this flag is set, trainers will not battle the player unless they're talked to. | |
#define OW_FLAG_NO_COLLISION 0 // If this flag is set, the player will be able to walk over tiles with collision. Mainly intended for debugging purposes. | |
#define OW_FLAG_POKE_RIDER 0 // If this flag is set, the player will be able to use fly from the Pokenav Region Map section by pressing 'R' on a city/location they have been to. |
Match previous alignment
src/pokenav_region_map.c
Outdated
{ | ||
struct RegionMap* regionMap = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP); | ||
|
||
if (regionMap->mapSecType == MAPSECTYPE_CITY_CANFLY && OW_FLAG_POKE_RIDER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (regionMap->mapSecType == MAPSECTYPE_CITY_CANFLY && OW_FLAG_POKE_RIDER) | |
if (regionMap->mapSecType == MAPSECTYPE_CITY_CANFLY && OW_FLAG_POKE_RIDER && Overworld_MapTypeAllowsTeleportAndFly(gMapHeader.mapType)) |
Handling for prevention of flying indoors etc.
src/pokenav_region_map.c
Outdated
@@ -215,6 +222,9 @@ static u32 HandleRegionMapInput(struct Pokenav_RegionMapMenu *state) | |||
case MAP_INPUT_B_BUTTON: | |||
state->callback = GetExitRegionMapMenuId; | |||
return POKENAV_MAP_FUNC_EXIT; | |||
case MAP_INPUT_R_BUTTON: | |||
if (regionMap->mapSecType == MAPSECTYPE_CITY_CANFLY && OW_FLAG_POKE_RIDER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (regionMap->mapSecType == MAPSECTYPE_CITY_CANFLY && OW_FLAG_POKE_RIDER) | |
if (regionMap->mapSecType == MAPSECTYPE_CITY_CANFLY && OW_FLAG_POKE_RIDER && Overworld_MapTypeAllowsTeleportAndFly(gMapHeader.mapType) == TRUE) |
addressed @hedara90's comments, looking into the town map item functionality now! |
…kenav_region_map.c
added the prompt for flying from the town map. it replaces |
Lets the player press 'R' over locations they have visited to fly to them from the PokeNav Region Map.
Description
CB_ExitFlyMap()
to allow setting the fly destination correctly from other filesOW_FLAG_POKE_RIDER
to allow this feature to be disabledgSkipShowMonAnim
as an EWRAM variable to control whether the ShowMon animation plays or notpokenav_region_map.c
to handle flyingUpdateRegionMapHelpBarText()
so the HelpBarText can be easily synced with cursor movement and loading the map from the menuProcessRegionMapInput_*
functions#includes
and changed some static functions to non-static so they could be declared in the header filesremade the branch and manually copy-pasted the correct changes. cleaned, compiled, tested.
Feature(s) this PR does NOT handle:
Adding other interactions in the overworld to handle other HM moves, this is specifically for
Fly
Discord contact info
@khbsd