diff options
Diffstat (limited to 'src/pokemon_3.c')
-rw-r--r-- | src/pokemon_3.c | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/src/pokemon_3.c b/src/pokemon_3.c index f4eac79a7..9e69a3850 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -1,17 +1,19 @@ #include "global.h" -#include "asm.h" #include "battle.h" +#include "battle_message.h" #include "data2.h" #include "event_data.h" #include "hold_effects.h" #include "item.h" #include "items.h" #include "link.h" -#include "main.h" #include "m4a.h" +#include "main.h" #include "pokemon.h" #include "rng.h" #include "rom4.h" +#include "rom_8077ABC.h" +#include "rom_8094928.h" #include "rtc.h" #include "songs.h" #include "sound.h" @@ -19,6 +21,7 @@ #include "sprite.h" #include "string_util.h" #include "text.h" +#include "util.h" #define EVO_FRIENDSHIP 0x0001 // Pokémon levels up with friendship ≥ 220 #define EVO_FRIENDSHIP_DAY 0x0002 // Pokémon levels up during the day with friendship ≥ 220 @@ -36,18 +39,6 @@ #define EVO_LEVEL_SHEDINJA 0x000e // Pokémon reaches the specified level (special value for Shedinja) #define EVO_BEAUTY 0x000f // Pokémon levels up with beauty ≥ specified value -struct Evolution -{ - u16 method; - u16 param; - u16 targetSpecies; -}; - -struct EvolutionData -{ - struct Evolution evolutions[5]; -}; - struct SpindaSpot { u8 x, y; @@ -55,14 +46,10 @@ struct SpindaSpot }; extern u8 gPlayerPartyCount; -extern struct Pokemon gPlayerParty[6]; extern u8 gEnemyPartyCount; -extern struct Pokemon gEnemyParty[6]; extern struct BattlePokemon gBattleMons[4]; -extern u8 * const gItemEffectTable[]; extern u8 gUnknown_02024A60; extern struct BattleEnigmaBerry gEnigmaBerries[]; -extern struct EvolutionData gEvolutionTable[]; extern u16 gSpeciesToHoennPokedexNum[]; extern u16 gSpeciesToNationalPokedexNum[]; extern u16 gHoennToNationalOrder[]; @@ -79,11 +66,7 @@ extern s8 gNatureStatTable[][5]; extern s8 gUnknown_082082FE[][3]; extern u16 gTrainerBattleOpponent; extern u16 gBattleTypeFlags; -extern struct BaseStats gBaseStats[]; -extern u32 gBitTable[]; -extern u32 gExperienceTables[8][101]; extern u32 gTMHMLearnsets[][2]; -extern const u16 *gLevelUpLearnsets[]; extern u8 gBattleMonForms[]; extern const u8 BattleText_Wally[]; extern const u16 gHMMoves[]; @@ -100,8 +83,6 @@ extern u8 gUnknown_083FEE5D[]; extern u8 gUnknown_083FEE92[]; extern u8 *gUnknown_08400F58[]; -u8 CheckPartyHasHadPokerus(struct Pokemon *, u8); - bool8 HealStatusConditions(struct Pokemon *mon, u32 unused, u32 healMask, u8 battleId) { u32 status = GetMonData(mon, MON_DATA_STATUS, 0); @@ -131,7 +112,7 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) offset = 6; - temp = gItemEffectTable[itemId - 13]; + temp = (u8 *) gItemEffectTable[itemId - 13]; if (!temp && itemId != ITEM_ENIGMA_BERRY) return 0; @@ -259,7 +240,7 @@ u8 *sub_803F378(u16 itemId) } else { - itemEffect = gItemEffectTable[itemId - 13]; + itemEffect = (u8 *) gItemEffectTable[itemId - 13]; } gUnknown_02024C0B = gUnknown_02024E6C; @@ -1191,8 +1172,6 @@ void current_map_music_set__default_for_battle(u16 song) PlayNewMapMusic(sub_8040728()); } -const u16 *species_and_otid_get_pal(u16, u32, u32); - const u16 *pokemon_get_pal(struct Pokemon *mon) { u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0); @@ -1207,7 +1186,7 @@ const u16 *pokemon_get_pal(struct Pokemon *mon) //Extracts the lower 16 bits of a 32-bit number #define LOHALF(n) ((n) & 0xFFFF) -const u16 *species_and_otid_get_pal(u16 species, u32 otId , u32 personality) +const u16 *species_and_otid_get_pal(u16 species, u32 otId, u32 personality) { u32 shinyValue; @@ -1221,8 +1200,6 @@ const u16 *species_and_otid_get_pal(u16 species, u32 otId , u32 personality) return gMonPaletteTable[species].data; } -const struct SpritePalette *sub_80409C8(u16, u32, u32); - const struct SpritePalette *sub_8040990(struct Pokemon *mon) { u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0); @@ -1270,8 +1247,6 @@ s8 sub_8040A7C(u32 personality, u8 a2) return gUnknown_083F7E28[nature * 5 + a2]; } -bool8 IsOtherTrainer(u32, u8 *); - bool8 IsTradedMon(struct Pokemon *mon) { u8 otName[8]; |