Some renames

This commit is contained in:
Eduardo Quezada 2025-11-27 14:27:33 -03:00
parent 5c8b30f77b
commit c3f34173f7
6 changed files with 26 additions and 26 deletions

View File

@ -37,16 +37,16 @@ extern RecruitedMon *gRecruitedPokemonRef;
void LoadMonsterParameters(void);
RecruitedMon *GetRecruitedPokemon(void);
void InitializeRecruitedPokemon(void);
void sub_808CE74(s16 _species, bool32 _isLeader, u8* name);
void CreateLeaderPartnerData(s16 _species, bool32 _isLeader, u8* name);
void CreateLevel1Pokemon(Pokemon *pokemon, s16 _species, u8* name, u32 _itemID, const DungeonLocation *location, u16 *moves);
void sub_808D0D8(Pokemon *pokemon);
void ConvertStoryMonToPokemon(Pokemon *dst, const struct StoryMonData *src);
Pokemon *TryAddPokemonToRecruited(Pokemon*);
Pokemon *sub_808D278(s32 species);
Pokemon *TryAddLevel1PokemonToRecruited(s32 species, u8 *name, u32 _itemID, const DungeonLocation *location, u16 *moveID);
void sub_808D31C(Pokemon *param_1);
void TryResetPokemonFlags(Pokemon *pokemon);
Pokemon *GetPlayerPokemonStruct(void);
Pokemon *sub_808D378(void);
Pokemon *GetPartnerPokemonStruct(void);
Pokemon *sub_808D3BC(void);
Pokemon *sub_808D3F8(void);
Pokemon *GetRecruitedMonBySpecies(s16 species_, s32 sameSpeciesCounter);
@ -113,7 +113,7 @@ bool8 CanMonLearnMove(u16 moveID, s16 _species);
s32 sub_808E218(unkStruct_808E218_arg* a1, Pokemon* pokemon);
s32 GetEvolutionSequence(Pokemon* pokemon, EvolveStage* a2);
s32 sub_808E400(s32 _species, s16* _a2, bool32 _bodySizeCheck, bool32 _shedinjaCheck);
void sub_808E490(Move* a1, s32 species);
void InitializeLevel1MovesBySpecies(Move* moves, s32 species);
char* sub_808E4FC(s32 a1);
char* sub_808E51C(s32 a1);
void InitShadowSprites(s32 param_1, s32 param_2);

View File

@ -530,7 +530,7 @@ void sub_8027A78(void)
else
{
sub_8027EB8();
sub_808D31C(sUnknown_203B2BC->pokeStruct);
TryResetPokemonFlags(sUnknown_203B2BC->pokeStruct);
}
break;
}
@ -550,7 +550,7 @@ void sub_8027AE4(void)
break;
case FRIEND_AREA_ACTION_MENU_ACTION_YES:
sub_8027EB8();
sub_808D31C(sUnknown_203B2BC->pokeStruct);
TryResetPokemonFlags(sUnknown_203B2BC->pokeStruct);
break;
}
}

View File

@ -979,20 +979,20 @@ void sub_8001064(void)
if (sTeamBasicInfo_203B040.StarterName[0] == '\0') {
CopyMonsterNameToBuffer(buffer1, sTeamBasicInfo_203B040.StarterID);
CopyStringtoBuffer(buffer2, buffer1);
sub_808CE74(sTeamBasicInfo_203B040.StarterID, TRUE, buffer2);
CreateLeaderPartnerData(sTeamBasicInfo_203B040.StarterID, TRUE, buffer2);
}
else
sub_808CE74(sTeamBasicInfo_203B040.StarterID, TRUE, sTeamBasicInfo_203B040.StarterName);
CreateLeaderPartnerData(sTeamBasicInfo_203B040.StarterID, TRUE, sTeamBasicInfo_203B040.StarterName);
}
if (sub_808D378() == NULL) {
if (GetPartnerPokemonStruct() == NULL) {
if (sTeamBasicInfo_203B040.PartnerNick[0] == '\0') {
CopyMonsterNameToBuffer(buffer1, sTeamBasicInfo_203B040.PartnerID);
CopyStringtoBuffer(buffer2, buffer1);
sub_808CE74(sTeamBasicInfo_203B040.PartnerID, FALSE, buffer2);
CreateLeaderPartnerData(sTeamBasicInfo_203B040.PartnerID, FALSE, buffer2);
}
else
sub_808CE74(sTeamBasicInfo_203B040.PartnerID, FALSE, sTeamBasicInfo_203B040.PartnerNick);
CreateLeaderPartnerData(sTeamBasicInfo_203B040.PartnerID, FALSE, sTeamBasicInfo_203B040.PartnerNick);
}
if (sTeamBasicInfo_203B040.StarterID != MONSTER_NONE) {

View File

@ -343,7 +343,7 @@ static void HandlePartyListMenuCallback(void)
break;
case 9:
sub_8026FA4();
sub_808D31C(sUnknown_203B2B8->pokeStruct);
TryResetPokemonFlags(sUnknown_203B2B8->pokeStruct);
sUnknown_203B2B8->unk8 = TRUE;
break;
case PARTY_LIST_STATE_GIVEN_ITEM:

View File

@ -68,7 +68,7 @@ void InitializeRecruitedPokemon(void)
}
}
void sub_808CE74(s16 _species, bool32 _isLeader, u8* name)
void CreateLeaderPartnerData(s16 _species, bool32 _isLeader, u8* name)
{
struct Pokemon pokemon;
u8 name_buffer[20];
@ -102,7 +102,7 @@ void sub_808CE74(s16 _species, bool32 _isLeader, u8* name)
pokemon.currExp = 0;
pokemon.tacticIndex = TACTIC_LETS_GO_TOGETHER;
pokemon.dungeonLocation.floor = 0;
sub_808E490(pokemon.moves, species);
InitializeLevel1MovesBySpecies(pokemon.moves, species);
if (name == NULL) {
CopyMonsterNameToBuffer(name_buffer, species);
@ -165,7 +165,7 @@ void CreateLevel1Pokemon(Pokemon *pokemon, s16 _species, u8* name, u32 _itemID,
}
}
else {
sub_808E490(pokemon->moves, species);
InitializeLevel1MovesBySpecies(pokemon->moves, species);
}
if (name == NULL) {
@ -192,7 +192,7 @@ void sub_808D0D8(Pokemon *pokemon)
pokemon->tacticIndex = TACTIC_LETS_GO_TOGETHER;
pokemon->IQ = 1;
SetDefaultIQSkills(&pokemon->IQSkills, FALSE);
sub_808E490(pokemon->moves, pokemon->speciesNum);
InitializeLevel1MovesBySpecies(pokemon->moves, pokemon->speciesNum);
}
void ConvertStoryMonToPokemon(Pokemon *dst, const struct StoryMonData *src)
@ -281,10 +281,10 @@ Pokemon *TryAddLevel1PokemonToRecruited(s32 species, u8 *name, u32 _itemID, cons
return TryAddPokemonToRecruited(&pokemon);
}
void sub_808D31C(Pokemon *param_1)
void TryResetPokemonFlags(Pokemon *pokemon)
{
if ((!IsMonTeamLeader(param_1)) && !IsMonPartner(param_1))
param_1->flags = 0;
if ((!IsMonTeamLeader(pokemon)) && !IsMonPartner(pokemon))
pokemon->flags = 0;
}
Pokemon * GetPlayerPokemonStruct(void)
@ -302,7 +302,7 @@ Pokemon * GetPlayerPokemonStruct(void)
return NULL;
}
Pokemon * sub_808D378(void)
Pokemon * GetPartnerPokemonStruct(void)
{
s32 index;
@ -1247,13 +1247,13 @@ s32 sub_808E400(s32 _species, s16* _a2, bool32 _bodySizeCheck, bool32 _shedinjaC
return count;
}
void sub_808E490(Move* a1, s32 species)
void InitializeLevel1MovesBySpecies(Move* moves, s32 _species)
{
u16 buffer[0x10]; // of moveIDs
s32 i;
s16 index_s32 = species;
s16 species = _species;
s32 count = GetMovesLearnedAtLevel(buffer, index_s32, 1, 999);
s32 count = GetMovesLearnedAtLevel(buffer, species, 1, 999);
if (count == 0) {
count = 1;
buffer[0] = MOVE_ITEM_TOSS;
@ -1262,13 +1262,13 @@ void sub_808E490(Move* a1, s32 species)
i = 0;
if (i < count) {
while (i < count) {
InitZeroedPPPokemonMove(&a1[i], buffer[i]);
InitZeroedPPPokemonMove(&moves[i], buffer[i]);
i++;
}
i = count;
}
while (i < MAX_MON_MOVES) {
a1[i].moveFlags = 0;
moves[i].moveFlags = 0;
i++;
}
}

View File

@ -431,7 +431,7 @@ bool8 sub_803C110(s16 index)
pokeStruct = GetPlayerPokemonStruct();
if (pokeStruct->speciesNum == species_s32)
return FALSE;
pokeStruct = sub_808D378();
pokeStruct = GetPartnerPokemonStruct();
if (pokeStruct->speciesNum == species_s32)
return FALSE;
}