summaryrefslogtreecommitdiff
path: root/src/pokemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pokemon.c')
-rw-r--r--src/pokemon.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/pokemon.c b/src/pokemon.c
index c572ee10e..7c010cd39 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -1752,7 +1752,7 @@ bool8 sub_80688F8(u8 caseId, u8 battlerId)
return FALSE;
if (!gMain.inBattle)
return FALSE;
- if (gLinkPlayers[GetMultiplayerId()].lp_field_18 == battlerId)
+ if (gLinkPlayers[GetMultiplayerId()].id == battlerId)
return FALSE;
break;
case 2:
@@ -1774,7 +1774,7 @@ bool8 sub_80688F8(u8 caseId, u8 battlerId)
return FALSE;
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
{
- if (gLinkPlayers[GetMultiplayerId()].lp_field_18 == battlerId)
+ if (gLinkPlayers[GetMultiplayerId()].id == battlerId)
return FALSE;
}
else
@@ -2089,7 +2089,7 @@ void GiveBoxMonInitialMoveset(struct BoxPokemon *boxMon)
s32 level = GetLevelFromBoxMonExp(boxMon);
s32 i;
- for (i = 0; gLevelUpLearnsets[species][i] != (u16)-1; i++)
+ for (i = 0; gLevelUpLearnsets[species][i] != LEVEL_UP_END; i++)
{
u16 moveLevel;
u16 move;
@@ -2101,7 +2101,7 @@ void GiveBoxMonInitialMoveset(struct BoxPokemon *boxMon)
move = (gLevelUpLearnsets[species][i] & 0x1FF);
- if (GiveMoveToBoxMon(boxMon, move) == (u16)-1)
+ if (GiveMoveToBoxMon(boxMon, move) == 0xFFFF)
DeleteFirstMoveAndGiveMoveToBoxMon(boxMon, move);
}
}
@@ -2123,7 +2123,7 @@ u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove)
while ((gLevelUpLearnsets[species][sLearningMoveTableID] & 0xFE00) != (level << 9))
{
sLearningMoveTableID++;
- if (gLevelUpLearnsets[species][sLearningMoveTableID] == 0xFFFF)
+ if (gLevelUpLearnsets[species][sLearningMoveTableID] == LEVEL_UP_END)
return 0;
}
}
@@ -4806,7 +4806,7 @@ void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies)
bool8 sub_806D7EC(void)
{
bool8 retVal = FALSE;
- switch (gLinkPlayers[GetMultiplayerId()].lp_field_18)
+ switch (gLinkPlayers[GetMultiplayerId()].id)
{
case 0:
case 3:
@@ -4823,7 +4823,7 @@ bool8 sub_806D7EC(void)
u16 GetLinkTrainerFlankId(u8 linkPlayerId)
{
u16 flankId = 0;
- switch (gLinkPlayers[linkPlayerId].lp_field_18)
+ switch (gLinkPlayers[linkPlayerId].id)
{
case 0:
case 3:
@@ -4841,7 +4841,7 @@ s32 GetBattlerMultiplayerId(u16 a1)
{
s32 id;
for (id = 0; id < MAX_LINK_PLAYERS; id++)
- if (gLinkPlayers[id].lp_field_18 == a1)
+ if (gLinkPlayers[id].id == a1)
break;
return id;
}
@@ -5694,7 +5694,7 @@ const u8 *GetTrainerPartnerName(void)
else
{
u8 id = GetMultiplayerId();
- return gLinkPlayers[GetBattlerMultiplayerId(gLinkPlayers[id].lp_field_18 ^ 2)].name;
+ return gLinkPlayers[GetBattlerMultiplayerId(gLinkPlayers[id].id ^ 2)].name;
}
}
@@ -5824,7 +5824,7 @@ u8 sub_806EF08(u8 arg0)
s32 i;
s32 var = 0;
u8 multiplayerId = GetMultiplayerId();
- switch (gLinkPlayers[multiplayerId].lp_field_18)
+ switch (gLinkPlayers[multiplayerId].id)
{
case 0:
case 2:
@@ -5837,7 +5837,7 @@ u8 sub_806EF08(u8 arg0)
}
for (i = 0; i < 4; i++)
{
- if (gLinkPlayers[i].lp_field_18 == (s16)(var))
+ if (gLinkPlayers[i].id == (s16)(var))
break;
}
return i;
@@ -5847,7 +5847,7 @@ u8 sub_806EF84(u8 arg0, u8 arg1)
{
s32 i;
s32 var = 0;
- switch (gLinkPlayers[arg1].lp_field_18)
+ switch (gLinkPlayers[arg1].id)
{
case 0:
case 2:
@@ -5860,7 +5860,7 @@ u8 sub_806EF84(u8 arg0, u8 arg1)
}
for (i = 0; i < 4; i++)
{
- if (gLinkPlayers[i].lp_field_18 == (s16)(var))
+ if (gLinkPlayers[i].id == (s16)(var))
break;
}
return i;