diff options
author | luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> | 2021-07-02 12:53:12 -0400 |
---|---|---|
committer | luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> | 2021-07-02 12:53:12 -0400 |
commit | b3d66f5528ccfc8b8a3f6c0d46444ad5943364f4 (patch) | |
tree | 9917de58912d28e884871cb7efc5b4d291ec4e78 /src/evolution_scene.c | |
parent | 9fd27fe8552eb0716222e72bc92ffa7f7334c68d (diff) | |
parent | 3964820a84e4819bb807d601d2c3c7b196f764e8 (diff) |
Merge branch 'master' of https://github.com/pret/pokeemerald
Diffstat (limited to 'src/evolution_scene.c')
-rw-r--r-- | src/evolution_scene.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 39e917161..08f816f4f 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -34,6 +34,8 @@ #include "constants/rgb.h" #include "constants/items.h" +extern struct Evolution gEvolutionTable[][EVOS_PER_MON]; + struct EvoInfo { u8 preEvoSpriteId; @@ -550,8 +552,6 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon) { s32 i; struct Pokemon* shedinja = &gPlayerParty[gPlayerPartyCount]; - const struct Evolution *evos; - const struct Evolution *evos2; CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon)); SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, &gEvolutionTable[preEvoSpecies][1].targetSpecies); @@ -572,12 +572,8 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon) CalculateMonStats(&gPlayerParty[gPlayerPartyCount]); CalculatePlayerPartyCount(); - // can't match it otherwise, ehh - evos2 = gEvolutionTable[0]; - evos = evos2 + EVOS_PER_MON * preEvoSpecies; - - GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos[1].targetSpecies), FLAG_SET_SEEN); - GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos[1].targetSpecies), FLAG_SET_CAUGHT); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(gEvolutionTable[preEvoSpecies][1].targetSpecies), FLAG_SET_SEEN); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(gEvolutionTable[preEvoSpecies][1].targetSpecies), FLAG_SET_CAUGHT); if (GetMonData(shedinja, MON_DATA_SPECIES) == SPECIES_SHEDINJA && GetMonData(shedinja, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE |