diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-01-19 04:03:16 -0500 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2021-01-19 04:03:16 -0500 |
commit | bc20fda6041244d83775f6e3084f74ebe81a5fda (patch) | |
tree | 9417aef5eaed196948741589681460389178f7cb /include/pokemon.h | |
parent | f19d1b25906f32e291d795a52c62933860a133e9 (diff) |
Use GET_UNOWN_LETTER macro
Diffstat (limited to 'include/pokemon.h')
-rw-r--r-- | include/pokemon.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/pokemon.h b/include/pokemon.h index addf580e9..0320da1f2 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -238,6 +238,15 @@ struct Evolution u16 targetSpecies; }; +#define NUM_UNOWN_FORMS 28 + +#define GET_UNOWN_LETTER(personality) (( \ + ((personality & 0x03000000) >> 18) \ + | ((personality & 0x00030000) >> 12) \ + | ((personality & 0x00000300) >> 6) \ + | ((personality & 0x00000003) >> 0) \ +) % NUM_UNOWN_FORMS) + extern u8 gPlayerPartyCount; extern struct Pokemon gPlayerParty[PARTY_SIZE]; extern u8 gEnemyPartyCount; |