summaryrefslogtreecommitdiff
path: root/src/egg_hatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egg_hatch.c')
-rw-r--r--src/egg_hatch.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/egg_hatch.c b/src/egg_hatch.c
index 9f2526295..4b7ee9a61 100644
--- a/src/egg_hatch.c
+++ b/src/egg_hatch.c
@@ -26,6 +26,11 @@
#include "constants/abilities.h"
#include "daycare.h"
#include "overworld.h"
+#include "scanline_effect.h"
+#include "field_weather.h"
+#include "international_string_util.h"
+#include "naming_screen.h"
+#include "field_screen.h"
#include "battle.h" // to get rid of later
struct EggHatchData
@@ -55,14 +60,7 @@ extern const u32 gUnknown_08331F60[]; // tilemap gameboy circle
extern const u8 gText_HatchedFromEgg[];
extern const u8 gText_NickHatchPrompt[];
-extern u8 sav1_map_get_name(void);
-extern void TVShowConvertInternationalString(u8* str1, u8* str2, u8);
-extern void FadeScreen(u8, u8);
-extern void overworld_free_bg_tilemaps(void);
-extern void sub_80AF168(void);
-extern void ScanlineEffect_Stop(void);
extern void play_some_sound(void);
-extern void DoNamingScreen(u8, const u8*, u16, u8, u32, MainCallback);
extern u16 sub_80D22D0(void);
extern u8 CountPartyAliveNonEggMonsExcept(u8);
@@ -254,7 +252,7 @@ static const struct BgTemplate sBgTemplates_EggHatch[2] =
static const struct WindowTemplate sWinTemplates_EggHatch[2] =
{
{
- .priority = 0,
+ .bg = 0,
.tilemapLeft = 2,
.tilemapTop = 15,
.width = 26,
@@ -267,7 +265,7 @@ static const struct WindowTemplate sWinTemplates_EggHatch[2] =
static const struct WindowTemplate sYesNoWinTemplate =
{
- .priority = 0,
+ .bg = 0,
.tilemapLeft = 21,
.tilemapTop = 9,
.width = 5,
@@ -307,7 +305,7 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
u32 personality, pokerus;
u8 i, friendship, language, gameMet, markings, obedience;
u16 moves[4];
- u32 ivs[6];
+ u32 ivs[NUM_STATS];
species = GetMonData(egg, MON_DATA_SPECIES);
@@ -319,7 +317,7 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
personality = GetMonData(egg, MON_DATA_PERSONALITY);
- for (i = 0; i < 6; i++)
+ for (i = 0; i < NUM_STATS; i++)
{
ivs[i] = GetMonData(egg, MON_DATA_HP_IV + i);
}
@@ -337,7 +335,7 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
SetMonData(temp, MON_DATA_MOVE1 + i, &moves[i]);
}
- for (i = 0; i < 6; i++)
+ for (i = 0; i < NUM_STATS; i++)
{
SetMonData(temp, MON_DATA_HP_IV + i, &ivs[i]);
}
@@ -673,7 +671,7 @@ static void CB2_EggHatch_1(void)
}
break;
case 10:
- switch (Menu_ProcessInputNoWrap_())
+ switch (Menu_ProcessInputNoWrapClearOnChoose())
{
case 0:
GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar3);