diff options
author | Diegoisawesome <diego@domoreaweso.me> | 2018-12-25 15:03:13 -0600 |
---|---|---|
committer | Diegoisawesome <diego@domoreaweso.me> | 2018-12-25 15:03:13 -0600 |
commit | d8948a5cda2e385c1d4b5c6190c4fe0fb53359fb (patch) | |
tree | fa882b0733f88cc17dcbaef8c25c30c7198bdca1 /src/egg_hatch.c | |
parent | dea41e1a7e6e73789431153d6c28dac3a3a73ac6 (diff) | |
parent | a54aa03d20dacc88879404b87a5f6a7eb7babc54 (diff) |
Merge remote-tracking branch 'pret/master' into trade
Diffstat (limited to 'src/egg_hatch.c')
-rw-r--r-- | src/egg_hatch.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/egg_hatch.c b/src/egg_hatch.c index e94069279..eb7772a3c 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -31,6 +31,7 @@ #include "field_weather.h" #include "international_string_util.h" #include "naming_screen.h" +#include "pokemon_storage_system.h" #include "field_screen_effect.h" #include "battle.h" // to get rid of later @@ -56,10 +57,6 @@ extern const u32 gUnknown_08331F60[]; // tilemap gameboy circle extern const u8 gText_HatchedFromEgg[]; extern const u8 gText_NickHatchPrompt[]; -extern void PlayRainSoundEffect(void); -extern u16 sub_80D22D0(void); -extern u8 CountPartyAliveNonEggMonsExcept(u8); - static void Task_EggHatch(u8 taskID); static void CB2_EggHatch_0(void); static void CB2_EggHatch_1(void); @@ -438,7 +435,7 @@ static u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID, u16* speciesLoc HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites[(a0 * 2) + 1], species, pid); - LoadCompressedObjectPalette(GetMonSpritePalStruct(mon)); + LoadCompressedSpritePalette(GetMonSpritePalStruct(mon)); *speciesLoc = species; } break; @@ -872,7 +869,7 @@ u8 GetEggStepsToSubtract(void) u8 count, i; for (count = CalculatePlayerPartyCount(), i = 0; i < count; i++) { - if (!GetMonData(&gPlayerParty[i], MON_DATA_SANITY_BIT3)) + if (!GetMonData(&gPlayerParty[i], MON_DATA_SANITY_IS_EGG)) { u8 ability = GetMonAbility(&gPlayerParty[i]); if (ability == ABILITY_MAGMA_ARMOR || ability == ABILITY_FLAME_BODY) @@ -884,7 +881,7 @@ u8 GetEggStepsToSubtract(void) u16 sub_80722E0(void) { - u16 value = sub_80D22D0(); - value += CountPartyAliveNonEggMonsExcept(6); - return value; + u16 aliveNonEggMonsCount = CountStorageNonEggMons(); + aliveNonEggMonsCount += CountPartyAliveNonEggMonsExcept(6); + return aliveNonEggMonsCount; } |