diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-07-31 13:30:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-31 13:30:40 -0400 |
commit | 3e60a7840653e50845abf10bb02cd1b519dcd80f (patch) | |
tree | cb4a0d227a238ebdeb3b6cb9fdb92781bcc4f5e7 /src/evolution_scene.c | |
parent | 602855ea99d8015ef5b7709f6fb1e9fd167239e2 (diff) | |
parent | d391486247cc9f29d85787d6711f7cb993cf6585 (diff) |
Merge branch 'master' into doc-frontierpass2
Diffstat (limited to 'src/evolution_scene.c')
-rw-r--r-- | src/evolution_scene.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 59316835f..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 @@ -1125,7 +1121,7 @@ static void Task_TradeEvolutionScene(u8 taskId) var = gSprites[sEvoStructPtr->preEvoSpriteId].oam.paletteNum + 16; sEvoGraphicsTaskId = EvolutionSparkles_SpiralUpward(var); gTasks[taskId].tState++; - SetGpuReg(REG_OFFSET_BG3CNT, 0x603); + SetGpuReg(REG_OFFSET_BG3CNT, BGCNT_PRIORITY(3) | BGCNT_SCREENBASE(6)); } break; case T_EVOSTATE_SPARKLE_ARC: |