diff --git a/include/pokemon.h b/include/pokemon.h index 60ccb27f4..150486c0e 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -487,7 +487,7 @@ u8 GetDefaultMoveTarget(u8 battlerId); u8 GetMonGender(struct Pokemon *mon); u8 GetBoxMonGender(struct BoxPokemon *boxMon); u8 GetGenderFromSpeciesAndPersonality(u16 species, u32 personality); -void SetMultiuseSpriteTemplateToPokemon(u16 species, u8 battlerPosition); +void SetMultiuseSpriteTemplateToPokemon(u16 speciesTag, u8 battlerPosition); void SetMultiuseSpriteTemplateToTrainerBack(u16 trainerSpriteId, u8 battlerPosition); void SetMultiuseSpriteTemplateToTrainerFront(u16 arg0, u8 battlerPosition); diff --git a/src/pokemon.c b/src/pokemon.c index 76a850d5a..64b02021b 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -3413,7 +3413,7 @@ u8 GetGenderFromSpeciesAndPersonality(u16 species, u32 personality) return MON_MALE; } -void SetMultiuseSpriteTemplateToPokemon(u16 species, u8 battlerPosition) +void SetMultiuseSpriteTemplateToPokemon(u16 speciesTag, u8 battlerPosition) { if (gMonSpritesGfxPtr != NULL) gMultiuseSpriteTemplate = gMonSpritesGfxPtr->templates[battlerPosition]; @@ -3424,13 +3424,13 @@ void SetMultiuseSpriteTemplateToPokemon(u16 species, u8 battlerPosition) else gMultiuseSpriteTemplate = gUnknown_08329D98[battlerPosition]; - gMultiuseSpriteTemplate.paletteTag = species; + gMultiuseSpriteTemplate.paletteTag = speciesTag; if (battlerPosition == B_POSITION_PLAYER_LEFT || battlerPosition == B_POSITION_PLAYER_RIGHT) gMultiuseSpriteTemplate.anims = gUnknown_082FF70C; - else if (species > SPECIES_SHINY_TAG) - gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[species - SPECIES_SHINY_TAG]; + else if (speciesTag > SPECIES_SHINY_TAG) + gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[speciesTag - SPECIES_SHINY_TAG]; else - gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[species]; + gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[speciesTag]; } void SetMultiuseSpriteTemplateToTrainerBack(u16 trainerSpriteId, u8 battlerPosition)