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

Match some register nonmatchings #247

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

DizzyEggg
Copy link
Contributor

No description provided.

playerStruct->isTeamLeader = FALSE;
pokeStruct2->isTeamLeader = TRUE;
newLeader->isTeamLeader = TRUE;
nullsub_104();
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be cool to make a comment at nullsub_104 stating it's called when the team leader is changed by the player. Eventually when we are at documentation, it'll be cool to see what all the nullsubs were used for (probably printing or breakpoints)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would be cool to see if the nullsubs are actually used in JP or Blue versions.


ALIGNED(4) const char gMeetNinetalesText[] = "Meet Ninetales.";
ALIGNED(4) const char gAvoidCaptureText[] = "Avoid capture.";
ALIGNED(4) const char gFinalScenarioText[] = _("Defeat the final Pokémon.");

// Needed to match
static inline s16 Self(s16 a)
Copy link
Contributor

Choose a reason for hiding this comment

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

This smells similar to the SpeciesId() inline but instead it's for maze ids

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it makes me wonder if SpeciesId should actually exist and there's some unholy InlineCastToS16 used instead

Copy link
Contributor

@Kermalis Kermalis Oct 31, 2024

Choose a reason for hiding this comment

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

Nah I think it is definitely a SpeciesId but there also happen to be 2 other times they do that kind of conversion (like maze/friendarea/item/move or something). We'll keep finding these weird casts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, but there are issues all around the codebase with s16 arguments which don't match. So unless they had conversion used for everything, it's possible they performed some weird inline cast for all s16.
Though some of them are unknown arguments, so maybe they're indeed just species/moves/items/etc.

Copy link
Collaborator

@AnonymousRandomPerson AnonymousRandomPerson left a comment

Choose a reason for hiding this comment

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

Will wait for comments to be resolved before merging.

@AnonymousRandomPerson AnonymousRandomPerson merged commit d93a8b6 into pret:master Nov 1, 2024
1 check passed
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.

4 participants