Use GET_UNOWN_LETTER macro

This commit is contained in:
GriffinR
2021-01-19 04:03:16 -05:00
parent f19d1b2590
commit bc20fda604
6 changed files with 16 additions and 14 deletions

View File

@@ -86,7 +86,7 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32
{
if (species == SPECIES_UNOWN)
{
u16 i = (((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 3)) % 0x1C;
u16 i = GET_UNOWN_LETTER(personality);
// The other Unowns are separate from Unown A.
if (i == 0)
@@ -308,7 +308,7 @@ void LoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *dest, s
{
if (species == SPECIES_UNOWN)
{
u16 i = (((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 3)) % 0x1C;
u16 i = GET_UNOWN_LETTER(personality);
// The other Unowns are separate from Unown A.
if (i == 0)
@@ -366,7 +366,7 @@ void LoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src
{
if (species == SPECIES_UNOWN)
{
u16 i = (((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 3)) % 0x1C;
u16 i = GET_UNOWN_LETTER(personality);
// The other Unowns are separate from Unown A.
if (i == 0)