Skip to content

Commit

Permalink
Rename functions to to better fit codebase style
Browse files Browse the repository at this point in the history
  • Loading branch information
wildfire248 committed Feb 11, 2024
1 parent b813f7f commit dbf697e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions include/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -787,19 +787,19 @@ u8 Party_GetMaxLevel(Party *party);
/**
* @brief Gets the Sinnoh Pokedex number of a pokemon from its National Pokedex number
*
* @param monNatDexNumber The National Pokedex number of a pokemon
* @param species The National Pokedex number of a pokemon
* @return The Sinnoh Pokedex number of that pokemon (or zero if none exists)
*/
u16 Pokemon_GetSinnohDexNumber(u16 monNatDexNumber);
u16 Pokemon_SinnohDexNumber(u16 species);

/**
* @brief Gets the National Pokedex number of a pokemon from its Sinnoh Pokedex number
* (Note: Inputting 0 here will return 493 (Arceus))
*
* @param monSinnohDexNumber The Sinnoh Pokedex number of a pokemon
* @param sinnohDexNumber The Sinnoh Pokedex number of a pokemon
* @return The National Pokedex number of that pokemon (or zero if none exists)
*/
u16 Pokemon_GetNationalDexNumber(u16 monSinnohDexNumber);
u16 Pokemon_NationalDexNumber(u16 sinnohDexNumber);

void Pokemon_Copy(Pokemon *src, Pokemon *dest);
void BoxPokemon_Copy(BoxPokemon *src, BoxPokemon *dest);
Expand Down
2 changes: 1 addition & 1 deletion src/overlay021/ov21_021D0D80.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ Window * ov21_021D172C (UnkStruct_ov21_021D4C0C * param0, int param1, int param2
Window * v0;
int v1;

v1 = Pokemon_GetSinnohDexNumber(param2);
v1 = Pokemon_SinnohDexNumber(param2);

if ((param2 != 377) && (param2 != 378) && (param2 != 379)) {
GF_ASSERT(v1 > 0);
Expand Down
2 changes: 1 addition & 1 deletion src/overlay028/ov28_022561C0.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ static void ov28_02256914 (UnkStruct_ov28_02256210 * param0, const UnkStruct_ov2
if (sub_02027474(v1)) {
v2 = v0;
} else {
v2 = Pokemon_GetNationalDexNumber((u16)v0);
v2 = Pokemon_NationalDexNumber((u16)v0);
}

if (((v2 > 0) && (v2 <= 493)) && sub_02026FE8(v1, v2)) {
Expand Down
4 changes: 2 additions & 2 deletions src/pokemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -3804,7 +3804,7 @@ u8 Party_GetMaxLevel(Party *party)
return result;
}

u16 Pokemon_GetSinnohDexNumber(u16 monNatDexNumber)
u16 Pokemon_SinnohDexNumber(u16 species)
{
u16 result;

Expand All @@ -3813,7 +3813,7 @@ u16 Pokemon_GetSinnohDexNumber(u16 monNatDexNumber)
return result;
}

u16 Pokemon_GetNationalDexNumber(u16 monSinnohDexNumber)
u16 Pokemon_NationalDexNumber(u16 sinnohDexNumber)
{
u16 result = 0;

Expand Down
6 changes: 3 additions & 3 deletions src/unk_0202631C.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ u16 sub_02026E64 (const UnkStruct_02026324 * param0)

for (v0 = 1; v0 <= 493; v0++) {
if (Pokedex_CaughtSpecies(param0, v0) == 1) {
if (Pokemon_GetSinnohDexNumber(v0) != 0) {
if (Pokemon_SinnohDexNumber(v0) != 0) {
v1++;
}
}
Expand All @@ -835,7 +835,7 @@ u16 sub_02026EAC (const UnkStruct_02026324 * param0)

for (v0 = 1; v0 <= 493; v0++) {
if (sub_02026FE8(param0, v0) == 1) {
if (Pokemon_GetSinnohDexNumber(v0) != 0) {
if (Pokemon_SinnohDexNumber(v0) != 0) {
v1++;
}
}
Expand Down Expand Up @@ -898,7 +898,7 @@ u16 sub_02026F58 (const UnkStruct_02026324 * param0)

for (v0 = 1; v0 <= 493; v0++) {
if (sub_02026FE8(param0, v0) == 1) {
v2 = Pokemon_GetSinnohDexNumber(v0);
v2 = Pokemon_SinnohDexNumber(v0);

if (v2 != 0) {
if (sub_02026D68(v0) == 1) {
Expand Down
2 changes: 1 addition & 1 deletion src/unk_0203F6C4.c
Original file line number Diff line number Diff line change
Expand Up @@ -6606,7 +6606,7 @@ static BOOL sub_02044BE8 (UnkStruct_0203E724 * param0)
*v1 = 25;

for (v4 = 1, v5 = 0; v4 <= 493; v4++) {
if ((sub_02026FE8(v0, v4) == 1) && (Pokemon_GetSinnohDexNumber(v4) != 0)) {
if ((sub_02026FE8(v0, v4) == 1) && (Pokemon_SinnohDexNumber(v4) != 0)) {
if (v5 == v3) {
*v1 = v4;
break;
Expand Down
2 changes: 1 addition & 1 deletion src/unk_0207A274.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ u32 sub_0207A280 (const UnkStruct_02026324 * param0)
u32 sub_0207A294 (u32 param0, u32 param1)
{
if (param0 == 0) {
return Pokemon_GetSinnohDexNumber(param1);
return Pokemon_SinnohDexNumber(param1);
}

return param1;
Expand Down

0 comments on commit dbf697e

Please sign in to comment.