summaryrefslogtreecommitdiff
path: root/src/evolution_scene.c
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-12-31 00:40:45 -0500
committerGitHub <noreply@github.com>2020-12-31 00:40:45 -0500
commitec85c01e7c6d15060eddcc653db33a4b317646d2 (patch)
tree4266c43bcdc1c80c52def44e1470182d3f1c665c /src/evolution_scene.c
parent093610b46e99b517a416ccd5a572054dff09801b (diff)
parent0c74e2097ffbe8395d6f3659c2a49fc829d69b99 (diff)
Merge branch 'master' into doc-factscreen
Diffstat (limited to 'src/evolution_scene.c')
-rw-r--r--src/evolution_scene.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/evolution_scene.c b/src/evolution_scene.c
index 41d4900f7..d41bc5970 100644
--- a/src/evolution_scene.c
+++ b/src/evolution_scene.c
@@ -30,7 +30,6 @@
#include "trade.h"
#include "util.h"
#include "constants/battle_string_ids.h"
-#include "constants/species.h"
#include "constants/songs.h"
#include "constants/rgb.h"
@@ -256,7 +255,7 @@ void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo,
trainerId = GetMonData(mon, MON_DATA_OT_ID);
personality = GetMonData(mon, MON_DATA_PERSONALITY);
DecompressPicFromTable_2(&gMonFrontPicTable[currSpecies],
- gMonSpritesGfxPtr->sprites[1],
+ gMonSpritesGfxPtr->sprites.ptr[1],
currSpecies);
pokePal = GetMonSpritePalStructFromOtIdPersonality(currSpecies, trainerId, personality);
LoadCompressedPalette(pokePal->data, 0x110, 0x20);
@@ -271,7 +270,7 @@ void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo,
// postEvo sprite
DecompressPicFromTable_2(&gMonFrontPicTable[speciesToEvolve],
- gMonSpritesGfxPtr->sprites[3],
+ gMonSpritesGfxPtr->sprites.ptr[3],
speciesToEvolve);
pokePal = GetMonSpritePalStructFromOtIdPersonality(speciesToEvolve, trainerId, personality);
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
@@ -348,7 +347,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
gReservedSpritePaletteCount = 4;
DecompressPicFromTable_2(&gMonFrontPicTable[postEvoSpecies],
- gMonSpritesGfxPtr->sprites[3],
+ gMonSpritesGfxPtr->sprites.ptr[3],
postEvoSpecies);
pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality);
@@ -420,7 +419,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
u32 trainerId = GetMonData(Mon, MON_DATA_OT_ID);
u32 personality = GetMonData(Mon, MON_DATA_PERSONALITY);
DecompressPicFromTable_2(&gMonFrontPicTable[postEvoSpecies],
- gMonSpritesGfxPtr->sprites[3],
+ gMonSpritesGfxPtr->sprites.ptr[3],
postEvoSpecies);
pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality);
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
@@ -484,7 +483,7 @@ void TradeEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8 preEvoSpri
sEvoStructPtr->preEvoSpriteID = preEvoSpriteID;
DecompressPicFromTable_2(&gMonFrontPicTable[speciesToEvolve],
- gMonSpritesGfxPtr->sprites[1],
+ gMonSpritesGfxPtr->sprites.ptr[1],
speciesToEvolve);
pokePal = GetMonSpritePalStructFromOtIdPersonality(speciesToEvolve, trainerId, personality);
@@ -859,21 +858,21 @@ static void Task_EvolutionScene(u8 taskID)
}
break;
case 4:
- if (gMain.newKeys & DPAD_UP && sEvoCursorPos != 0)
+ if (JOY_NEW(DPAD_UP) && sEvoCursorPos != 0)
{
PlaySE(SE_SELECT);
BattleDestroyYesNoCursorAt(sEvoCursorPos);
sEvoCursorPos = 0;
BattleCreateYesNoCursorAt(0);
}
- if (gMain.newKeys & DPAD_DOWN && sEvoCursorPos == 0)
+ if (JOY_NEW(DPAD_DOWN) && sEvoCursorPos == 0)
{
PlaySE(SE_SELECT);
BattleDestroyYesNoCursorAt(sEvoCursorPos);
sEvoCursorPos = 1;
BattleCreateYesNoCursorAt(1);
}
- if (gMain.newKeys & A_BUTTON)
+ if (JOY_NEW(A_BUTTON))
{
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
PlaySE(SE_SELECT);
@@ -889,7 +888,7 @@ static void Task_EvolutionScene(u8 taskID)
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
}
}
- if (gMain.newKeys & B_BUTTON)
+ if (JOY_NEW(B_BUTTON))
{
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
PlaySE(SE_SELECT);