diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/oak_speech.c | 2 | ||||
-rw-r--r-- | src/pokemon.c | 55 |
2 files changed, 26 insertions, 31 deletions
diff --git a/src/oak_speech.c b/src/oak_speech.c index 491ac463c..43ff133de 100644 --- a/src/oak_speech.c +++ b/src/oak_speech.c @@ -14,7 +14,7 @@ #include "menu.h" #include "help_system.h" #include "new_menu_helpers.h" -#include "pokemon_3.h" +#include "pokemon.h" #include "sound.h" #include "event_scripts.h" #include "scanline_effect.h" diff --git a/src/pokemon.c b/src/pokemon.c index 232376da2..2c2264f05 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5,6 +5,7 @@ #include "random.h" #include "main.h" #include "text.h" +#include "data2.h" #include "string_util.h" #include "battle.h" #include "item.h" @@ -56,8 +57,28 @@ struct OakSpeechNidoranFStruct struct SpriteFrameImage *frameImages; }; -// resolve here and static -extern struct OakSpeechNidoranFStruct *sOakSpeechNidoranResources; +// TODO: move sLearningMoveTableID, gPlayerPartyCount, gEnemyPartyCount, +// gEnemyParty, gPlayerParty here after resolving symbol ref in between. +extern u8 sLearningMoveTableID; + +EWRAM_DATA struct SpriteTemplate gMultiuseSpriteTemplate = {0}; +static EWRAM_DATA struct OakSpeechNidoranFStruct *sOakSpeechNidoranResources = NULL; + +static union PokemonSubstruct *GetSubstruct(struct BoxPokemon *boxMon, u32 personality, u8 substructType); +static u16 GetDeoxysStat(struct Pokemon *mon, s32 statId); +static bool8 IsShinyOtIdPersonality(u32 otId, u32 personality); +static u16 ModifyStatByNature(u8 nature, u16 n, u8 statIndex); +static u8 GetNatureFromPersonality(u32 personality); +static bool8 sub_8042BE8(struct Pokemon *mon, u32 unused, u32 healMask, u8 battleId); +static bool8 HealStatusConditions(struct Pokemon *mon, u32 unused, u32 healMask, u8 battleId); +static bool8 IsPokemonStorageFull(void); +static u8 SendMonToPC(struct Pokemon* mon); +static void EncryptBoxMon(struct BoxPokemon *boxMon); +static void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); +static void GiveBoxMonInitialMoveset(struct BoxPokemon *boxMon); +static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); +static u8 GetLevelFromMonExp(struct Pokemon *mon); +static u16 CalculateBoxMonChecksum(struct BoxPokemon *boxMon); // decomp here extern struct SpriteTemplate gUnknown_825DF50[]; @@ -84,32 +105,6 @@ extern const u8 gUnknown_825DEA1[]; extern const u8 gUnknown_825DEA9[]; extern const u8 sGetMonDataEVConstants[]; -// extern symbols -extern u8 sBattler_AI; -extern u8 sLearningMoveTableID; -extern u8 gBattleMonForms[4]; -extern const struct CompressedSpritePalette gMonPaletteTable[]; -extern const struct CompressedSpritePalette gMonShinyPaletteTable[]; -extern const union AnimCmd *const *const gTrainerBackAnimsPtrTable[]; -extern const union AnimCmd *const *const gTrainerFrontAnimsPtrTable[]; -extern const union AnimCmd *const gUnknown_82349BC[]; - -static union PokemonSubstruct *GetSubstruct(struct BoxPokemon *boxMon, u32 personality, u8 substructType); -static u16 GetDeoxysStat(struct Pokemon *mon, s32 statId); -static bool8 IsShinyOtIdPersonality(u32 otId, u32 personality); -static u16 ModifyStatByNature(u8 nature, u16 n, u8 statIndex); -static u8 GetNatureFromPersonality(u32 personality); -static bool8 sub_8042BE8(struct Pokemon *mon, u32 unused, u32 healMask, u8 battleId); -static bool8 HealStatusConditions(struct Pokemon *mon, u32 unused, u32 healMask, u8 battleId); -static bool8 IsPokemonStorageFull(void); -static u8 SendMonToPC(struct Pokemon* mon); -static void EncryptBoxMon(struct BoxPokemon *boxMon); -static void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); -static void GiveBoxMonInitialMoveset(struct BoxPokemon *boxMon); -static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); -static u8 GetLevelFromMonExp(struct Pokemon *mon); -static u16 CalculateBoxMonChecksum(struct BoxPokemon *boxMon); - // code void ZeroBoxMonData(struct BoxPokemon *boxMon) { @@ -4938,10 +4933,10 @@ bool8 sub_80435E0(void) return retVal; } -bool8 GetLinkTrainerFlankId(u8 id) +bool8 GetLinkTrainerFlankId(u8 linkPlayerId) { bool8 retVal = FALSE; - switch (gLinkPlayers[id].id) + switch (gLinkPlayers[linkPlayerId].id) { case 0: case 3: |