Merge remote-tracking branch 'pret/master' into trade

This commit is contained in:
Diegoisawesome
2018-12-25 15:03:13 -06:00
517 changed files with 41317 additions and 67419 deletions
+6 -9
View File
@@ -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;
}