WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@scbroede
Copy link
Collaborator

rebase of #775 with pr feedback addressed


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);
Copy link
Collaborator

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.

Comment on lines 15 to 26
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);
}
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

Copy link
Collaborator

@lhearachel lhearachel Nov 26, 2025

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.

Copy link
Collaborator

@lhearachel lhearachel left a comment

Choose a reason for hiding this comment

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

Pending merge conflicts

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.

3 participants