From eedeaf1ead3d476f85556407184d1d28c306811c Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sat, 12 Oct 2024 19:34:05 +0200 Subject: [PATCH] Clean up scrcmd PR (#5511) Renamed CheckPartyHasSpecie to CheckPartyHasSpecies and cleaned up function calls --- include/field_specials.h | 2 +- src/field_specials.c | 2 +- src/scrcmd.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/field_specials.h b/include/field_specials.h index f391a46ba5..975a57970b 100644 --- a/include/field_specials.h +++ b/include/field_specials.h @@ -35,6 +35,6 @@ void SetPCBoxToSendMon(u8 boxId); void PreparePartyForSkyBattle(void); void GetObjectPosition(u16*, u16*, u32, u32); bool32 CheckObjectAtXY(u32, u32); -bool32 CheckPartyHasSpecie(u32); +bool32 CheckPartyHasSpecies(u32); #endif // GUARD_FIELD_SPECIALS_H diff --git a/src/field_specials.c b/src/field_specials.c index b3f5a63332..cf9af51cbd 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -4316,7 +4316,7 @@ bool32 CheckObjectAtXY(u32 x, u32 y) return FALSE; } -bool32 CheckPartyHasSpecie(u32 givenSpecies) +bool32 CheckPartyHasSpecies(u32 givenSpecies) { u32 partyIndex; diff --git a/src/scrcmd.c b/src/scrcmd.c index bef273b0ba..399562f9a0 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -2496,7 +2496,7 @@ bool8 ScrCmd_getobjectxy(struct ScriptContext *ctx) u32 useTemplate = VarGet(ScriptReadHalfword(ctx)); u16 *pX = GetVarPointer(ScriptReadHalfword(ctx)); u16 *pY = GetVarPointer(ScriptReadHalfword(ctx)); - GetObjectPosition(pX,pY,localId,useTemplate); + GetObjectPosition(pX, pY, localId, useTemplate); return FALSE; } @@ -2507,7 +2507,7 @@ bool8 ScrCmd_checkobjectat(struct ScriptContext *ctx) u32 y = VarGet(ScriptReadHalfword(ctx)) + 7; u16 *varPointer = GetVarPointer(ScriptReadHalfword(ctx)); - *varPointer = CheckObjectAtXY(x,y); + *varPointer = CheckObjectAtXY(x, y); return FALSE; } @@ -2516,10 +2516,10 @@ bool8 Scrcmd_getsetpokedexflag(struct ScriptContext *ctx) { u32 speciesId = SpeciesToNationalPokedexNum(VarGet(ScriptReadHalfword(ctx))); bool32 desiredFlag = VarGet(ScriptReadHalfword(ctx)); - gSpecialVar_Result = GetSetPokedexFlag(speciesId,desiredFlag); + gSpecialVar_Result = GetSetPokedexFlag(speciesId, desiredFlag); if (desiredFlag == FLAG_SET_CAUGHT) - GetSetPokedexFlag(speciesId,FLAG_SET_SEEN); + GetSetPokedexFlag(speciesId, FLAG_SET_SEEN); return FALSE; } @@ -2527,7 +2527,7 @@ bool8 Scrcmd_getsetpokedexflag(struct ScriptContext *ctx) bool8 Scrcmd_checkspecies(struct ScriptContext *ctx) { u32 givenSpecies = VarGet(ScriptReadHalfword(ctx)); - gSpecialVar_Result = CheckPartyHasSpecie(givenSpecies); + gSpecialVar_Result = CheckPartyHasSpecies(givenSpecies); return FALSE; }