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

Replaced copyright magic numbers in intro.c with constants #2035

Merged
merged 4 commits into from
Oct 3, 2024

Conversation

pkmnsnfrn
Copy link
Contributor

Description

Changed some magic numbers to constants for readability.

Discord contact info

pkmnsnfrn

@GriffinRichards
Copy link
Member

This might be better served by comments at the start of each case block? I feel like by moving the numbers away it actually makes the flow a little harder to understand at a glance (i.e. before it's clearer that default is going to run until state == 140)

If you feel strongly about defining constants for this then they should probably be an enum to enforce the order:

enum {
    COPYRIGHT_INITIALIZE,
    COPYRIGHT_START_FADE = 140,
    COPYRIGHT_START_INTRO,
};

@pkmnsnfrn
Copy link
Contributor Author

I figured constants would be good for users trying to add functionality to skip the copyright screen, to make it clear that they need to jump to a specific state.

I'll do the enum change if you agree that constants are acceptable, I think the enum change is a good idea.

@GriffinRichards GriffinRichards merged commit 9a24c03 into pret:master Oct 3, 2024
1 check passed
github-actions bot pushed a commit to GriffinRichards/pokeemerald that referenced this pull request Oct 8, 2024
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.

2 participants