-
Notifications
You must be signed in to change notification settings - Fork 145
document battle regulations #833
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
base: main
Are you sure you want to change the base?
Conversation
src/battle_regulation.c
Outdated
|
|
||
| if (index < NELEMS(BattleRegulation_PredefinedRules)) { | ||
| messageLoader = MessageLoader_Init(MSG_LOADER_PRELOAD_ENTIRE_BANK, NARC_INDEX_MSGDATA__PL_MSG, TEXT_BANK_UNK_0353, heapID); | ||
| MessageLoader_GetStrbuf(messageLoader, 70 + index, strbuf); |
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.
polish: Use a constant-ref from the text-bank header for 70.
src/battle_regulation_validation.c
Outdated
| HeightWeightData *HeightWeightData_Load(enum HeapID heapID) | ||
| { | ||
| HeightWeightData *data = Pokedex_HeightWeightData(heapID); | ||
| Pokedex_HeightWeightData_Load(data, FALSE, heapID); | ||
| return data; | ||
| } | ||
|
|
||
| void HeightWeightData_Free(HeightWeightData *heightWeightData) | ||
| { | ||
| Pokedex_HeightWeightData_Release(heightWeightData); | ||
| Pokedex_HeightWeightData_Free(heightWeightData); | ||
| } |
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.
thought: Should we separate these into their own TU, if that matches?
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.
maybe. they're general-use functions in a vacuum, but in practice are only ever used for HeightWeightData that get passed into other functions in this file. an alternative could be renaming them to BattleRegulation_(Load/Free)HeightWeightData
splitting them out does still match, fwiw
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.
I think tying them to regulation is probably a mistake.
they're general-use functions in a vacuum, but in practice are only ever used for HeightWeightData that get passed into other functions in this file.
You certain about that? There are some instances in party_menu/main.c.
lhearachel
left a comment
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.
Pending merge conflicts
8f23bf3 to
966f0f5
Compare
rebase of #775 with pr feedback addressed