Skip to content
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

Adds Dexnav #4818

Merged
merged 70 commits into from
Jan 3, 2025
Merged

Adds Dexnav #4818

merged 70 commits into from
Jan 3, 2025

Conversation

ghoulslash
Copy link
Collaborator

Merges in my dexnav branch with some rhh specific tweaks.

  • shininess is determined within CreateBoxMon instead of separately. Its still a custom function since the shiny rate is modified by the dexnav, but should not mess with any other shiny changes
  • Added include/config/dexnav.h with a flag to use search levels or not as well as other customizable settings

Everything is more or less kept the same

hidden
cave
grass
surf

ghoulslash and others added 30 commits April 2, 2021 12:28
This makes so the msgbox doesn't move in the Y coordinate if the map popup was previously playing.
Copy link
Collaborator Author

@ghoulslash ghoulslash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure I got all the other comments taken care of. ready for another review

@@ -200,6 +204,7 @@ static const struct MenuAction sStartMenuItems[] =
[MENU_ACTION_RETIRE_FRONTIER] = {gText_MenuRetire, {.u8_void = StartMenuBattlePyramidRetireCallback}},
[MENU_ACTION_PYRAMID_BAG] = {gText_MenuBag, {.u8_void = StartMenuBattlePyramidBagCallback}},
[MENU_ACTION_DEBUG] = {sText_MenuDebug, {.u8_void = StartMenuDebugCallback}},
[MENU_ACTION_DEXNAV] = {gText_MenuDexNav, {.u8_void = StartMenuDexNavCallback}},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FLAG_SYS_DEXNAV_GET needs to be set for it to show up so it does not overflow by default. I will add a comment about that here. The code needs to exist as a reference for the entry point of the GUI, also

src/wild_encounter.c Show resolved Hide resolved
Copy link
Collaborator

@Bassoonian Bassoonian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still a bunch of comments in dexnav.c that need to be looked at

data/scripts/dexnav.inc Show resolved Hide resolved
include/constants/flags.h Outdated Show resolved Hide resolved
@Bassoonian Bassoonian modified the milestones: 1.10, 1.11 Oct 30, 2024
@ghoulslash
Copy link
Collaborator Author

Should have all reviews handled now

Comment on lines 8 to 12
#define FLAG_SYS_DEXNAV_SEARCH 0 // Searching for mon
#define FLAG_SYS_DEXNAV_GET 0 // Dexnav shows in start menu
#define FLAG_SYS_DETECTOR_MODE 0 // Allow player to find hidden mons
#define VAR_DEXNAV_SPECIES 0 // Registered dexnav species
#define VAR_DEXNAV_STEP_COUNTER 0 // Steps for finding hidden pokemon
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final request before we merge this in: these five are all needed if DexNav is enabled, which means we should probably add a static assert to make sure these are set before people complain about UB related to exactly this. Thoughts?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already done. Those exist at the top of dexnav.c except FLAG_SYS_DEXNAV_GET since adding it to the start menu is not required for the implementation

ready for review

src/start_menu.c Outdated Show resolved Hide resolved
src/pokemon.c Outdated Show resolved Hide resolved
@Bassoonian Bassoonian merged commit 9199b6f into rh-hideout:upcoming Jan 3, 2025
1 check passed
@ghoulslash ghoulslash deleted the rhh/dexnav branch January 3, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Adds a feature type: feature branch merge Update from feature branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants