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

Generate MAPSEC constants from JSON #2063

Merged
merged 2 commits into from
Nov 23, 2024

Conversation

GriffinRichards
Copy link
Member

We already have the names and order of the MAPSEC values in region_map_sections.json, so we can generate the constants automatically when we process this file. As a bonus we'll put them in an enum to ensure MAPSEC_NONE / MAPSEC_COUNT will be updated as values are added or removed.

The only necessary changes are to json_data_rules.mk and to the new region_map_sections.constants.json.txt file. The changes to region_map_sections.json and region_map_sections.json.txt are motivated by pokefirered (to support elements in that JSON file that will only specify id, and so will only output the constant and not any C data)

@GriffinRichards GriffinRichards merged commit cc388ef into pret:porymap-6 Nov 23, 2024
1 check passed
@GriffinRichards GriffinRichards deleted the region-map-sections branch November 23, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant