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

Use constants for trade text indexes #501

Merged
merged 1 commit into from
Mar 8, 2025
Merged

Conversation

Rangi42
Copy link
Member

@Rangi42 Rangi42 commented Mar 8, 2025

@Narishma-gb I based this on your pokegreen constants mentioned in #493 (thanks!). Some changes:

  • The constants are defined directly in the engine file, since they're not needed anywhere else (this is in keeping with other locally-used constants, e.g. https://github.com/pret/pokecrystal/blob/master/engine/pokemon/stats_screen.asm)
  • Used an assert instead of a comment for the xor a (sometimes there are xor a ; FOO comments when FOO is obviously some null/default value, but TRADETEXT_WANNA_TRADE isn't that obvious)
  • Added table size assertions.

@SatoMew
Copy link
Contributor

SatoMew commented Mar 8, 2025

For reference and additional context, see #500.

@Narishma-gb
Copy link
Contributor

Big fan of this! Perhaps capitalize assert, as is standard on pokered?

@Rangi42 Rangi42 merged commit 147914d into pret:master Mar 8, 2025
1 check passed
@Rangi42 Rangi42 deleted the trade-texts branch March 8, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants