summaryrefslogtreecommitdiff
path: root/src/pokemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pokemon.c')
-rw-r--r--src/pokemon.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/pokemon.c b/src/pokemon.c
index 3aa88e991..292254985 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -13,6 +13,7 @@
#include "constants/hold_effects.h"
#include "constants/battle_move_effects.h"
#include "constants/songs.h"
+#include "constants/battle_frontier.h"
#include "string_util.h"
#include "text.h"
#include "link.h"
@@ -80,8 +81,7 @@ extern void set_unknown_box_id(u8);
extern void sub_803FA70(u8 battlerId);
extern u8 sav1_map_get_name(void);
extern const u8 *sub_81A1650(u8, u8 language);
-extern u8 BattleFrontierGetOpponentLvl(u8);
-extern u16 FacilityClassToPicIndex(u16);
+extern u8 GetFrontierEnemyMonLevel(u8);
extern bool8 InBattlePyramid(void);
extern bool8 InBattlePike(void);
extern bool8 sub_806F104(void);
@@ -955,7 +955,7 @@ const u16 gHoennToNationalOrder[] = // Assigns Hoenn Dex Pokémon (Using Nationa
NATIONAL_DEX_BLAZIKEN, // HOENN_DEX_BLAZIKEN
NATIONAL_DEX_MUDKIP, // HOENN_DEX_MUDKIP
NATIONAL_DEX_MARSHTOMP, // HOENN_DEX_MARSHTOMP
- NATIONAL_DEX_SWAMPERT, // HOENN_DEX_SWAMPERT
+ NATIONAL_DEX_SWAMPERT, // HOENN_DEX_SWAMPERT
NATIONAL_DEX_POOCHYENA, // HOENN_DEX_POOCHYENA
NATIONAL_DEX_MIGHTYENA, // HOENN_DEX_MIGHTYENA
NATIONAL_DEX_ZIGZAGOON, // HOENN_DEX_ZIGZAGOON
@@ -2819,8 +2819,8 @@ void sub_8068338(struct Pokemon *mon, struct UnknownPokemonStruct *src, bool8 lv
u8 language;
u8 value;
- if (gSaveBlock2Ptr->frontier.chosenLvl != 0)
- level = BattleFrontierGetOpponentLvl(gSaveBlock2Ptr->frontier.chosenLvl);
+ if (gSaveBlock2Ptr->frontier.lvlMode != FRONTIER_LVL_50)
+ level = GetFrontierEnemyMonLevel(gSaveBlock2Ptr->frontier.lvlMode);
else if (lvl50)
level = 50;
else
@@ -2884,7 +2884,7 @@ void sub_8068528(struct Pokemon *mon, const struct UnknownPokemonStruct2 *src, u
CreateMon(mon,
src->mons[monId].species,
- BattleFrontierGetOpponentLvl(src->field_0_1 - 1),
+ GetFrontierEnemyMonLevel(src->field_0_1 - 1),
0x1F,
TRUE,
personality,
@@ -4112,7 +4112,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
{
retVal = 0;
- while (retVal < OT_NAME_LENGTH)
+ while (retVal < PLAYER_NAME_LENGTH)
{
data[retVal] = boxMon->otName[retVal];
retVal++;
@@ -4480,7 +4480,7 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg)
case MON_DATA_OT_NAME:
{
s32 i;
- for (i = 0; i < OT_NAME_LENGTH; i++)
+ for (i = 0; i < PLAYER_NAME_LENGTH; i++)
boxMon->otName[i] = data[i];
break;
}
@@ -6778,7 +6778,7 @@ s8 GetFlavorRelationByPersonality(u32 personality, u8 flavor)
bool8 IsTradedMon(struct Pokemon *mon)
{
- u8 otName[OT_NAME_LENGTH + 1];
+ u8 otName[PLAYER_NAME_LENGTH + 1];
u32 otId;
GetMonData(mon, MON_DATA_OT_NAME, otName);
otId = GetMonData(mon, MON_DATA_OT_ID, 0);
@@ -7118,9 +7118,9 @@ u16 FacilityClassToPicIndex(u16 facilityClass)
u16 PlayerGenderToFrontTrainerPicId(u8 playerGender)
{
if (playerGender != MALE)
- return FacilityClassToPicIndex(FACILITY_CLASS_PKMN_TRAINER_BRENDAN);
- else
return FacilityClassToPicIndex(FACILITY_CLASS_PKMN_TRAINER_MAY);
+ else
+ return FacilityClassToPicIndex(FACILITY_CLASS_PKMN_TRAINER_BRENDAN);
}
void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality)