diff --git a/asm/include/overlay_02.inc b/asm/include/overlay_02.inc index b9c0b826eb..03ec8c9232 100644 --- a/asm/include/overlay_02.inc +++ b/asm/include/overlay_02.inc @@ -155,8 +155,8 @@ .public PlayerProfile_GetTrainerID .public PlayerProfile_GetTrainerID_VisibleHalf .public PlayerProfile_GetTrainerGender -.public Pokedex_GetSeenFormeByIdx_Unown -.public Pokedex_GetSeenFormeNum_Unown +.public Pokedex_GetSeenFormByIdx_Unown +.public Pokedex_GetSeenFormNum_Unown .public Save_Pokedex_Get .public Save_Misc_Get .public sub_0202AA44 diff --git a/asm/include/overlay_106.inc b/asm/include/overlay_106.inc index 3f347f71af..e077c17fd3 100644 --- a/asm/include/overlay_106.inc +++ b/asm/include/overlay_106.inc @@ -80,8 +80,8 @@ .public Thunk_G3X_Reset .public sub_02026E50 .public SpeciesToOverworldModelIndexOffset -.public OverworldModelLookupFormeCount -.public OverworldModelLookupHasFemaleForme +.public OverworldModelLookupFormCount +.public OverworldModelLookupHasFemaleForm .public GetMonData .public MonIsShiny .public GetPartyCount diff --git a/asm/include/overlay_112.inc b/asm/include/overlay_112.inc index 7396cbe1de..b60a801133 100644 --- a/asm/include/overlay_112.inc +++ b/asm/include/overlay_112.inc @@ -248,8 +248,8 @@ .public SetFlagInArray .public ClearFlagInArray .public SpeciesToOverworldModelIndexOffset -.public OverworldModelLookupFormeCount -.public OverworldModelLookupHasFemaleForme +.public OverworldModelLookupFormCount +.public OverworldModelLookupHasFemaleForm .public ZeroMonData .public AllocMonZeroed .public AcquireBoxMonLock @@ -260,7 +260,7 @@ .public GetBoxMonData .public SetMonData .public SetBoxMonData -.public AllocAndLoadMonPersonal_HandleAlternateForme +.public AllocAndLoadMonPersonal_HandleAlternateForm .public AllocAndLoadMonPersonal .public GetPersonalAttr .public FreeMonPersonal @@ -274,7 +274,7 @@ .public sub_02070438 .public Mon_GetBoxMon .public CopyBoxPokemonToPokemon -.public Mon_UpdateShayminForme +.public Mon_UpdateShayminForm .public ChangePersonalityToNatureGenderAndAbility .public PCStorage_PlaceMonInBoxByIndexPair .public PCStorage_DeleteBoxMonByIndexPair diff --git a/asm/include/overlay_113.inc b/asm/include/overlay_113.inc index 1ad0e890fb..3860b8d094 100644 --- a/asm/include/overlay_113.inc +++ b/asm/include/overlay_113.inc @@ -101,8 +101,8 @@ .public Save_PlayerData_GetProfileAddr .public Save_PlayerData_GetOptionsAddr .public PlayerProfile_GetPlayerName_NewString -.public Pokedex_GetSeenFormeByIdx_Unown -.public Pokedex_GetSeenFormeNum_Unown +.public Pokedex_GetSeenFormByIdx_Unown +.public Pokedex_GetSeenFormNum_Unown .public Save_Pokedex_Get .public Options_GetTextFrameDelay .public Options_GetFrame diff --git a/asm/include/overlay_12_0224E4FC.inc b/asm/include/overlay_12_0224E4FC.inc index 2daea012fa..3bafcb97a9 100644 --- a/asm/include/overlay_12_0224E4FC.inc +++ b/asm/include/overlay_12_0224E4FC.inc @@ -18,7 +18,7 @@ .public CopyPokemonToPokemon .public GetFlavorPreferenceFromPID .public GetArceusTypeByHeldItemEffect -.public Mon_UpdateGiratinaForme +.public Mon_UpdateGiratinaForm .public sub_020720FC .public MaskOfFlagNo .public GetMoveMaxPP @@ -38,7 +38,7 @@ .public PokedexData_LoadAll .public PokedexData_UnloadAll .public PokedexData_GetWeight -.public SetDexBanksByGiratinaForme +.public SetDexBanksByGiratinaForm .public MIi_CpuClearFast .public _s32_div_f .public _u32_div_f diff --git a/asm/include/overlay_12_battle_command.inc b/asm/include/overlay_12_battle_command.inc index a5c49cd972..a3b7e26396 100644 --- a/asm/include/overlay_12_battle_command.inc +++ b/asm/include/overlay_12_battle_command.inc @@ -70,7 +70,7 @@ .public CalcMonStats .public GetMonData .public SetMonData -.public AllocAndLoadMonPersonal_HandleAlternateForme +.public AllocAndLoadMonPersonal_HandleAlternateForm .public GetPersonalAttr .public FreeMonPersonal .public GetMonBaseStat @@ -83,7 +83,7 @@ .public MonTryLearnMoveOnLevelUp .public CopyPokemonToPokemon .public Party_MaskMonsWithPokerus -.public Mon_UpdateGiratinaForme +.public Mon_UpdateGiratinaForm .public MaskOfFlagNo .public PCStorage_PlaceMonInBoxFirstEmptySlot .public PCStorage_GetActiveBox @@ -341,7 +341,7 @@ .public BtlCmd_CheckChatterActivation .public BtlCmd_GetMoveParam .public BtlCmd_Mosaic -.public BtlCmd_ChangeForme +.public BtlCmd_ChangeForm .public BtlCmd_SetBattleBackground .public BtlCmd_RecoverStatus .public BtlCmd_TryRun diff --git a/asm/include/overlay_12_battle_controller.inc b/asm/include/overlay_12_battle_controller.inc index 5162823e17..8e7253514c 100644 --- a/asm/include/overlay_12_battle_controller.inc +++ b/asm/include/overlay_12_battle_controller.inc @@ -107,7 +107,7 @@ .public BattleControl_EmitPartyStatusHeal .public ov12_02263D14 .public BattleController_EmitPlayMosaicAnimation -.public BattleController_EmitChangeForme +.public BattleController_EmitChangeForm .public BattleController_EmitSetBattleBackground .public ov12_02263E18 .public BattleController_EmitInitStartBallGauge diff --git a/asm/include/overlay_14.inc b/asm/include/overlay_14.inc index eab2415e8e..7608a57eb3 100644 --- a/asm/include/overlay_14.inc +++ b/asm/include/overlay_14.inc @@ -214,17 +214,17 @@ .public GetBoxMonData .public SetMonData .public SetBoxMonData -.public GetMonBaseStatEx_HandleAlternateForme +.public GetMonBaseStatEx_HandleAlternateForm .public GetBoxMonNature .public GetBoxMonGender .public GetBoxmonSpriteCharAndPlttNarcIds .public Mon_GetBoxMon .public CopyBoxPokemonToPokemon .public CopyPokemonToPokemon -.public BoxMon_UpdateArceusForme -.public BoxMon_UpdateGiratinaForme -.public Mon_UpdateShayminForme -.public BoxMon_UpdateShayminForme +.public BoxMon_UpdateArceusForm +.public BoxMon_UpdateGiratinaForm +.public Mon_UpdateShayminForm +.public BoxMon_UpdateShayminForm .public PCStorage_PlaceMonInBoxFirstEmptySlot .public PCStorage_PlaceMonInBoxByIndexPair .public PCStorage_SwapMonsInBoxByIndexPair diff --git a/asm/include/overlay_18.inc b/asm/include/overlay_18.inc index c5b4acdf84..34789502be 100644 --- a/asm/include/overlay_18.inc +++ b/asm/include/overlay_18.inc @@ -229,13 +229,13 @@ .public Pokedex_GetNatDexFlag .public Pokedex_HasCaughtMonWithLanguage .public Pokedex_GetInternationalViewFlag -.public Pokedex_GetSeenFormeByIdx -.public Pokedex_GetSeenFormeNum +.public Pokedex_GetSeenFormByIdx +.public Pokedex_GetSeenFormNum .public MapHeader_GetMapSec .public AcquireMonLock .public ReleaseMonLock .public GetMonData -.public GetMonBaseStat_HandleAlternateForme +.public GetMonBaseStat_HandleAlternateForm .public GetPokemonSpriteCharAndPlttNarcIds .public GetMonSpriteCharAndPlttNarcIdsEx .public sub_020708D8 @@ -250,7 +250,7 @@ .public sub_02091294 .public sub_020912AC .public sub_020912D0 -.public SetDexBanksByGiratinaForme +.public SetDexBanksByGiratinaForm .public GetPokedexDataNarcID .public GetDexWeightMsgBank .public GetDexHeightMsgBank diff --git a/asm/include/overlay_59.inc b/asm/include/overlay_59.inc index b16e0740b7..a055696cd9 100644 --- a/asm/include/overlay_59.inc +++ b/asm/include/overlay_59.inc @@ -178,7 +178,7 @@ .public sub_02032004 .public sub_02032024 .public GetMonData -.public GetMonBaseStat_HandleAlternateForme +.public GetMonBaseStat_HandleAlternateForm .public GetPokemonSpriteCharAndPlttNarcIds .public CalcMonPokeathlonPerformance .public CalcMonPokeathlonStars diff --git a/asm/include/overlay_63.inc b/asm/include/overlay_63.inc index 76fcd469bf..5b50ba6d01 100644 --- a/asm/include/overlay_63.inc +++ b/asm/include/overlay_63.inc @@ -126,8 +126,8 @@ .public GetIGTHours .public GetIGTMinutes .public SpeciesToOverworldModelIndexOffset -.public OverworldModelLookupFormeCount -.public OverworldModelLookupHasFemaleForme +.public OverworldModelLookupFormCount +.public OverworldModelLookupHasFemaleForm .public MonIsInGameTradePoke .public AcquireMonLock .public ReleaseMonLock diff --git a/asm/include/overlay_64.inc b/asm/include/overlay_64.inc index a81e481322..af35fc90b3 100644 --- a/asm/include/overlay_64.inc +++ b/asm/include/overlay_64.inc @@ -100,8 +100,8 @@ .public Save_HOF_GetMonStatsByIndexPair .public Save_HOF_GetClearDate .public SpeciesToOverworldModelIndexOffset -.public OverworldModelLookupFormeCount -.public OverworldModelLookupHasFemaleForme +.public OverworldModelLookupFormCount +.public OverworldModelLookupHasFemaleForm .public GetGenderBySpeciesAndPersonality .public CalcShininessByOtIdAndPersonality .public GetMonSpriteCharAndPlttNarcIdsEx diff --git a/asm/include/overlay_65.inc b/asm/include/overlay_65.inc index be6738308f..4e19235ed0 100644 --- a/asm/include/overlay_65.inc +++ b/asm/include/overlay_65.inc @@ -191,12 +191,12 @@ .public ReleaseMonLock .public GetMonData .public SetMonData -.public GetMonBaseStat_HandleAlternateForme +.public GetMonBaseStat_HandleAlternateForm .public GetPokemonSpriteCharAndPlttNarcIds .public sub_0207083C .public Mon_GetBoxMon .public CopyPokemonToPokemon -.public Mon_UpdateShayminForme +.public Mon_UpdateShayminForm .public Pokemon_RemoveCapsule .public GetMonIconNaixEx .public GetMonIconPaletteEx diff --git a/asm/include/overlay_68.inc b/asm/include/overlay_68.inc index a519ec8d81..43f475a8ab 100644 --- a/asm/include/overlay_68.inc +++ b/asm/include/overlay_68.inc @@ -134,7 +134,7 @@ .public GetMonData .public GetBoxMonData .public SetMonData -.public GetMonBaseStat_HandleAlternateForme +.public GetMonBaseStat_HandleAlternateForm .public GetPokemonSpriteCharAndPlttNarcIds .public Mon_GetBoxMon .public GetMoveAttr diff --git a/asm/include/overlay_70.inc b/asm/include/overlay_70.inc index 97a684f6e1..c16e6295d4 100644 --- a/asm/include/overlay_70.inc +++ b/asm/include/overlay_70.inc @@ -240,8 +240,8 @@ .public GetMonEvolution .public CopyBoxPokemonToPokemon .public CopyPokemonToPokemon -.public Mon_UpdateShayminForme -.public BoxMon_UpdateShayminForme +.public Mon_UpdateShayminForm +.public BoxMon_UpdateShayminForm .public Pokemon_RemoveCapsule .public PCStorage_PlaceMonInBoxFirstEmptySlot .public PCStorage_DeleteBoxMonByIndexPair diff --git a/asm/include/overlay_71.inc b/asm/include/overlay_71.inc index 93c160a3ac..30ecf664ab 100644 --- a/asm/include/overlay_71.inc +++ b/asm/include/overlay_71.inc @@ -137,7 +137,7 @@ .public AcquireBoxMonLock .public ReleaseBoxMonLock .public GetBoxMonData -.public GetMonBaseStat_HandleAlternateForme +.public GetMonBaseStat_HandleAlternateForm .public GetBoxmonSpriteCharAndPlttNarcIds .public sub_02070854 .public sub_02072914 diff --git a/asm/include/overlay_78.inc b/asm/include/overlay_78.inc index 7da08cc90a..920b3e8ee2 100644 --- a/asm/include/overlay_78.inc +++ b/asm/include/overlay_78.inc @@ -84,8 +84,8 @@ .public PlayerProfile_GetTrainerGender .public Save_GetPartyLeadAlive .public SpeciesToOverworldModelIndexOffset -.public OverworldModelLookupFormeCount -.public OverworldModelLookupHasFemaleForme +.public OverworldModelLookupFormCount +.public OverworldModelLookupHasFemaleForm .public GetMonData .public GetMonGender .public MonIsShiny diff --git a/asm/include/overlay_81.inc b/asm/include/overlay_81.inc index f7da3ccd0b..a0d897a0c1 100644 --- a/asm/include/overlay_81.inc +++ b/asm/include/overlay_81.inc @@ -179,7 +179,7 @@ .public sub_0203A880 .public sub_0203A914 .public GetMonData -.public GetMonBaseStat_HandleAlternateForme +.public GetMonBaseStat_HandleAlternateForm .public GetMonGender .public GetPokemonSpriteCharAndPlttNarcIds .public Mon_GetBoxMon diff --git a/asm/include/overlay_96.inc b/asm/include/overlay_96.inc index adc8c9bd7b..972405afb8 100644 --- a/asm/include/overlay_96.inc +++ b/asm/include/overlay_96.inc @@ -328,8 +328,8 @@ .public CheckFlagInArray .public SetFlagInArray .public SpeciesToOverworldModelIndexOffset -.public OverworldModelLookupFormeCount -.public OverworldModelLookupHasFemaleForme +.public OverworldModelLookupFormCount +.public OverworldModelLookupHasFemaleForm .public GetMonBaseStat .public GetMonSpriteCharAndPlttNarcIdsEx .public sub_020708D8 diff --git a/asm/include/overlay_99.inc b/asm/include/overlay_99.inc index 83748e1ebb..5a95aaddf1 100644 --- a/asm/include/overlay_99.inc +++ b/asm/include/overlay_99.inc @@ -76,7 +76,7 @@ .public PlayerProfile_GetTrainerGender .public Pokedex_GetSeenSpindaPersonality .public Pokedex_SpeciesGetLastSeenGender -.public Pokedex_GetSeenFormeByIdx +.public Pokedex_GetSeenFormByIdx .public sub_02031974 .public sub_02031978 .public sub_0203197C diff --git a/asm/include/unk_0205A44C.inc b/asm/include/unk_0205A44C.inc index 3ed59137f9..929bc513bd 100644 --- a/asm/include/unk_0205A44C.inc +++ b/asm/include/unk_0205A44C.inc @@ -14,7 +14,7 @@ .public MailMsg_GetMsgBank .public MailMsg_GetMsgNo .public MailMsg_Copy -.public SaveEasyChat_SetGreetingFlag +.public Save_EasyChat_SetGreetingFlag .public FreeToHeap .public LCRandom .public GF_AssertFail diff --git a/asm/include/unk_0205BB1C.inc b/asm/include/unk_0205BB1C.inc index 33fa952204..19bd189db2 100644 --- a/asm/include/unk_0205BB1C.inc +++ b/asm/include/unk_0205BB1C.inc @@ -12,7 +12,7 @@ .public sub_0205BC78 .public Save_GetPartyLead .public Save_GetPartyLeadAlive -.public Save_PlayerHasRegiInParty +.public Save_PlayerHasAllRegisInParty .public sub_0205BED8 .public sub_0205BFB4 .public MapObject_SetVisible diff --git a/asm/include/unk_02078E30.inc b/asm/include/unk_02078E30.inc index be3f3d39c1..ccce103ce5 100644 --- a/asm/include/unk_02078E30.inc +++ b/asm/include/unk_02078E30.inc @@ -105,8 +105,8 @@ .public GetMonGender .public Mon_GetBoxMon .public GetMonEvolution -.public Pokemon_UpdateArceusForme -.public Mon_UpdateGiratinaForme +.public Pokemon_UpdateArceusForm +.public Mon_UpdateGiratinaForm .public Mon_CanUseGracidea .public IsPokemonBannedFromBattleFrontier .public GetPartyCount @@ -220,5 +220,5 @@ .public _0210159C .public gSystem .public OS_IRQTable -.public PartyMenu_InitIconFormeChangeWork -.public PartyMenu_AnimateIconFormeChange +.public PartyMenu_InitIconFormChangeData +.public PartyMenu_AnimateIconFormChange diff --git a/asm/include/unk_0207F42C.inc b/asm/include/unk_0207F42C.inc index f26baace83..fbeafee739 100644 --- a/asm/include/unk_0207F42C.inc +++ b/asm/include/unk_0207F42C.inc @@ -27,8 +27,8 @@ .public GetMonData .public SetMonData .public Mon_GetBoxMon -.public Pokemon_UpdateArceusForme -.public Mon_UpdateGiratinaForme +.public Pokemon_UpdateArceusForm +.public Mon_UpdateGiratinaForm .public Pokemon_RemoveCapsule .public GetPartyMonByIndex .public Party_SwapSlots @@ -72,4 +72,4 @@ .public _s32_div_f .public _020FA484 .public gNatureStatMods -.public PartyMenu_AnimateIconFormeChange +.public PartyMenu_AnimateIconFormChange diff --git a/asm/include/unk_0208B1AC.inc b/asm/include/unk_0208B1AC.inc index ce41f84002..e287f07e39 100644 --- a/asm/include/unk_0208B1AC.inc +++ b/asm/include/unk_0208B1AC.inc @@ -28,7 +28,7 @@ .public sub_020249D4 .public sub_02024ADC .public sub_02024B1C -.public GetMonBaseStat_HandleAlternateForme +.public GetMonBaseStat_HandleAlternateForm .public CalcBoxMonPokeathlonPerformance .public CalcBoxmonPokeathlonStars .public GetMoveAttr diff --git a/asm/include/unk_02091880.inc b/asm/include/unk_02091880.inc index 3cc2d3b8d4..994e421f0f 100644 --- a/asm/include/unk_02091880.inc +++ b/asm/include/unk_02091880.inc @@ -4,8 +4,8 @@ .public EasyChatManager_Delete .public EasyChatManager_ReadWordIntoString .public GetECWordIndexByPair -.public SaveEasyChat_GetTrendySayingFlag -.public SaveEasyChat_GetGreetingsFlag +.public Save_EasyChat_GetTrendySayingFlag +.public Save_EasyChat_GetGreetingsFlag .public AllocFromHeap .public FreeToHeap .public Pokedex_CheckMonSeenFlag diff --git a/asm/macros/script.inc b/asm/macros/script.inc index d020e222ed..086c032884 100644 --- a/asm/macros/script.inc +++ b/asm/macros/script.inc @@ -3728,7 +3728,7 @@ .short \arg1 .endm - .macro set_mon_forme arg0, arg1 + .macro set_mon_form arg0, arg1 .short 659 .short \arg0 .short \arg1 @@ -3808,7 +3808,7 @@ .short \arg2 .endm - .macro get_owned_rotom_formes arg0, arg1, arg2, arg3, arg4 + .macro get_owned_rotom_forms arg0, arg1, arg2, arg3, arg4 .short 673 .short \arg0 .short \arg1 @@ -3823,7 +3823,7 @@ .short \arg1 .endm - .macro update_rotom_forme arg0, arg1, arg2, arg3 + .macro update_rotom_form arg0, arg1, arg2, arg3 .short 675 .short \arg0 .short \arg1 @@ -3831,7 +3831,7 @@ .short \arg3 .endm - .macro get_party_mon_forme arg0, arg1 + .macro get_party_mon_form arg0, arg1 .short 676 .short \arg0 .short \arg1 @@ -3903,7 +3903,7 @@ .endm ; Attempt to remove all Griseous Orbs and reset Pokemon - ; to formes present in Diamond and Pearl, to avoid + ; to forms present in Diamond and Pearl, to avoid ; problems communicating with those games. .macro comm_sanitize_party var_result .short 689 @@ -4613,7 +4613,7 @@ .short \arg0 .endm - .macro get_partymon_forme arg0, arg1 + .macro get_partymon_form arg0, arg1 .short 827 .short \arg0 .short \arg1 diff --git a/asm/overlay_02.s b/asm/overlay_02.s index 7b307af50c..a7f0fa35a2 100644 --- a/asm/overlay_02.s +++ b/asm/overlay_02.s @@ -5297,7 +5297,7 @@ _02248426: add r0, r7, #0 add r1, r4, #0 mov r2, #1 - bl Pokedex_GetSeenFormeByIdx_Unown + bl Pokedex_GetSeenFormByIdx_Unown cmp r6, r0 bne _02248438 mov r0, #1 @@ -5363,7 +5363,7 @@ _022484A4: ldr r0, [r0, #0x18] mov r1, #1 add r7, r6, #0 - bl Pokedex_GetSeenFormeNum_Unown + bl Pokedex_GetSeenFormNum_Unown lsl r0, r0, #0x18 add r1, r6, #0 lsr r0, r0, #0x18 diff --git a/asm/overlay_106.s b/asm/overlay_106.s index d1140ca34b..0d95c6f791 100644 --- a/asm/overlay_106.s +++ b/asm/overlay_106.s @@ -1807,7 +1807,7 @@ _021E66C6: ldr r1, _021E66F8 ; =MMODEL_FOLLOWER_MON_BULBASAUR add r4, r0, r1 add r0, r5, #0 - bl OverworldModelLookupHasFemaleForme + bl OverworldModelLookupHasFemaleForm cmp r0, #0 beq _021E66E0 cmp r7, #1 @@ -1816,7 +1816,7 @@ _021E66C6: b _021E66EE _021E66E0: add r0, r5, #0 - bl OverworldModelLookupFormeCount + bl OverworldModelLookupFormCount cmp r6, r0 ble _021E66EC mov r6, #0 diff --git a/asm/overlay_112.s b/asm/overlay_112.s index b2a7f3a15a..020df477d5 100644 --- a/asm/overlay_112.s +++ b/asm/overlay_112.s @@ -6060,7 +6060,7 @@ _021E8B94: ldr r0, [sp, #0x14] ldrb r1, [r4, #6] ldrh r0, [r6, r0] - bl AllocAndLoadMonPersonal_HandleAlternateForme + bl AllocAndLoadMonPersonal_HandleAlternateForm str r0, [sp, #0xc] ldr r0, [sp, #0x14] mov r1, #0 @@ -22525,7 +22525,7 @@ _021F0E2A: ldr r1, _021F0E5C ; =0x00000129 add r4, r0, r1 add r0, r5, #0 - bl OverworldModelLookupHasFemaleForme + bl OverworldModelLookupHasFemaleForm cmp r0, #0 beq _021F0E44 cmp r7, #1 @@ -22534,7 +22534,7 @@ _021F0E2A: b _021F0E52 _021F0E44: add r0, r5, #0 - bl OverworldModelLookupFormeCount + bl OverworldModelLookupFormCount cmp r6, r0 ble _021F0E50 mov r6, #0 @@ -27502,7 +27502,7 @@ _021F3420: bne _021F3482 add r0, r5, #0 mov r1, #0 - bl Mon_UpdateShayminForme + bl Mon_UpdateShayminForm ldrh r1, [r6] ldr r0, _021F35A0 ; =0xFFFF07FF and r0, r1 @@ -27623,7 +27623,7 @@ _021F353E: beq _021F357E add r0, r5, #0 mov r1, #1 - bl Mon_UpdateShayminForme + bl Mon_UpdateShayminForm _021F357E: ldr r0, [sp, #0x14] add r6, #0x38 diff --git a/asm/overlay_113.s b/asm/overlay_113.s index 689a205e23..3b842b6879 100644 --- a/asm/overlay_113.s +++ b/asm/overlay_113.s @@ -176,7 +176,7 @@ _021E5A52: add r0, r7, #0 add r1, r4, #0 mov r2, #1 - bl Pokedex_GetSeenFormeByIdx_Unown + bl Pokedex_GetSeenFormByIdx_Unown lsl r0, r0, #0x18 lsr r0, r0, #0x18 add r1, r0, #0 @@ -230,7 +230,7 @@ ov113_021E5A7C: ; 0x021E5A7C strb r0, [r5, #0x1d] ldr r0, [r5, #0xc] mov r1, #1 - bl Pokedex_GetSeenFormeNum_Unown + bl Pokedex_GetSeenFormNum_Unown strb r0, [r5, #0x1f] add r0, r5, #0 add r0, #0x3c @@ -274,7 +274,7 @@ _021E5B1A: ldr r0, [r5, #0xc] add r1, r4, #0 add r2, r6, #0 - bl Pokedex_GetSeenFormeByIdx_Unown + bl Pokedex_GetSeenFormByIdx_Unown add r1, r5, r4 add r1, #0x20 strb r0, [r1] diff --git a/asm/overlay_12_0224E4FC_s.s b/asm/overlay_12_0224E4FC_s.s index 631b2889d7..eea2c3cde5 100644 --- a/asm/overlay_12_0224E4FC_s.s +++ b/asm/overlay_12_0224E4FC_s.s @@ -4172,11 +4172,11 @@ _02256DB8: mov r0, #0 str r0, [sp, #0xc] add r0, r4, #0 - mov r1, #MON_DATA_FORME + mov r1, #MON_DATA_FORM add r2, sp, #0xc bl SetMonData add r0, r4, #0 - bl Mon_UpdateGiratinaForme + bl Mon_UpdateGiratinaForm add r0, r4, #0 mov r1, #0xa5 mov r2, #0 diff --git a/asm/overlay_12_battle_command.s b/asm/overlay_12_battle_command.s index ab1c677e12..f53d9194a5 100644 --- a/asm/overlay_12_battle_command.s +++ b/asm/overlay_12_battle_command.s @@ -1397,7 +1397,7 @@ ov12_022463E8: ; 0x022463E8 add r1, r3, #0 mov r2, #5 mov r4, #0 - bl AllocAndLoadMonPersonal_HandleAlternateForme + bl AllocAndLoadMonPersonal_HandleAlternateForm add r7, r0, #0 ldr r0, [sp] ldr r1, [sp, #4] @@ -2768,7 +2768,7 @@ _02246F7E: cmp r5, #4 blt _02246F7E add r0, r6, #0 - bl Mon_UpdateGiratinaForme + bl Mon_UpdateGiratinaForm mov r1, #0 mvn r1, r1 cmp r0, r1 @@ -5961,7 +5961,7 @@ sBattleScriptCommandTable: ; 0x0226C6C8 .word BtlCmd_CheckChatterActivation .word BtlCmd_GetMoveParam .word BtlCmd_Mosaic - .word BtlCmd_ChangeForme + .word BtlCmd_ChangeForm .word BtlCmd_SetBattleBackground .word BtlCmd_RecoverStatus .word BtlCmd_TryRun diff --git a/asm/overlay_12_battle_controller.s b/asm/overlay_12_battle_controller.s index 5029a5ced2..37e8e34c3b 100644 --- a/asm/overlay_12_battle_controller.s +++ b/asm/overlay_12_battle_controller.s @@ -3783,8 +3783,8 @@ BattleController_EmitPlayMosaicAnimation: ; 0x02263D48 .balign 4, 0 thumb_func_end BattleController_EmitPlayMosaicAnimation - thumb_func_start BattleController_EmitChangeForme -BattleController_EmitChangeForme: ; 0x02263D6C + thumb_func_start BattleController_EmitChangeForm +BattleController_EmitChangeForm: ; 0x02263D6C push {r3, r4, r5, r6, r7, lr} sub sp, #0x10 add r7, r1, #0 @@ -3858,7 +3858,7 @@ _02263DD6: pop {r3, r4, r5, r6, r7, pc} .balign 4, 0 _02263DF8: .word 0x00002D66 - thumb_func_end BattleController_EmitChangeForme + thumb_func_end BattleController_EmitChangeForm thumb_func_start BattleController_EmitSetBattleBackground BattleController_EmitSetBattleBackground: ; 0x02263DFC diff --git a/asm/overlay_14.s b/asm/overlay_14.s index f994aa7053..6c1e6783ad 100644 --- a/asm/overlay_14.s +++ b/asm/overlay_14.s @@ -1309,7 +1309,7 @@ ov14_021E6318: ; 0x021E6318 bne _021E6350 ldr r0, [r4] mov r1, #0 - bl Mon_UpdateShayminForme + bl Mon_UpdateShayminForm _021E6350: ldr r0, [r4] bl Mon_GetBoxMon @@ -1523,7 +1523,7 @@ ov14_021E64D0: ; 0x021E64D0 lsl r0, r0, #0x10 lsr r5, r0, #0x10 add r0, r4, #0 - bl BoxMon_UpdateArceusForme + bl BoxMon_UpdateArceusForm add r0, r4, #0 mov r1, #0x70 mov r2, #0 @@ -1545,7 +1545,7 @@ _021E6510: lsl r0, r0, #0x10 lsr r5, r0, #0x10 add r0, r4, #0 - bl BoxMon_UpdateGiratinaForme + bl BoxMon_UpdateGiratinaForm add r0, r4, #0 mov r1, #0x70 mov r2, #0 @@ -1603,7 +1603,7 @@ _021E6564: add r2, r4, #0 bl ov14_021E60C0 mov r1, #0 - bl BoxMon_UpdateShayminForme + bl BoxMon_UpdateShayminForm ldr r3, [r5, #0x34] ldrb r1, [r5, #0x1f] add r6, r3, r4 @@ -30534,7 +30534,7 @@ _021F4A8A: lsl r0, r0, #4 ldr r0, [r1, r0] add r1, r4, #0 - bl GetMonBaseStatEx_HandleAlternateForme + bl GetMonBaseStatEx_HandleAlternateForm lsl r0, r0, #0x10 lsr r1, r0, #0x10 b _021F4AFC diff --git a/asm/overlay_18.s b/asm/overlay_18.s index 93d39cfc64..13cf0a8487 100644 --- a/asm/overlay_18.s +++ b/asm/overlay_18.s @@ -310,12 +310,12 @@ _021E5B12: ldr r1, _021E5B5C ; =0x000001E7 ldr r0, [r0] mov r2, #0 - bl Pokedex_GetSeenFormeByIdx - bl SetDexBanksByGiratinaForme + bl Pokedex_GetSeenFormByIdx + bl SetDexBanksByGiratinaForm b _021E5B38 _021E5B32: mov r0, #0 - bl SetDexBanksByGiratinaForme + bl SetDexBanksByGiratinaForm _021E5B38: mov r0, #1 mov r1, #0x2a @@ -5159,7 +5159,7 @@ _021E82F4: _021E82FA: ldr r0, [r5] ldr r0, [r0] - bl Pokedex_GetSeenFormeNum + bl Pokedex_GetSeenFormNum ldr r1, _021E83C8 ; =0x000018C4 mov r4, #0 strb r0, [r5, r1] @@ -5175,7 +5175,7 @@ _021E8314: ldrh r1, [r5, r1] ldr r0, [r0] add r2, r4, #0 - bl Pokedex_GetSeenFormeByIdx + bl Pokedex_GetSeenFormByIdx mov r1, #0x80 orr r1, r0 add r0, r5, r4 @@ -16362,7 +16362,7 @@ _021EDE14: add r1, r4, #0 ldr r0, [r0] mov r2, #0 - bl Pokedex_GetSeenFormeByIdx + bl Pokedex_GetSeenFormByIdx add r5, r0, #0 cmp r4, #0xac bne _021EDE30 @@ -23310,7 +23310,7 @@ ov18_021F1598: ; 0x021F1598 ldr r0, [r5] mov r2, #0 ldr r0, [r0] - bl Pokedex_GetSeenFormeByIdx + bl Pokedex_GetSeenFormByIdx add r2, r0, #0 ldr r0, [sp, #4] ldrh r1, [r0, r4] @@ -24128,7 +24128,7 @@ _021F1C3C: add r1, r6, #0 ldr r0, [r0] mov r2, #0 - bl Pokedex_GetSeenFormeByIdx + bl Pokedex_GetSeenFormByIdx add r2, r0, #0 cmp r6, #0xac bne _021F1C88 @@ -24329,7 +24329,7 @@ ov18_021F1DE4: ; 0x021F1DE4 ldr r0, [r5] mov r2, #0 ldr r0, [r0] - bl Pokedex_GetSeenFormeByIdx + bl Pokedex_GetSeenFormByIdx cmp r0, #1 bne _021F1E2E _021F1E1A: @@ -24718,7 +24718,7 @@ _021F213A: add r1, r6, #0 ldr r0, [r0] mov r2, #0 - bl Pokedex_GetSeenFormeByIdx + bl Pokedex_GetSeenFormByIdx add r7, r0, #0 cmp r6, #0xac bne _021F2174 @@ -24732,7 +24732,7 @@ _021F2174: add r0, r6, #0 add r1, r7, #0 mov r2, #6 - bl GetMonBaseStat_HandleAlternateForme + bl GetMonBaseStat_HandleAlternateForm lsl r0, r0, #0x10 lsr r0, r0, #0x10 str r0, [sp, #4] @@ -24751,7 +24751,7 @@ _021F2174: add r0, r6, #0 add r1, r7, #0 mov r2, #7 - bl GetMonBaseStat_HandleAlternateForme + bl GetMonBaseStat_HandleAlternateForm lsl r0, r0, #0x10 lsr r2, r0, #0x10 beq _021F21B6 diff --git a/asm/overlay_59.s b/asm/overlay_59.s index 6c6e2726ea..87eddead1b 100644 --- a/asm/overlay_59.s +++ b/asm/overlay_59.s @@ -7937,7 +7937,7 @@ ov59_0223BA64: ; 0x0223BA64 add r1, r0, #0 ldrh r0, [r5, #4] mov r2, #0x1c - bl GetMonBaseStat_HandleAlternateForme + bl GetMonBaseStat_HandleAlternateForm mov r1, #1 eor r0, r1 strb r0, [r5, #9] diff --git a/asm/overlay_63.s b/asm/overlay_63.s index 49b6eca619..ee2bb67ceb 100644 --- a/asm/overlay_63.s +++ b/asm/overlay_63.s @@ -4628,7 +4628,7 @@ _0221E41A: ldr r1, _0221E44C ; =0x00000129 add r4, r0, r1 add r0, r5, #0 - bl OverworldModelLookupHasFemaleForme + bl OverworldModelLookupHasFemaleForm cmp r0, #0 beq _0221E434 cmp r7, #1 @@ -4637,7 +4637,7 @@ _0221E41A: b _0221E442 _0221E434: add r0, r5, #0 - bl OverworldModelLookupFormeCount + bl OverworldModelLookupFormCount cmp r6, r0 ble _0221E440 mov r6, #0 diff --git a/asm/overlay_64.s b/asm/overlay_64.s index af8354b52a..f46fdb9ddd 100644 --- a/asm/overlay_64.s +++ b/asm/overlay_64.s @@ -2621,7 +2621,7 @@ _021E6E46: ldr r1, _021E6E78 ; =0x00000129 add r4, r0, r1 add r0, r5, #0 - bl OverworldModelLookupHasFemaleForme + bl OverworldModelLookupHasFemaleForm cmp r0, #0 beq _021E6E60 cmp r7, #1 @@ -2630,7 +2630,7 @@ _021E6E46: b _021E6E6E _021E6E60: add r0, r5, #0 - bl OverworldModelLookupFormeCount + bl OverworldModelLookupFormCount cmp r6, r0 ble _021E6E6C mov r6, #0 diff --git a/asm/overlay_65.s b/asm/overlay_65.s index 53f057b198..c17e873d45 100644 --- a/asm/overlay_65.s +++ b/asm/overlay_65.s @@ -970,7 +970,7 @@ _0221C64A: beq _0221C678 add r0, r6, #0 mov r1, #0 - bl Mon_UpdateShayminForme + bl Mon_UpdateShayminForm _0221C678: ldr r0, [r4, #8] add r5, r5, #1 @@ -1423,7 +1423,7 @@ ov65_0221C9D8: ; 0x0221C9D8 beq _0221CA50 ldrb r1, [r4, #6] mov r2, #0x1c - bl GetMonBaseStat_HandleAlternateForme + bl GetMonBaseStat_HandleAlternateForm strh r0, [r4, #0xa] _0221CA50: cmp r6, #0 diff --git a/asm/overlay_68.s b/asm/overlay_68.s index 5edc03f7a2..b2e96533da 100644 --- a/asm/overlay_68.s +++ b/asm/overlay_68.s @@ -3176,7 +3176,7 @@ ov68_021E7224: ; 0x021E7224 add r1, r0, #0 add r0, r6, #0 mov r2, #0x1c - bl GetMonBaseStat_HandleAlternateForme + bl GetMonBaseStat_HandleAlternateForm add r3, r0, #0 mov r2, #1 ldr r0, [r5, #0x18] diff --git a/asm/overlay_70.s b/asm/overlay_70.s index 9ce954a0b2..cbecbc10c1 100644 --- a/asm/overlay_70.s +++ b/asm/overlay_70.s @@ -15774,7 +15774,7 @@ ov70_0223F6E4: ; 0x0223F6E4 lsl r0, r0, #2 ldr r0, [r4, r0] mov r1, #0 - bl Mon_UpdateShayminForme + bl Mon_UpdateShayminForm bl SizeOfStructPokemon add r2, r0, #0 mov r0, #0x49 @@ -15788,7 +15788,7 @@ _0223F718: lsl r0, r0, #2 ldr r0, [r4, r0] mov r1, #0 - bl BoxMon_UpdateShayminForme + bl BoxMon_UpdateShayminForm mov r0, #0x49 lsl r0, r0, #2 ldr r0, [r4, r0] diff --git a/asm/overlay_71.s b/asm/overlay_71.s index c530c03ac7..281013721b 100644 --- a/asm/overlay_71.s +++ b/asm/overlay_71.s @@ -223,7 +223,7 @@ ov71_02246B28: ; 0x02246B28 add r1, r0, #0 add r0, r4, #0 mov r2, #0x1c - bl GetMonBaseStat_HandleAlternateForme + bl GetMonBaseStat_HandleAlternateForm cmp r0, #0 bne _02246B52 mov r0, #1 diff --git a/asm/overlay_78.s b/asm/overlay_78.s index 5ebb9562f1..ea7c7aa2ef 100644 --- a/asm/overlay_78.s +++ b/asm/overlay_78.s @@ -1655,7 +1655,7 @@ _021E669E: ldr r1, _021E66D0 ; =0x00000129 add r4, r0, r1 add r0, r5, #0 - bl OverworldModelLookupHasFemaleForme + bl OverworldModelLookupHasFemaleForm cmp r0, #0 beq _021E66B8 cmp r7, #1 @@ -1664,7 +1664,7 @@ _021E669E: b _021E66C6 _021E66B8: add r0, r5, #0 - bl OverworldModelLookupFormeCount + bl OverworldModelLookupFormCount cmp r6, r0 ble _021E66C4 mov r6, #0 diff --git a/asm/overlay_81.s b/asm/overlay_81.s index 44e7f5a8c2..4e05e974e4 100644 --- a/asm/overlay_81.s +++ b/asm/overlay_81.s @@ -6140,7 +6140,7 @@ ov81_02240F48: ; 0x02240F48 add r1, r0, #0 add r0, r7, #0 mov r2, #0x1c - bl GetMonBaseStat_HandleAlternateForme + bl GetMonBaseStat_HandleAlternateForm cmp r0, #0 bne _02240FA0 ldr r0, [r5, r4] diff --git a/asm/overlay_96.s b/asm/overlay_96.s index ad2342b8e5..e652301e4e 100644 --- a/asm/overlay_96.s +++ b/asm/overlay_96.s @@ -7683,7 +7683,7 @@ _021E91CE: ldr r1, _021E9200 ; =0x00000129 add r4, r0, r1 add r0, r5, #0 - bl OverworldModelLookupHasFemaleForme + bl OverworldModelLookupHasFemaleForm cmp r0, #0 beq _021E91E8 cmp r7, #1 @@ -7692,7 +7692,7 @@ _021E91CE: b _021E91F6 _021E91E8: add r0, r5, #0 - bl OverworldModelLookupFormeCount + bl OverworldModelLookupFormCount cmp r6, r0 ble _021E91F4 mov r6, #0 diff --git a/asm/overlay_99.s b/asm/overlay_99.s index 6f9fd1e55e..f7aa7d796f 100644 --- a/asm/overlay_99.s +++ b/asm/overlay_99.s @@ -3191,7 +3191,7 @@ _021E71F4: bl ov99_021E71DC add r1, r4, #0 mov r2, #0 - bl Pokedex_GetSeenFormeByIdx + bl Pokedex_GetSeenFormByIdx pop {r4, pc} nop _021E7204: .word 0x000001ED diff --git a/asm/scrcmd_move_tutor.s b/asm/scrcmd_move_tutor.s index 905de7af0b..93093d9951 100644 --- a/asm/scrcmd_move_tutor.s +++ b/asm/scrcmd_move_tutor.s @@ -196,9 +196,9 @@ _02202C74: .balign 4, 0 thumb_func_end ScrCmd_656 - thumb_func_start SpeciesAndFormeToWazaOshieIndex -SpeciesAndFormeToWazaOshieIndex: ; 0x02202C7C - ; Convert species and forme into + thumb_func_start SpeciesAndFormToMoveTutorIndex +SpeciesAndFormToMoveTutorIndex: ; 0x02202C7C + ; Convert species and form into ; naix for tutor compat ldr r2, _02202D3C ; =SPECIES_ROTOM cmp r0, r2 @@ -313,7 +313,7 @@ _02202D32: bx lr nop _02202D3C: .word SPECIES_ROTOM - thumb_func_end SpeciesAndFormeToWazaOshieIndex + thumb_func_end SpeciesAndFormToMoveTutorIndex thumb_func_start MonGetTutorCompat MonGetTutorCompat: ; 0x02202D40 @@ -336,7 +336,7 @@ _02202D4E: add r5, r5, #2 cmp r4, #4 blt _02202D4E - ; Get species and forme, then + ; Get species and form, then ; get tutor compat flags add r0, r6, #0 mov r1, #5 @@ -352,10 +352,10 @@ _02202D4E: lsl r1, r1, #0x18 lsr r0, r0, #0x10 lsr r1, r1, #0x18 - bl SpeciesAndFormeToWazaOshieIndex + bl SpeciesAndFormToMoveTutorIndex add r1, r0, #0 mov r0, #0xb - bl WazaOshieGet + bl MoveTutorGet mov r6, #0 mov ip, r0 ldr r1, _02202DFC ; =sTutorMoves @@ -419,8 +419,8 @@ _02202DE6: _02202DFC: .word sTutorMoves thumb_func_end MonGetTutorCompat - thumb_func_start WazaOshieGet -WazaOshieGet: ; 0x02202E00 + thumb_func_start MoveTutorGet +MoveTutorGet: ; 0x02202E00 push {r3, r4, r5, lr} sub sp, #0x48 add r5, r0, #0 @@ -465,7 +465,7 @@ _02202E34: nop _02202E60: .word ov01_02209AF4 _02202E64: .word 505 * 8 - thumb_func_end WazaOshieGet + thumb_func_end MoveTutorGet thumb_func_start ScrCmd_MoveTutorChooseMove ScrCmd_MoveTutorChooseMove: ; 0x02202E68 diff --git a/asm/unk_0202B614.s b/asm/unk_0202B614.s index 48a88c7598..c9a754aecf 100644 --- a/asm/unk_0202B614.s +++ b/asm/unk_0202B614.s @@ -96,7 +96,7 @@ sub_0202B684: ; 0x0202B684 bl GetMonData str r0, [r5, #4] add r0, r4, #0 - mov r1, #MON_DATA_FORME + mov r1, #MON_DATA_FORM mov r2, #0 bl GetMonData add r1, r5, #0 diff --git a/asm/unk_0205A44C.s b/asm/unk_0205A44C.s index 5da97f9ef5..05bd02e710 100644 --- a/asm/unk_0205A44C.s +++ b/asm/unk_0205A44C.s @@ -1020,7 +1020,7 @@ _0205AADE: cmp r1, #0 blt _0205AB1C ldr r0, [sp, #0x20] - bl SaveEasyChat_SetGreetingFlag + bl Save_EasyChat_SetGreetingFlag _0205AB1C: cmp r4, #7 bhi _0205AB54 diff --git a/asm/unk_0205BB1C.s b/asm/unk_0205BB1C.s index 225f99ddc6..cd1485e695 100644 --- a/asm/unk_0205BB1C.s +++ b/asm/unk_0205BB1C.s @@ -391,8 +391,8 @@ _0205BDAE: _0205BDB4: .word 0x00000000 thumb_func_end Save_GetPartyLeadAlive - thumb_func_start Save_PlayerHasRegiInParty -Save_PlayerHasRegiInParty: ; 0x0205BDB8 + thumb_func_start Save_PlayerHasAllRegisInParty +Save_PlayerHasAllRegisInParty: ; 0x0205BDB8 push {r3, r4, r5, r6, r7, lr} sub sp, #0x10 mov r7, #0 @@ -452,7 +452,7 @@ _0205BE1E: pop {r3, r4, r5, r6, r7, pc} .balign 4, 0 _0205BE24: .word sRegiSpecies - thumb_func_end Save_PlayerHasRegiInParty + thumb_func_end Save_PlayerHasAllRegisInParty thumb_func_start sub_0205BE28 sub_0205BE28: ; 0x0205BE28 diff --git a/asm/unk_02078E30.s b/asm/unk_02078E30.s index bf875e9dc5..1f3cb88536 100644 --- a/asm/unk_02078E30.s +++ b/asm/unk_02078E30.s @@ -437,7 +437,7 @@ _020791A6: str r0, [r4] b _020791EE _020791AE: - bl PartyMenu_AnimateIconFormeChange + bl PartyMenu_AnimateIconFormChange cmp r0, #1 bne _020791C2 add r0, r5, #0 @@ -7031,9 +7031,9 @@ sub_0207C5D4: ; 0x0207C5D4 add r2, sp, #0 bl SetMonData add r0, r6, #0 - bl Pokemon_UpdateArceusForme + bl Pokemon_UpdateArceusForm add r0, r6, #0 - bl Mon_UpdateGiratinaForme + bl Mon_UpdateGiratinaForm str r0, [r4] ldr r1, _0207C650 ; =0x00000C65 ldr r0, _0207C64C ; =0x00000654 @@ -7092,9 +7092,9 @@ sub_0207C658: ; 0x0207C658 add r2, sp, #0x1c bl SetMonData add r0, r5, #0 - bl Pokemon_UpdateArceusForme + bl Pokemon_UpdateArceusForm add r0, r5, #0 - bl Mon_UpdateGiratinaForme + bl Mon_UpdateGiratinaForm ldr r1, _0207C6B4 ; =0x00000C65 mov r2, #0x30 ldrb r3, [r4, r1] @@ -7168,7 +7168,7 @@ _0207C708: .word 0x00000C64 sub_0207C70C: ; 0x0207C70C push {r4, lr} add r4, r0, #0 - bl PartyMenu_AnimateIconFormeChange + bl PartyMenu_AnimateIconFormChange cmp r0, #1 bne _0207C722 add r0, r4, #0 @@ -7717,7 +7717,7 @@ sub_0207CB54: ; 0x0207CB54 mov r1, #2 bl HandleLoadOverlay add r0, r4, #0 - bl PartyMenu_InitIconFormeChangeWork + bl PartyMenu_InitIconFormChangeData pop {r4, pc} .balign 4, 0 _0207CB68: .word FS_OVERLAY_ID(OVY_94) diff --git a/asm/unk_0207F42C.s b/asm/unk_0207F42C.s index d1682a9236..fe2a7d7e59 100644 --- a/asm/unk_0207F42C.s +++ b/asm/unk_0207F42C.s @@ -210,9 +210,9 @@ _0207F590: add r2, sp, #0 bl SetMonData add r0, r6, #0 - bl Pokemon_UpdateArceusForme + bl Pokemon_UpdateArceusForm add r0, r6, #0 - bl Mon_UpdateGiratinaForme + bl Mon_UpdateGiratinaForm ldr r1, _0207F684 ; =0x00000C65 ldrb r2, [r5, r1] mov r1, #0x30 @@ -377,7 +377,7 @@ _0207F71C: .word 0x00000C64 sub_0207F720: ; 0x0207F720 push {r4, lr} add r4, r0, #0 - bl PartyMenu_AnimateIconFormeChange + bl PartyMenu_AnimateIconFormChange cmp r0, #1 bne _0207F736 add r0, r4, #0 @@ -656,9 +656,9 @@ sub_0207F924: ; 0x0207F924 add r2, sp, #0 bl SetMonData add r0, r5, #0 - bl Pokemon_UpdateArceusForme + bl Pokemon_UpdateArceusForm add r0, r5, #0 - bl Mon_UpdateGiratinaForme + bl Mon_UpdateGiratinaForm ldr r1, _0207F9BC ; =0x00000C65 mov r2, #0x30 ldrb r3, [r4, r1] diff --git a/asm/unk_0208B1AC.s b/asm/unk_0208B1AC.s index 9110ad8459..ae47efd56d 100644 --- a/asm/unk_0208B1AC.s +++ b/asm/unk_0208B1AC.s @@ -1653,7 +1653,7 @@ sub_0208BE70: ; 0x0208BE70 add r1, #0x42 ldrh r1, [r4, r1] mov r2, #0x1c - bl GetMonBaseStat_HandleAlternateForme + bl GetMonBaseStat_HandleAlternateForm add r2, r0, #0 mov r0, #0x45 lsl r0, r0, #4 diff --git a/asm/unk_020910D8.s b/asm/unk_020910D8.s index a551bc2742..5156dbb524 100644 --- a/asm/unk_020910D8.s +++ b/asm/unk_020910D8.s @@ -132,7 +132,7 @@ _0209119A: mov r2, #0 str r0, [r1, #0x10] ldr r0, [r4, #0xc] - mov r1, #MON_DATA_FORME + mov r1, #MON_DATA_FORM bl GetMonData ldr r1, [r4, #8] str r0, [r1, #8] diff --git a/asm/unk_02091880.s b/asm/unk_02091880.s index 7cfaae1eec..cd7cc51e2b 100644 --- a/asm/unk_02091880.s +++ b/asm/unk_02091880.s @@ -214,7 +214,7 @@ _020919EC: ldr r1, [sp, #8] ldr r0, [sp, #0xc] sub r1, r2, r1 - bl SaveEasyChat_GetTrendySayingFlag + bl Save_EasyChat_GetTrendySayingFlag cmp r0, #0 beq _02091A1E ldrh r3, [r5] @@ -282,7 +282,7 @@ _02091A68: bhi _02091A80 ldr r0, [sp, #0x10] sub r1, r1, r6 - bl SaveEasyChat_GetGreetingsFlag + bl Save_EasyChat_GetGreetingsFlag cmp r0, #0 beq _02091AA2 _02091A80: diff --git a/asm/unk_020932E0.s b/asm/unk_020932E0.s index 087253ad9d..78056edd99 100644 --- a/asm/unk_020932E0.s +++ b/asm/unk_020932E0.s @@ -3521,7 +3521,7 @@ sub_02094F14: ; 0x02094F14 bl GetMonData strh r0, [r4, #8] add r0, r5, #0 - mov r1, #MON_DATA_FORME + mov r1, #MON_DATA_FORM mov r2, #0 bl GetMonData strh r0, [r4, #0xa] diff --git a/files/fielddata/script/scr_seq/scr_seq_0004.s b/files/fielddata/script/scr_seq/scr_seq_0004.s index 2951181073..a361f1bac5 100644 --- a/files/fielddata/script/scr_seq/scr_seq_0004.s +++ b/files/fielddata/script/scr_seq/scr_seq_0004.s @@ -748,7 +748,7 @@ _0C4F: get_partymon_species VAR_TEMP_x400A, VAR_SPECIAL_RESULT compare VAR_SPECIAL_RESULT, 172 goto_if_ne _0C7B - get_partymon_forme VAR_TEMP_x400A, VAR_SPECIAL_RESULT + get_partymon_form VAR_TEMP_x400A, VAR_SPECIAL_RESULT compare VAR_SPECIAL_RESULT, 1 goto_if_ne _0C7B goto _0E45 diff --git a/files/fielddata/script/scr_seq/scr_seq_0164.s b/files/fielddata/script/scr_seq/scr_seq_0164.s index 654f46a298..77c5209bce 100644 --- a/files/fielddata/script/scr_seq/scr_seq_0164.s +++ b/files/fielddata/script/scr_seq/scr_seq_0164.s @@ -135,7 +135,7 @@ _0215: get_partymon_species VAR_TEMP_x400A, VAR_SPECIAL_RESULT compare VAR_SPECIAL_RESULT, 172 goto_if_ne _0241 - get_partymon_forme VAR_TEMP_x400A, VAR_SPECIAL_RESULT + get_partymon_form VAR_TEMP_x400A, VAR_SPECIAL_RESULT compare VAR_SPECIAL_RESULT, 1 goto_if_ne _0241 goto _04F8 diff --git a/files/fielddata/script/scr_seq/scr_seq_0838_T11R0702.s b/files/fielddata/script/scr_seq/scr_seq_0838_T11R0702.s index 190e496d47..4a77ef9109 100644 --- a/files/fielddata/script/scr_seq/scr_seq_0838_T11R0702.s +++ b/files/fielddata/script/scr_seq/scr_seq_0838_T11R0702.s @@ -21,7 +21,7 @@ scr_seq_T11R0702_006: setflag FLAG_HIDE_SILPH_ROTOM_FROST setflag FLAG_HIDE_SILPH_ROTOM_FAN setflag FLAG_HIDE_SILPH_ROTOM_MOW - get_owned_rotom_formes VAR_TEMP_x4000, VAR_TEMP_x4001, VAR_TEMP_x4002, VAR_TEMP_x4003, VAR_TEMP_x4004 + get_owned_rotom_forms VAR_TEMP_x4000, VAR_TEMP_x4001, VAR_TEMP_x4002, VAR_TEMP_x4003, VAR_TEMP_x4004 compare VAR_TEMP_x4000, 0 call_if_eq _0085 compare VAR_TEMP_x4001, 0 @@ -146,11 +146,11 @@ _0231: _0252: bufferpartymonnick 0, VAR_SPECIAL_x8000 npc_msg msg_0538_T11R0702_00011 - update_rotom_forme VAR_SPECIAL_x8000, 0, 0, 0 + update_rotom_form VAR_SPECIAL_x8000, 0, 0, 0 fade_screen 6, 1, 0, RGB_BLACK wait_fade closemsg - get_party_mon_forme VAR_SPECIAL_x8000, VAR_SPECIAL_x8004 + get_party_mon_form VAR_SPECIAL_x8000, VAR_SPECIAL_x8004 compare VAR_SPECIAL_x8004, 1 call_if_eq _0300 compare VAR_SPECIAL_x8004, 3 @@ -218,7 +218,7 @@ _0332: goto_if_eq _041A compare VAR_SPECIAL_RESULT, 479 goto_if_ne _0427 - get_party_mon_forme VAR_SPECIAL_x8000, VAR_SPECIAL_RESULT + get_party_mon_form VAR_SPECIAL_x8000, VAR_SPECIAL_RESULT compare VAR_SPECIAL_RESULT, 0 goto_if_eq _039F goto _0252 @@ -389,7 +389,7 @@ _0649: .byte 0x02 .byte 0x00 _0671: - update_rotom_forme VAR_SPECIAL_x8000, VAR_SPECIAL_x8002, VAR_SPECIAL_x8001, VAR_SPECIAL_x8004 + update_rotom_form VAR_SPECIAL_x8000, VAR_SPECIAL_x8002, VAR_SPECIAL_x8001, VAR_SPECIAL_x8004 fade_screen 6, 1, 0, RGB_BLACK wait_fade closemsg diff --git a/files/fielddata/script/scr_seq/scr_seq_0843_T20R0101.s b/files/fielddata/script/scr_seq/scr_seq_0843_T20R0101.s index 965912e001..7d4717af8e 100644 --- a/files/fielddata/script/scr_seq/scr_seq_0843_T20R0101.s +++ b/files/fielddata/script/scr_seq/scr_seq_0843_T20R0101.s @@ -283,7 +283,7 @@ _03BA: get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001 compare VAR_TEMP_x4001, 172 goto_if_ne _03F5 - get_partymon_forme VAR_TEMP_x4000, VAR_SPECIAL_RESULT + get_partymon_form VAR_TEMP_x4000, VAR_SPECIAL_RESULT compare VAR_SPECIAL_RESULT, 1 goto_if_eq _0CDC _03F5: diff --git a/files/fielddata/script/scr_seq/scr_seq_0913_T26GYM0101.s b/files/fielddata/script/scr_seq/scr_seq_0913_T26GYM0101.s index 00f0ae7d71..a9a64d498b 100644 --- a/files/fielddata/script/scr_seq/scr_seq_0913_T26GYM0101.s +++ b/files/fielddata/script/scr_seq/scr_seq_0913_T26GYM0101.s @@ -194,7 +194,7 @@ _0264: goto_if_eq _034B copyvar VAR_SPECIAL_x8004, VAR_SPECIAL_RESULT get_partymon_species VAR_SPECIAL_x8004, VAR_TEMP_x4003 - get_partymon_forme VAR_SPECIAL_x8004, VAR_TEMP_x4004 + get_partymon_form VAR_SPECIAL_x8004, VAR_TEMP_x4004 compare VAR_TEMP_x4003, 0 goto_if_eq _0356 compare VAR_TEMP_x4004, 0 diff --git a/files/fielddata/wazaoshie/waza_oshie.json.txt b/files/fielddata/wazaoshie/waza_oshie.json.txt index e20d7d1010..eea23c24d3 100644 --- a/files/fielddata/wazaoshie/waza_oshie.json.txt +++ b/files/fielddata/wazaoshie/waza_oshie.json.txt @@ -40,9 +40,9 @@ .rodata - .global gWazaOshieMoves - .type gWazaOshieMoves,@object -gWazaOshieMoves: + .global gMoveTutorMoves + .type gMoveTutorMoves,@object +gMoveTutorMoves: ## for set in tutor oshie_begin ## for move in set.moves @@ -50,4 +50,4 @@ gWazaOshieMoves: ## endfor oshie_end ## endfor - .size gWazaOshieMoves,.-gWazaOshieMoves + .size gMoveTutorMoves,.-gMoveTutorMoves diff --git a/include/battle.h b/include/battle.h index d674168a8d..b9c91467c0 100644 --- a/include/battle.h +++ b/include/battle.h @@ -205,7 +205,7 @@ typedef struct BATTLEMON { int weight; u8 type1; u8 type2; - u8 forme:5; + u8 form:5; u8 shiny:1; u8 unk26_6:2; u8 ability; diff --git a/include/battle_command.h b/include/battle_command.h index 30e0a5cc5b..6fb7b24676 100644 --- a/include/battle_command.h +++ b/include/battle_command.h @@ -193,7 +193,7 @@ BOOL BtlCmd_CheckEffectActivation(BattleSystem *bsys, BATTLECONTEXT *ctx); BOOL BtlCmd_CheckChatterActivation(BattleSystem *bsys, BATTLECONTEXT *ctx); BOOL BtlCmd_GetMoveParam(BattleSystem *bsys, BATTLECONTEXT *ctx); BOOL BtlCmd_Mosaic(BattleSystem *bsys, BATTLECONTEXT *ctx); -BOOL BtlCmd_ChangeForme(BattleSystem *bsys, BATTLECONTEXT *ctx); +BOOL BtlCmd_ChangeForm(BattleSystem *bsys, BATTLECONTEXT *ctx); BOOL BtlCmd_SetBattleBackground(BattleSystem *bsys, BATTLECONTEXT *ctx); BOOL BtlCmd_RecoverStatus(BattleSystem *bsys, BATTLECONTEXT *ctx); BOOL BtlCmd_TryRun(BattleSystem *bsys, BATTLECONTEXT *ctx); diff --git a/include/battle_controller.h b/include/battle_controller.h index 443bc105ac..d03c056f5d 100644 --- a/include/battle_controller.h +++ b/include/battle_controller.h @@ -43,7 +43,7 @@ void BattleController_EmitBattleMonToPartyMonCopy(BattleSystem *bsys, BATTLECONT void BattleControl_EmitPartyStatusHeal(BattleSystem *bsys, BATTLECONTEXT *ctx, int battlerId, int moveNo); void BattleController_EmitSetBattleResults(BattleSystem *bsys); void BattleController_EmitPlayMosaicAnimation(BattleSystem *bsys, int battlerId, int a2, int delay); -void BattleController_EmitChangeForme(BattleSystem *bsys, int battlerId); +void BattleController_EmitChangeForm(BattleSystem *bsys, int battlerId); void BattleController_EmitSetBattleBackground(BattleSystem *bsys, int a1); void BattleController_EmitInitStartBallGauge(BattleSystem *bsys, int battlerId); void BattleController_EmitDeleteStartBallGauge(BattleSystem *bsys, int battlerId); diff --git a/include/constants/battle.h b/include/constants/battle.h index 3e87903882..eb2008b6d2 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -330,7 +330,7 @@ enum Terrain { #define BMON_DATA_HELD_ITEM_RESTORE_HP 95 #define BMON_DATA_SLOW_START_FLAG 96 #define BMON_DATA_SLOW_START_END 97 -#define BMON_DATA_FORME 98 +#define BMON_DATA_FORM 98 #define BMON_DATA_99 99 //unused #define BMON_DATA_100 100 diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index b47e41b0fd..c730718814 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -268,7 +268,7 @@ #define MON_DATA_HOENN_WORLD_RIBBON 109 #define MON_DATA_FATEFUL_ENCOUNTER 110 #define MON_DATA_GENDER 111 -#define MON_DATA_FORME 112 +#define MON_DATA_FORM 112 #define MON_DATA_RESERVED_113 113 // HGSS #define MON_DATA_RESERVED_114 114 // Plat #define MON_DATA_HGSS_EGG_MET_LOCATION 115 @@ -468,27 +468,27 @@ typedef enum { ARCEUS_ICICLE = 15, ARCEUS_DRACO = 16, ARCEUS_DREAD = 17, - ARCEUS_FORME_MAX = 18, + ARCEUS_FORM_MAX = 18, BURMY_PLANT = 0, BURMY_SANDY = 1, BURMY_TRASH = 2, - BURMY_FORME_MAX = 3, + BURMY_FORM_MAX = 3, WORMADAM_PLANT = 0, WORMADAM_SANDY = 1, WORMADAM_TRASH = 2, - WORMADAM_FORME_MAX = 3, + WORMADAM_FORM_MAX = 3, DEOXYS_NORMAL = 0, DEOXYS_ATTACK = 1, DEOXYS_DEFENSE = 2, DEOXYS_SPEED = 3, - DEOXYS_FORME_MAX = 4, + DEOXYS_FORM_MAX = 4, GIRATINA_ALTERED = 0, GIRATINA_ORIGIN = 1, - GIRATINA_FORME_MAX = 2, + GIRATINA_FORM_MAX = 2, ROTOM_NORMAL = 0, ROTOM_HEAT = 1, @@ -496,29 +496,29 @@ typedef enum { ROTOM_FROST = 3, ROTOM_FAN = 4, ROTOM_MOW = 5, - ROTOM_FORME_MAX = 6, + ROTOM_FORM_MAX = 6, SHAYMIN_LAND = 0, SHAYMIN_SKY = 1, - SHAYMIN_FORME_MAX = 2, + SHAYMIN_FORM_MAX = 2, SHELLOS_WEST = 0, SHELLOS_EAST = 1, - SHELLOS_FORME_MAX = 2, + SHELLOS_FORM_MAX = 2, GASTRODON_WEST = 0, GASTRODON_EAST = 1, - GASTRODON_FORME_MAX = 2, + GASTRODON_FORM_MAX = 2, CASTFORM_NORMAL = 0, CASTFORM_SUNNY = 1, CASTFORM_RAINY = 2, CASTFORM_SNOWY = 3, - CASTFORM_FORME_MAX = 4, + CASTFORM_FORM_MAX = 4, CHERRIM_CLOUDY = 0, CHERRIM_SUNNY = 1, - CHERRIM_FORME_MAX = 2, + CHERRIM_FORM_MAX = 2, UNOWN_A = 0, UNOWN_B = 1, @@ -548,15 +548,15 @@ typedef enum { UNOWN_Z = 25, UNOWN_EXCLAMATION_MARK = 26, UNOWN_QUESTION_MARK = 27, - UNOWN_FORME_MAX = 28, + UNOWN_FORM_MAX = 28, PICHU_NORMAL = 0, PICHU_SPIKY_EAR = 1, - PICHU_FORME_MAX = 2, + PICHU_FORM_MAX = 2, EGG_STANDARD = 0, EGG_MANAPHY = 1, - EGG_FORME_MAX = 2, + EGG_FORM_MAX = 2, } AlternateForms; typedef enum EvoMethod diff --git a/include/dex_mon_measures.h b/include/dex_mon_measures.h index 7e88d5b284..ace97de1e1 100644 --- a/include/dex_mon_measures.h +++ b/include/dex_mon_measures.h @@ -18,7 +18,7 @@ void PokedexData_LoadAll(struct PokedexData *zkn, int mode, HeapID heapId); void PokedexData_UnloadAll(struct PokedexData *zkn); u32 PokedexData_GetHeight(struct PokedexData *zkn, int species); u32 PokedexData_GetWeight(struct PokedexData *zkn, int species); -void SetDexBanksByGiratinaForme(int forme); +void SetDexBanksByGiratinaForm(int form); NarcId GetPokedexDataNarcID(void); int GetDexWeightMsgBank(void); int GetDexHeightMsgBank(void); diff --git a/include/easy_chat.h b/include/easy_chat.h index 4aaea4776d..8b9210372c 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -22,7 +22,7 @@ struct WallpaperPasswordBank { u32 *words; }; -SAVE_EASY_CHAT_T *SaveData_EasyChat_Get(SaveData *saveData); +SAVE_EASY_CHAT_T *Save_EasyChat_Get(SaveData *saveData); u16 GetECWordIndexByPair(u32 msgBank, u32 word); u16 EasyChat_GetMsgBankForGroup(int category); void GetECWordIntoStringByIndex(u16 ecWord, String *dest); @@ -31,12 +31,12 @@ void EasyChatManager_ReadWordIntoString(ECMAN *ecMan, u16 ecWord, String *dest); BOOL GetCategoryAndMsgNoByECWordIdx(u16 ecWord, u32 *category, u32 *msgno); u32 Save_EasyChat_sizeof(void); void Save_EasyChat_Init(SAVE_EASY_CHAT_T *ec); -BOOL SaveEasyChat_GetTrendySayingFlag(SAVE_EASY_CHAT_T *ec, int flag); -u32 SaveEasyChat_RandomTrendySayingSet(SAVE_EASY_CHAT_T *ec); -BOOL SaveEasyChat_TrendySayingsUnlockedAllCheck(SAVE_EASY_CHAT_T *ec); +BOOL Save_EasyChat_GetTrendySayingFlag(SAVE_EASY_CHAT_T *ec, int flag); +u32 Save_EasyChat_RandomTrendySayingSet(SAVE_EASY_CHAT_T *ec); +BOOL Save_EasyChat_TrendySayingsUnlockedAllCheck(SAVE_EASY_CHAT_T *ec); ECWORD TrendyWordIdxToECWord(int a0); -BOOL SaveEasyChat_GetGreetingsFlag(SAVE_EASY_CHAT_T *ec, u8 idx); -void SaveEasyChat_SetGreetingFlag(SAVE_EASY_CHAT_T *ec, u8 idx); +BOOL Save_EasyChat_GetGreetingsFlag(SAVE_EASY_CHAT_T *ec, u8 idx); +void Save_EasyChat_SetGreetingFlag(SAVE_EASY_CHAT_T *ec, u8 idx); void WallpaperPasswordBank_Delete(struct WallpaperPasswordBank *pwdBank); u32 WallpaperPasswordBank_GetNum(struct WallpaperPasswordBank *pwdBank); ECWORD WallpaperPasswordBank_GetWordI(struct WallpaperPasswordBank *pwdBank, int idx); diff --git a/include/field_follow_poke.h b/include/field_follow_poke.h index a9818001dc..8a8494be54 100644 --- a/include/field_follow_poke.h +++ b/include/field_follow_poke.h @@ -8,7 +8,7 @@ LocalMapObject *sub_020699F8(MapObjectManager *mapObjectMan, int x, int y, int direction, u32 mapno); void sub_02069B74(MapObjectManager *mapObjectMan, u32 mapno); LocalMapObject *FollowingPokemon_GetMapObject(FieldSystem *fsys); -u32 FollowingPokemon_GetSpriteID(int species, u16 forme, u32 gender); +u32 FollowingPokemon_GetSpriteID(int species, u16 form, u32 gender); void sub_02069DC8(LocalMapObject *mapObject, BOOL enable_bit); void sub_02069DEC(LocalMapObject *mapObject, BOOL enable_bit); u8 sub_02069E14(LocalMapObject *mapObject); @@ -18,9 +18,9 @@ void sub_02069E84(LocalMapObject *mapObject, u8 a1); u8 sub_02069EAC(LocalMapObject *mapObject); u8 sub_02069EC0(LocalMapObject *mapObject); u8 sub_02069ED4(LocalMapObject *mapObject); -void FollowPokeMapObjectSetParams(LocalMapObject *mapObject, int species, u8 forme, BOOL shiny); -void sub_02069F0C(LocalMapObject *mapObject, int species, u8 forme, BOOL shiny, int a4); -void FollowPokeFsysParamSet(FieldSystem *fsys, int species, u8 forme, BOOL shiny, u8 gender); +void FollowPokeMapObjectSetParams(LocalMapObject *mapObject, int species, u8 form, BOOL shiny); +void sub_02069F0C(LocalMapObject *mapObject, int species, u8 form, BOOL shiny, int a4); +void FollowPokeFsysParamSet(FieldSystem *fsys, int species, u8 form, BOOL shiny, u8 gender); u8 GetFollowPokeSizeParamBySpecies(int species); int FollowPokeObj_GetSpecies(LocalMapObject *mapObject); BOOL FollowingPokemon_IsActive(FieldSystem *fsys); @@ -36,7 +36,7 @@ s8 FsysUnkSub108_GetMonMood(struct FieldSystemUnk108 *unk); void FsysUnkSub108_Set(struct FieldSystemUnk108 *a0, Pokemon *mon, u16 species, u32 personality); void FsysUnkSub108_MoveMoodTowardsNeutral(struct FieldSystemUnk108 *a0); int SpeciesToOverworldModelIndexOffset(int species); -int OverworldModelLookupFormeCount(int species); -BOOL OverworldModelLookupHasFemaleForme(int species); +int OverworldModelLookupFormCount(int species); +BOOL OverworldModelLookupHasFemaleForm(int species); #endif //POKEHEARTGOLD_FIELD_FOLLOW_POKE_H diff --git a/include/field_system.h b/include/field_system.h index 0a97835f9e..3833a9b503 100644 --- a/include/field_system.h +++ b/include/field_system.h @@ -29,7 +29,7 @@ typedef struct FollowMon { u8 unk15; u8 active; u8 shiny; - u16 forme; + u16 form; u16 dummy; u32 unk1C; } FollowMon; diff --git a/include/hall_of_fame.h b/include/hall_of_fame.h index b65011974f..f69ed47572 100644 --- a/include/hall_of_fame.h +++ b/include/hall_of_fame.h @@ -10,7 +10,7 @@ typedef struct HOFMon { /* 0x00 */ u16 species; /* 0x02 */ u8 level; - /* 0x03 */ u8 forme; + /* 0x03 */ u8 form; /* 0x04 */ u32 personality; /* 0x08 */ u32 otid; /* 0x0C */ u16 nickname[POKEMON_NAME_LENGTH + 1]; @@ -42,7 +42,7 @@ typedef struct HofDisplayMon u32 otid; u16 species; u8 level; - u8 forme; + u8 form; u16 moves[4]; } SHOW_HOFMON; diff --git a/include/overlay_94.h b/include/overlay_94.h index f13fcd2d9e..223a30017b 100644 --- a/include/overlay_94.h +++ b/include/overlay_94.h @@ -17,7 +17,7 @@ typedef struct UnkStruct_Overlay_94_B { u8 unk27; } UnkStruct_Overlay_94_B; -typedef struct IconFormeChangeWork { +typedef struct IconFormChangeData { int state; int effectTimer; int duration; @@ -25,7 +25,7 @@ typedef struct IconFormeChangeWork { int fileId; int partyMonIndex; //same information as B's unkc65 ParticleSystem* particleSystem; -} IconFormeChangeWork; +} IconFormChangeData; typedef struct PartyMenuStruct { BOOL unk0; @@ -39,11 +39,11 @@ typedef struct PartyMenuStruct { u8 unkc64; u8 partyMonIndex; //selected index..? u8 unkc66[0x1a]; - IconFormeChangeWork* iconFormeChange; + IconFormChangeData* iconFormChange; } PartyMenuStruct; -void PartyMenu_InitIconFormeChangeWork(PartyMenuStruct* unkPtr); -BOOL PartyMenu_AnimateIconFormeChange(PartyMenuStruct* unkPtr); +void PartyMenu_InitIconFormChangeData(PartyMenuStruct* unkPtr); +BOOL PartyMenu_AnimateIconFormChange(PartyMenuStruct* unkPtr); #endif //POKEHEARTGOLD_OVY_94_H diff --git a/include/photo_album.h b/include/photo_album.h index 10438fd3ca..5b372bac79 100644 --- a/include/photo_album.h +++ b/include/photo_album.h @@ -7,7 +7,7 @@ typedef struct PHOTO_MON { u16 species; - u8 forme; + u8 form; u8 shiny:1; u8 gender:1; } PHOTO_MON; diff --git a/include/pokedex.h b/include/pokedex.h index c521c4871c..fb8a6134df 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -10,9 +10,9 @@ #define ROUND_UP(x,n) (((x)+(n)-1)&~((n)-1)) #define CEILDIV(x,n) (((x)+(n)-1)/(n)) -// Deoxys forme history is split between the +// Deoxys form history is split between the // seen and caught flags because of space efficiency. -// For some reason, 4 bits are reserved for each forme, +// For some reason, 4 bits are reserved for each form, // even though 2 would suffice. This negates any // benefits this split would have provided. #define NUM_DEX_FLAG_WORDS (CEILDIV(NATIONAL_DEX_COUNT+8,32)) @@ -23,10 +23,10 @@ typedef struct Pokedex { u32 seenSpecies[NUM_DEX_FLAG_WORDS]; u32 seenGenders[2][NUM_DEX_FLAG_WORDS]; u32 spindaPersonality; - u8 shellosFormeOrder; - u8 gastrodonFormeOrder; - u8 burmyFormeOrder; - u8 wormadamFormeOrder; + u8 shellosFormOrder; + u8 gastrodonFormOrder; + u8 burmyFormOrder; + u8 wormadamFormOrder; u8 unownSeenOrder[28]; u8 unownCaughtOrder[28]; u8 caughtLanguages[ROUND_UP(NATIONAL_DEX_COUNT,4)]; @@ -34,10 +34,10 @@ typedef struct Pokedex { u8 enabledInternational; u8 dexEnabled; u8 nationalDex; - u32 rotomFormeOrder; - u8 shayminFormeOrder; - u8 giratinaFormeOrder; - u8 pichuFormeOrder; + u32 rotomFormOrder; + u8 shayminFormOrder; + u8 giratinaFormOrder; + u8 pichuFormOrder; u8 dummy; } Pokedex; // size=0x340 @@ -61,9 +61,9 @@ BOOL Pokedex_NationalDexIsComplete(Pokedex *pokedex); BOOL Pokedex_JohtoDexIsComplete(Pokedex *pokedex); u32 Pokedex_GetSeenSpindaPersonality(Pokedex *pokedex, u32 arg); int Pokedex_SpeciesGetLastSeenGender(Pokedex *pokedex, u16 species, u32 a2); -int Pokedex_GetSeenFormeByIdx_Unown(Pokedex *pokedex, int idx, u32 caught); -u32 Pokedex_GetSeenFormeNum_Unown(Pokedex *pokedex, BOOL caught); -int Pokedex_GetSeenFormeByIdx_Shellos(Pokedex *pokedex, int a1); +int Pokedex_GetSeenFormByIdx_Unown(Pokedex *pokedex, int idx, u32 caught); +u32 Pokedex_GetSeenFormNum_Unown(Pokedex *pokedex, BOOL caught); +int Pokedex_GetSeenFormByIdx_Shellos(Pokedex *pokedex, int a1); void Pokedex_SetMonSeenFlag(Pokedex *pokedex, Pokemon *mon); void Pokedex_SetMonCaughtFlag(Pokedex *pokedex, Pokemon *mon); void Pokedex_SetNatDexFlag(Pokedex *pokedex); @@ -73,8 +73,8 @@ void Pokedex_SetInternationalViewFlag(Pokedex *pokedex); BOOL Pokedex_GetInternationalViewFlag(const Pokedex *pokedex); BOOL Pokedex_IsEnabled(const Pokedex *pokedex); void Pokedex_Enable(Pokedex *pokedex); -int Pokedex_GetSeenFormeByIdx(Pokedex *pokedex, int species, int idx); -int Pokedex_GetSeenFormeNum(Pokedex *pokedex, int species); +int Pokedex_GetSeenFormByIdx(Pokedex *pokedex, int species, int idx); +int Pokedex_GetSeenFormNum(Pokedex *pokedex, int species); void UpdatePokedexWithReceivedSpecies(SaveData *saveData, Pokemon *pokemon); #endif //POKEHEARTGOLD_POKEDEX_H diff --git a/include/pokemon.h b/include/pokemon.h index ab95d862d2..3578fa734c 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -51,11 +51,11 @@ void SetMonData(Pokemon *mon, int attr, void * ptr); void SetBoxMonData(BoxPokemon *boxMon, int attr, void * ptr); void AddMonData(Pokemon *mon, int attr, int amount); //void AddBoxMonData(BoxPokemon *boxMon, int attr, int amount); -BASE_STATS * AllocAndLoadMonPersonal_HandleAlternateForme(int species, int form, HeapID heap_id); +BASE_STATS * AllocAndLoadMonPersonal_HandleAlternateForm(int species, int form, HeapID heap_id); BASE_STATS * AllocAndLoadMonPersonal(int species, HeapID heap_id); int GetPersonalAttr(const BASE_STATS *baseStats, BaseStat attr); void FreeMonPersonal(BASE_STATS * personal); -int GetMonBaseStat_HandleAlternateForme(int species, int form, BaseStat stat_id); +int GetMonBaseStat_HandleAlternateForm(int species, int form, BaseStat stat_id); int GetMonBaseStat(int species, BaseStat stat_id); u8 GetPercentProgressTowardsNextLevel(Pokemon *mon); u32 CalcMonExpToNextLevel(Pokemon *mon); @@ -87,7 +87,7 @@ u32 TryAppendBoxMonMove(BoxPokemon *boxMon, u16 move); void BoxMonSetMoveInSlot(BoxPokemon *boxMon, u16 move, u8 slot); void DeleteMonFirstMoveAndAppend(Pokemon *mon, u16 move); void DeleteBoxMonFirstMoveAndAppend(BoxPokemon *boxMon, u16 move); -void LoadWotbl_HandleAlternateForme(int species, int forme, u16 *wotbl); +void LoadWotbl_HandleAlternateForm(int species, int form, u16 *wotbl); void MonSwapMoves(Pokemon *mon, int a, int b); void BoxMonSwapMoves(BoxPokemon *boxMon, int a, int b); BoxPokemon *Mon_GetBoxMon(Pokemon *mon); @@ -107,7 +107,7 @@ void CopyPokemonToBoxPokemon(const Pokemon *src, BoxPokemon *dest); s8 MonGetFlavorPreference(Pokemon *mon, int flavor); s8 BoxMonGetFlavorPreference(BoxPokemon *boxMon, int flavor); s8 GetFlavorPreferenceFromPID(u32 personality, int flavor); -int Species_LoadLearnsetTable(u16 species, u32 forme, u16 * dest); +int Species_LoadLearnsetTable(u16 species, u32 form, u16 * dest); void Party_GivePokerusAtRandom(PARTY * party); u8 Party_MaskMonsWithPokerus(PARTY * party, u8 mask); void Party_UpdatePokerus(PARTY * party, int r5); @@ -116,37 +116,37 @@ BOOL Pokemon_HasPokerus(Pokemon *mon); BOOL BoxMon_HasPokerus(BoxPokemon *boxMon); BOOL Pokemon_IsImmuneToPokerus(Pokemon *mon); BOOL BoxMon_IsImmuneToPokerus(BoxPokemon *boxMon); -void Pokemon_UpdateArceusForme(Pokemon *mon); -void BoxMon_UpdateArceusForme(BoxPokemon *boxMon); -s32 Mon_UpdateGiratinaForme(Pokemon *mon); -s32 BoxMon_UpdateGiratinaForme(BoxPokemon *boxMon); -void Mon_UpdateShayminForme(Pokemon *mon, int forme); -void BoxMon_UpdateShayminForme(BoxPokemon *boxMon, int forme); +void Pokemon_UpdateArceusForm(Pokemon *mon); +void BoxMon_UpdateArceusForm(BoxPokemon *boxMon); +s32 Mon_UpdateGiratinaForm(Pokemon *mon); +s32 BoxMon_UpdateGiratinaForm(BoxPokemon *boxMon); +void Mon_UpdateShayminForm(Pokemon *mon, int form); +void BoxMon_UpdateShayminForm(BoxPokemon *boxMon, int form); void UpdateMonAbility(Pokemon *mon); void UpdateBoxMonAbility(BoxPokemon *boxMon); int LowestFlagNo(u32 mask); -BOOL IsPokemonBannedFromBattleFrontier(u16 species, u16 forme); +BOOL IsPokemonBannedFromBattleFrontier(u16 species, u16 form); u16 GetBannedBattleFrontierPokemon(u32 idx); void Pokemon_RemoveCapsule(Pokemon *mon); void RestoreBoxMonPP(BoxPokemon *boxMon); BOOL SetTrMonCapsule(int a0, Pokemon *mon, HeapID heap_id); -int GetMonBaseStatEx_HandleAlternateForme(NARC *narc, int species, int forme, BaseStat attr); +int GetMonBaseStatEx_HandleAlternateForm(NARC *narc, int species, int form, BaseStat attr); u16 ModifyStatByNature(u8 nature, u16 n, u8 statIndex); u8 GetGenderBySpeciesAndPersonality_PreloadedPersonal(const BASE_STATS *personal, u16 species, u32 pid); BOOL BoxMonIsHoldingMail(BoxPokemon *boxMon); void GetPokemonSpriteCharAndPlttNarcIds(struct SomeDrawPokemonStruct *a0, BoxPokemon *boxMon, u8 whichFacing); void sub_02070130(struct SomeDrawPokemonStruct *a0, BoxPokemon *boxMon, u8 whichFacing); void GetBoxmonSpriteCharAndPlttNarcIds(struct SomeDrawPokemonStruct *spC, BoxPokemon *boxMon, u8 whichFacing, BOOL sp14); -void GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct * spC, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 forme, u32 personality); -u8 sub_02070438(u16 species, u8 forme); +void GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct * spC, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality); +u8 sub_02070438(u16 species, u8 form); void sub_02070560(struct SomeDrawPokemonStruct * spC, u16 species, u8 whichFacing, u8 gender, u32 shiny); -void DP_GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct * spC, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 forme, u32 personality); +void DP_GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct * spC, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality); u8 sub_0207083C(BoxPokemon *boxMon, u8 whichFacing); u8 sub_02070848(BoxPokemon *boxMon, u8 whichFacing); u8 sub_02070854(BoxPokemon *boxMon, u8 whichFacing, BOOL a2); -u8 sub_020708D8(u16 species, u8 gender, u8 whichFacing, u8 forme, u32 pid); -u8 sub_02070A64(u16 species, u8 gender, u8 whichFacing, u8 forme, u32 pid); +u8 sub_020708D8(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid); +u8 sub_02070A64(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid); struct UnkStruct_0200CF18 *sub_02070C24(Unk122_021E7C9C *r6, void *sp18, void *sp1C, s32 sp20, s32 sp88, s32 trainerClass, s32 sp90, s32 sp94, s32 r5, HeapID heapId); void sub_02070D3C(s32 trainer_class, s32 a1, s32 a2, struct UnkStruct_02070D3C *a3); void sub_02070D84(s32 trainer_class, s32 a1, struct UnkStruct_02070D3C *a2); @@ -160,12 +160,12 @@ u32 MonTryLearnMoveOnLevelUp(Pokemon *mon, int * last_i, u16 * sp0); void MonDeleteMoveSlot(Pokemon *mon, u32 slot); BOOL MonHasMove(Pokemon *mon, u16 move); u16 SpeciesToJohtoDexNo(u16 species); -void Mon_ForceSetGiratinaOriginForme(Pokemon *mon); +void Mon_ForceSetGiratinaOriginForm(Pokemon *mon); void Party_UpdateAllGiratina_DistortionWorld(PARTY *party, BOOL force_origin); BOOL Mon_CanUseGracidea(Pokemon *mon); -void Party_ResetAllShayminToLandForme(PARTY *party); +void Party_ResetAllShayminToLandForm(PARTY *party); BOOL Party_TryResetShaymin(PARTY *party, int min_max, const RTCTime *time); -BOOL Mon_UpdateRotomForme(Pokemon *mon, int forme, int defaultSlot); +BOOL Mon_UpdateRotomForm(Pokemon *mon, int form, int defaultSlot); void sub_02071FDC(SOUND_CHATOT *r6, u32 r5, u16 r4, s32 unused, s32 sp18, u32 sp1C, u32 sp20, u32 sp24); void sub_0207204C(SOUND_CHATOT *r7, u32 r6, u16 r5, s32 r4, s32 sp20, u32 sp24, u32 sp28, u32 sp2C, u8 sp30); void sub_020720D4(Pokemon *mon); @@ -176,16 +176,16 @@ void sub_02072190(BoxPokemon *boxMon, PlayerProfile *a1, u32 pokeball, u32 a3, u void WildMonSetRandomHeldItem(Pokemon *mon, u32 a1, u32 a2); BOOL GetMonTMHMCompat(Pokemon *mon, u8 tmhm); BOOL GetBoxMonTMHMCompat(BoxPokemon *boxMon, u8 tmhm); -BOOL GetTMHMCompatBySpeciesAndForme(u16 species, u32 forme, u8 tmhm); +BOOL GetTMHMCompatBySpeciesAndForm(u16 species, u32 form, u8 tmhm); void SetMonPersonality(Pokemon *mon, u32 personality); u32 ChangePersonalityToNatureGenderAndAbility(u32 pid, u16 species, u8 nature, u8 gender, u8 ability, BOOL gen_mode); void LoadMonPersonal(int species, BASE_STATS *personal); -void LoadMonBaseStats_HandleAlternateForme(int species, int forme, BASE_STATS *personal); +void LoadMonBaseStats_HandleAlternateForm(int species, int form, BASE_STATS *personal); void LoadMonEvolutionTable(u16 species, struct Evolution *evo); void MonEncryptSegment(void *data, u32 size, u32 seed); void MonDecryptSegment(void *data, u32 size, u32 seed); u32 CalcMonChecksum(void * _data, u32 size); -int ResolveMonForme(int species, int forme); +int ResolveMonForm(int species, int form); u32 MaskOfFlagNo(int flagno); BOOL SpeciesIsMythical(u16 species); BOOL MonCheckFrontierIneligibility(Pokemon *mon); diff --git a/include/pokemon_icon_idx.h b/include/pokemon_icon_idx.h index 0f9671b3a3..2d8c269604 100644 --- a/include/pokemon_icon_idx.h +++ b/include/pokemon_icon_idx.h @@ -5,10 +5,10 @@ u32 Boxmon_GetIconNaix(BoxPokemon *boxMon); u32 Pokemon_GetIconNaix(Pokemon *mon); -u32 GetMonIconNaixEx(u32 species, BOOL isEgg, u32 forme); -u32 GetBattleMonIconNaixEx(u32 species, BOOL isEgg, u32 forme); -const u8 GetMonIconPaletteEx(u32 species, u32 forme, u32 isEgg); -const u8 GetBattleMonIconPaletteEx(u32 species, u32 forme, BOOL isEgg); +u32 GetMonIconNaixEx(u32 species, BOOL isEgg, u32 form); +u32 GetBattleMonIconNaixEx(u32 species, BOOL isEgg, u32 form); +const u8 GetMonIconPaletteEx(u32 species, u32 form, u32 isEgg); +const u8 GetBattleMonIconPaletteEx(u32 species, u32 form, BOOL isEgg); const u8 Boxmon_GetIconPalette(BoxPokemon *boxMon); const u8 Pokemon_GetIconPalette(Pokemon *mon); u32 sub_02074490(void); diff --git a/include/pokemon_types_def.h b/include/pokemon_types_def.h index 06bd6d8a5f..3a817231e5 100644 --- a/include/pokemon_types_def.h +++ b/include/pokemon_types_def.h @@ -153,7 +153,7 @@ typedef struct Mail u8 mail_type; u16 author_name[PLAYER_NAME_LENGTH + 1]; union MailPatternData mon_icons[3]; - u16 forme_flags; // bitfield of three 5-bit values + u16 form_flags; // bitfield of three 5-bit values MAIL_MESSAGE unk_20[3]; } MAIL; diff --git a/include/save_misc_data.h b/include/save_misc_data.h index 652079ce2a..4e45a18ca0 100644 --- a/include/save_misc_data.h +++ b/include/save_misc_data.h @@ -33,7 +33,7 @@ typedef struct SAVE_MISC_DATA { u8 unk_0280[8]; // 3 chunks of size (4, 2, 2) u8 filler_0288[0x10]; u16 favoriteMonSpecies; - u8 favoriteMonForme:7; + u8 favoriteMonForm:7; u8 favoriteMonIsEgg:1; u8 extraChunksExist:1; u8 unk_029B_1:4; @@ -61,8 +61,8 @@ const u16 *Save_Misc_RivalName_Const_Get(const SAVE_MISC_DATA *saveMiscData); void Save_Misc_RivalName_Set(SAVE_MISC_DATA *saveMiscData, const String *name); void SaveMisc_SetExtraChunksExist(SAVE_MISC_DATA *saveMiscData); BOOL SaveMisc_CheckExtraChunksExist(SAVE_MISC_DATA *saveMiscData); -void SaveMisc_SetFavoriteMon(SAVE_MISC_DATA *saveMiscData, int species, int forme, int isEgg); -void SaveMisc_GetFavoriteMon(SAVE_MISC_DATA *saveMiscData, int *species, int *forme, int *isEgg); +void SaveMisc_SetFavoriteMon(SAVE_MISC_DATA *saveMiscData, int species, int form, int isEgg); +void SaveMisc_GetFavoriteMon(SAVE_MISC_DATA *saveMiscData, int *species, int *form, int *isEgg); BOOL sub_0202AA44(SAVE_MISC_DATA *saveMiscData, int a1, int a2); void sub_0202AA9C(SAVE_MISC_DATA *saveMiscData, int a1); u8 sub_0202AAD4(SAVE_MISC_DATA *saveMiscData, int a1); diff --git a/include/save_trainer_house.h b/include/save_trainer_house.h index a6e0d3c778..6062ef7040 100644 --- a/include/save_trainer_house.h +++ b/include/save_trainer_house.h @@ -19,7 +19,7 @@ typedef struct TrainerHouseTrainer { typedef struct TrainerHouseMon { u16 species:11; - u16 forme:5; + u16 form:5; u16 item; u16 moves[MAX_MON_MOVES]; u32 pid; diff --git a/include/scrcmd.h b/include/scrcmd.h index d860a4292a..4c2b0e0614 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -693,7 +693,7 @@ BOOL ScrCmd_TutorMoveGetPrice(ScriptContext* ctx); BOOL ScrCmd_656(ScriptContext* ctx); BOOL ScrCmd_StatJudge(ScriptContext* ctx); BOOL ScrCmd_BufferStatName(ScriptContext* ctx); -BOOL ScrCmd_SetMonForme(ScriptContext* ctx); +BOOL ScrCmd_SetMonForm(ScriptContext* ctx); BOOL ScrCmd_BufferTrainerName(ScriptContext* ctx); BOOL ScrCmd_661(ScriptContext* ctx); BOOL ScrCmd_662(ScriptContext* ctx); @@ -707,10 +707,10 @@ BOOL ScrCmd_GetItemQuantity(ScriptContext* ctx); BOOL ScrCmd_GetHiddenPowerType(ScriptContext* ctx); BOOL ScrCmd_SetFavoriteMon(ScriptContext* ctx); BOOL ScrCmd_GetFavoriteMon(ScriptContext* ctx); -BOOL ScrCmd_GetOwnedRotomFormes(ScriptContext* ctx); +BOOL ScrCmd_GetOwnedRotomForms(ScriptContext* ctx); BOOL ScrCmd_CountTranformedRotomsInParty(ScriptContext* ctx); -BOOL ScrCmd_UpdateRotomForme(ScriptContext* ctx); -BOOL ScrCmd_GetPartyMonForme(ScriptContext* ctx); +BOOL ScrCmd_UpdateRotomForm(ScriptContext* ctx); +BOOL ScrCmd_GetPartyMonForm(ScriptContext* ctx); BOOL ScrCmd_677(ScriptContext* ctx); BOOL ScrCmd_678(ScriptContext* ctx); BOOL ScrCmd_679(ScriptContext* ctx); @@ -861,7 +861,7 @@ BOOL ScrCmd_823(ScriptContext* ctx); BOOL ScrCmd_824(ScriptContext* ctx); BOOL ScrCmd_GetShinyLeafCount(ScriptContext* ctx); BOOL ScrCmd_TryGiveShinyLeafCrown(ScriptContext* ctx); -BOOL ScrCmd_GetPartymonForme(ScriptContext* ctx); +BOOL ScrCmd_GetPartymonForm(ScriptContext* ctx); BOOL ScrCmd_MonAddContestValue(ScriptContext* ctx); BOOL ScrCmd_829(ScriptContext* ctx); BOOL ScrCmd_830(ScriptContext* ctx); diff --git a/include/script_pokemon_util.h b/include/script_pokemon_util.h index 8eaf85177c..4be8dc4a1d 100644 --- a/include/script_pokemon_util.h +++ b/include/script_pokemon_util.h @@ -4,7 +4,7 @@ #include "pokemon.h" #include "map_section.h" -BOOL GiveMon(HeapID heapId, SaveData *saveData, int species, int level, int forme, u8 ability, u16 heldItem, int ball, int encounterType); +BOOL GiveMon(HeapID heapId, SaveData *saveData, int species, int level, int form, u8 ability, u16 heldItem, int ball, int encounterType); BOOL GiveEgg(HeapID heapId, SaveData *saveData, int species, u8 metLocation, MapsecType sp20, int sp24); void PartyMonSetMoveInSlot(PARTY *party, int mon_slot, int move_slot, u16 moveId); int GetIdxOfFirstPartyMonWithMove(PARTY *party, u16 move); diff --git a/include/sound_chatot.h b/include/sound_chatot.h index 46997b527b..28dcf0f89f 100644 --- a/include/sound_chatot.h +++ b/include/sound_chatot.h @@ -17,7 +17,7 @@ BOOL sub_02006EA0(SOUND_CHATOT *a0, u32 a1, u32 a2, s32 a3, u8 a4); u32 sub_02006EFC(SOUND_CHATOT *chatot); BOOL sub_02006F30(int a0); -void PlayCry(u16 species, u8 forme); +void PlayCry(u16 species, u8 form); void sub_02006920(int, u16, int, int, int, u8, u8); #endif //POKEHEARTGOLD_SOUND_CHATOT_H diff --git a/include/trainer_data.h b/include/trainer_data.h index 8945fb616e..8266394442 100644 --- a/include/trainer_data.h +++ b/include/trainer_data.h @@ -44,7 +44,7 @@ typedef struct TrainerMonSpecies { u16 level; // Bits 0-9: species - // Bits 10-15: forme + // Bits 10-15: form u16 species; u16 capsule; } TRPOKE_NOITEM_DFLTMOVES; @@ -108,7 +108,7 @@ BOOL TrainerMessageWithIdPairExists(u32 trainer_idx, u32 msg_id, HeapID heap_id) void GetTrainerMessageByIdPair(u32 trainer_idx, u32 msg_id, String * str, HeapID heap_id); void TrainerData_ReadTrPoke(u32 idx, TRPOKE * dest); void CreateNPCTrainerParty(BATTLE_SETUP *enemies, int party_id, HeapID heap_id); -void TrMon_OverridePidGender(int species, int forme, int overrideParam, u32 *pid); +void TrMon_OverridePidGender(int species, int form, int overrideParam, u32 *pid); void TrMon_FrustrationCheckAndSetFriendship(Pokemon *mon); #endif //PM_ASM diff --git a/include/trainer_house.h b/include/trainer_house.h index 12a1a481df..0cb5cfccba 100644 --- a/include/trainer_house.h +++ b/include/trainer_house.h @@ -5,7 +5,7 @@ typedef struct THOUSE_MON { u16 species:11; // 0 - u16 forme:5; + u16 form:5; u16 item; // 2 u16 moves[4]; // 4 u32 otId; // C diff --git a/include/unk_02031AF0.h b/include/unk_02031AF0.h index 0a3299881b..16afc58604 100644 --- a/include/unk_02031AF0.h +++ b/include/unk_02031AF0.h @@ -6,7 +6,7 @@ typedef struct { u16 species; u8 gender; - u8 forme; + u8 form; } PokeathlonFriendshipRoomStatueData; typedef struct { diff --git a/include/unk_0205BB1C.h b/include/unk_0205BB1C.h index 3f45554a6f..89cca2e9af 100644 --- a/include/unk_0205BB1C.h +++ b/include/unk_0205BB1C.h @@ -8,7 +8,7 @@ u16 Save_GetPartyLeadAlive(SaveData *saveData); u32 sub_0205BB1C(u32 num); u16 sub_0205BBD0(u16 numCaught, u16 gender, u16 *var_p); u16 sub_0205BC78(u16 numCaught, u16 gender, u16 *var_p); -BOOL Save_PlayerHasRegiInParty(SaveData *saveData); +BOOL Save_PlayerHasAllRegisInParty(SaveData *saveData); void sub_0205BED8(TaskManager *taskManager, LocalMapObject *object, u16 a2, u16 a3, u16 a4, u16 a5); void sub_0205BFB4(TaskManager *taskManager, LocalMapObject *object, u16 a2, u16 a3); diff --git a/src/battle/battle_command.c b/src/battle/battle_command.c index cd787183bd..69a88ad17d 100644 --- a/src/battle/battle_command.c +++ b/src/battle/battle_command.c @@ -3720,7 +3720,7 @@ BOOL BtlCmd_TryTeleport(BattleSystem *bsys, BATTLECONTEXT *ctx) { BOOL BtlCmd_BeatUpDamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) { int species; - int forme; + int form; int level; Pokemon *mon; @@ -3745,13 +3745,13 @@ BOOL BtlCmd_BeatUpDamageCalc(BattleSystem *bsys, BATTLECONTEXT *ctx) { mon = BattleSystem_GetPartyMon(bsys, ctx->battlerIdAttacker, ctx->beatUpCount); species = GetMonData(mon, MON_DATA_SPECIES, 0); - forme = GetMonData(mon, MON_DATA_FORME, 0); + form = GetMonData(mon, MON_DATA_FORM, 0); level = GetMonData(mon, MON_DATA_LEVEL, 0); - ctx->damage = GetMonBaseStat_HandleAlternateForme(species, forme, BASE_ATK); + ctx->damage = GetMonBaseStat_HandleAlternateForm(species, form, BASE_ATK); ctx->damage *= ctx->unk_334.moveData[ctx->moveNoCur].power; ctx->damage *= (level * 2 / 5 + 2); - ctx->damage /= (u32) GetMonBaseStat_HandleAlternateForme(ctx->battleMons[ctx->battlerIdTarget].species, ctx->battleMons[ctx->battlerIdTarget].forme, BASE_DEF); + ctx->damage /= (u32) GetMonBaseStat_HandleAlternateForm(ctx->battleMons[ctx->battlerIdTarget].species, ctx->battleMons[ctx->battlerIdTarget].form, BASE_DEF); ctx->damage /= 50; ctx->damage += 2; ctx->damage *= ctx->criticalMultiplier; @@ -5267,12 +5267,12 @@ BOOL BtlCmd_Mosaic(BattleSystem *bsys, BATTLECONTEXT *ctx) { return FALSE; } -BOOL BtlCmd_ChangeForme(BattleSystem *bsys, BATTLECONTEXT *ctx) { +BOOL BtlCmd_ChangeForm(BattleSystem *bsys, BATTLECONTEXT *ctx) { BattleScriptIncrementPointer(ctx, 1); int side = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); - BattleController_EmitChangeForme(bsys, battlerId); + BattleController_EmitChangeForm(bsys, battlerId); return FALSE; } @@ -5811,12 +5811,12 @@ BOOL BtlCmd_GetMonDataFromNarc(BattleSystem *bsys, BATTLECONTEXT *ctx) { BattleScriptIncrementPointer(ctx, 1); int species = BattleScriptReadWord(ctx); - int forme = BattleScriptReadWord(ctx); + int form = BattleScriptReadWord(ctx); BaseStat stat = (BaseStat) BattleScriptReadWord(ctx); - int *formePtr = BattleScriptGetVarPointer(bsys, ctx, forme); + int *formPtr = BattleScriptGetVarPointer(bsys, ctx, form); - ctx->calcWork = GetMonBaseStat_HandleAlternateForme(species, *formePtr, stat); + ctx->calcWork = GetMonBaseStat_HandleAlternateForm(species, *formPtr, stat); return FALSE; } diff --git a/src/battle/overlay_12_0224E4FC.c b/src/battle/overlay_12_0224E4FC.c index 5413e83024..5041e9017c 100644 --- a/src/battle/overlay_12_0224E4FC.c +++ b/src/battle/overlay_12_0224E4FC.c @@ -83,9 +83,9 @@ void BattleSystem_GetBattleMon(BattleSystem *bsys, BATTLECONTEXT *ctx, int battl } if ((BattleSystem_GetBattleType(bsys) & (BATTLE_TYPE_5|BATTLE_TYPE_9)) && !BattleSystem_GetFieldSide(bsys, battlerId)) { - ctx->battleMons[battlerId].forme = 0; + ctx->battleMons[battlerId].form= 0; } else { - ctx->battleMons[battlerId].forme = GetMonData(mon, MON_DATA_FORME, NULL); + ctx->battleMons[battlerId].form = GetMonData(mon, MON_DATA_FORM, NULL); } ctx->battleMons[battlerId].level = GetMonData(mon, MON_DATA_LEVEL, NULL); @@ -101,7 +101,7 @@ void BattleSystem_GetBattleMon(BattleSystem *bsys, BATTLECONTEXT *ctx, int battl ctx->battleMons[battlerId].ball = BattleSystem_GetMonBall(bsys, mon); - SetDexBanksByGiratinaForme(ctx->battleMons[battlerId].forme); + SetDexBanksByGiratinaForm(ctx->battleMons[battlerId].form); dexData = PokedexData_Create(HEAP_ID_BATTLE); PokedexData_LoadAll(dexData, 0, HEAP_ID_BATTLE); @@ -462,8 +462,8 @@ int GetBattlerVar(BATTLECONTEXT *ctx, int battlerId, u32 id, void *data) { return mon->slowStartFlag; case BMON_DATA_SLOW_START_END: return mon->slowStartEnded; - case BMON_DATA_FORME: - return mon->forme; + case BMON_DATA_FORM: + return mon->form; case BMON_DATA_100: return GetBattlerVar(ctx, battlerId, ctx->tempWork, data); default: @@ -754,8 +754,8 @@ void SetBattlerVar(BATTLECONTEXT *ctx, int battlerId, u32 id, void *data) { case BMON_DATA_SLOW_START_END: mon->slowStartEnded = *data8; break; - case BMON_DATA_FORME: - mon->forme = *data8; + case BMON_DATA_FORM: + mon->form = *data8; break; case BMON_DATA_100: SetBattlerVar(ctx, battlerId, ctx->tempWork, data); @@ -946,8 +946,8 @@ void AddBattlerVar(BATTLEMON *mon, u32 varId, int data) { case BMON_DATA_SLOW_START_END: mon->slowStartEnded += data; break; - case BMON_DATA_FORME: - mon->forme += data; + case BMON_DATA_FORM: + mon->form += data; break; default: GF_ASSERT(FALSE); diff --git a/src/data/fieldmap/script_cmd_table.h b/src/data/fieldmap/script_cmd_table.h index 036ff9a21c..33f2631f44 100644 --- a/src/data/fieldmap/script_cmd_table.h +++ b/src/data/fieldmap/script_cmd_table.h @@ -658,7 +658,7 @@ BOOL ScrCmd_TutorMoveGetPrice(ScriptContext *ctx); BOOL ScrCmd_656(ScriptContext *ctx); BOOL ScrCmd_StatJudge(ScriptContext *ctx); BOOL ScrCmd_BufferStatName(ScriptContext *ctx); -BOOL ScrCmd_SetMonForme(ScriptContext *ctx); +BOOL ScrCmd_SetMonForm(ScriptContext *ctx); BOOL ScrCmd_BufferTrainerName(ScriptContext *ctx); BOOL ScrCmd_661(ScriptContext *ctx); BOOL ScrCmd_662(ScriptContext *ctx); @@ -672,10 +672,10 @@ BOOL ScrCmd_GetItemQuantity(ScriptContext *ctx); BOOL ScrCmd_GetHiddenPowerType(ScriptContext *ctx); BOOL ScrCmd_SetFavoriteMon(ScriptContext *ctx); BOOL ScrCmd_GetFavoriteMon(ScriptContext *ctx); -BOOL ScrCmd_GetOwnedRotomFormes(ScriptContext *ctx); +BOOL ScrCmd_GetOwnedRotomForms(ScriptContext *ctx); BOOL ScrCmd_CountTranformedRotomsInParty(ScriptContext *ctx); -BOOL ScrCmd_UpdateRotomForme(ScriptContext *ctx); -BOOL ScrCmd_GetPartyMonForme(ScriptContext *ctx); +BOOL ScrCmd_UpdateRotomForm(ScriptContext *ctx); +BOOL ScrCmd_GetPartyMonForm(ScriptContext *ctx); BOOL ScrCmd_677(ScriptContext *ctx); BOOL ScrCmd_678(ScriptContext *ctx); BOOL ScrCmd_679(ScriptContext *ctx); @@ -826,7 +826,7 @@ BOOL ScrCmd_823(ScriptContext *ctx); BOOL ScrCmd_824(ScriptContext *ctx); BOOL ScrCmd_GetShinyLeafCount(ScriptContext *ctx); BOOL ScrCmd_TryGiveShinyLeafCrown(ScriptContext *ctx); -BOOL ScrCmd_GetPartymonForme(ScriptContext *ctx); +BOOL ScrCmd_GetPartymonForm(ScriptContext *ctx); BOOL ScrCmd_MonAddContestValue(ScriptContext *ctx); BOOL ScrCmd_829(ScriptContext *ctx); BOOL ScrCmd_830(ScriptContext *ctx); @@ -1513,7 +1513,7 @@ const ScrCmdFunc gScriptCmdTable[] = { ScrCmd_656, ScrCmd_StatJudge, ScrCmd_BufferStatName, - ScrCmd_SetMonForme, + ScrCmd_SetMonForm, ScrCmd_BufferTrainerName, ScrCmd_661, ScrCmd_662, @@ -1527,10 +1527,10 @@ const ScrCmdFunc gScriptCmdTable[] = { ScrCmd_GetHiddenPowerType, ScrCmd_SetFavoriteMon, ScrCmd_GetFavoriteMon, - ScrCmd_GetOwnedRotomFormes, + ScrCmd_GetOwnedRotomForms, ScrCmd_CountTranformedRotomsInParty, - ScrCmd_UpdateRotomForme, - ScrCmd_GetPartyMonForme, + ScrCmd_UpdateRotomForm, + ScrCmd_GetPartyMonForm, ScrCmd_677, ScrCmd_678, ScrCmd_679, @@ -1681,7 +1681,7 @@ const ScrCmdFunc gScriptCmdTable[] = { ScrCmd_824, ScrCmd_GetShinyLeafCount, ScrCmd_TryGiveShinyLeafCrown, - ScrCmd_GetPartymonForme, + ScrCmd_GetPartymonForm, ScrCmd_MonAddContestValue, ScrCmd_829, ScrCmd_830, diff --git a/src/dex_mon_measures.c b/src/dex_mon_measures.c index 51f75be098..fabd6cce93 100644 --- a/src/dex_mon_measures.c +++ b/src/dex_mon_measures.c @@ -106,8 +106,8 @@ static void sub_020914E8(NARC *narc, u32 **a1, u32 **a2, HeapID heapId) { *a2 = GfGfxLoader_LoadFromOpenNarc(narc, 4, FALSE, heapId, FALSE); } -void SetDexBanksByGiratinaForme(int forme) { - if (forme == 0) { +void SetDexBanksByGiratinaForm(int form) { + if (form == 0) { sDataNarcId = NARC_application_zukanlist_zukan_data_zukan_data_gira; sWeightMsgBank = NARC_msg_msg_0813_bin; sHeightMsgBank = NARC_msg_msg_0815_bin; diff --git a/src/easy_chat.c b/src/easy_chat.c index f5eb66e3f2..d23e685eb3 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -94,7 +94,7 @@ static const struct { {_you, NELEMS(_you)}, }; -void SaveEasyChat_SetGreetingFlag(SAVE_EASY_CHAT_T *ec, u8 a1); +void Save_EasyChat_SetGreetingFlag(SAVE_EASY_CHAT_T *ec, u8 a1); BOOL GetCategoryAndMsgNoByECWordIdx(u16 ecWord, u32 *category, u32 *msgno); @@ -180,23 +180,23 @@ void Save_EasyChat_Init(SAVE_EASY_CHAT_T *ec) { ec->trendy = 0; for (i = 0; i < NELEMS(sLanguageToGreetingMap); i++) { if (sLanguageToGreetingMap[i][0] == GAME_LANGUAGE) { - SaveEasyChat_SetGreetingFlag(ec, sLanguageToGreetingMap[i][1]); + Save_EasyChat_SetGreetingFlag(ec, sLanguageToGreetingMap[i][1]); break; } } SaveSubstruct_UpdateCRC(SAVE_EASY_CHAT); } -SAVE_EASY_CHAT_T *SaveData_EasyChat_Get(SaveData *saveData) { +SAVE_EASY_CHAT_T *Save_EasyChat_Get(SaveData *saveData) { SaveSubstruct_AssertCRC(SAVE_EASY_CHAT); return SaveArray_Get(saveData, SAVE_EASY_CHAT); } -BOOL SaveEasyChat_GetTrendySayingFlag(SAVE_EASY_CHAT_T *ec, int flag) { +BOOL Save_EasyChat_GetTrendySayingFlag(SAVE_EASY_CHAT_T *ec, int flag) { return (ec->trendy >> flag) & 1; } -u32 SaveEasyChat_RandomTrendySayingSet(SAVE_EASY_CHAT_T *ec) { +u32 Save_EasyChat_RandomTrendySayingSet(SAVE_EASY_CHAT_T *ec) { u32 i; u32 n; u32 k; @@ -224,7 +224,7 @@ u32 SaveEasyChat_RandomTrendySayingSet(SAVE_EASY_CHAT_T *ec) { return 32; } -BOOL SaveEasyChat_TrendySayingsUnlockedAllCheck(SAVE_EASY_CHAT_T *ec) { +BOOL Save_EasyChat_TrendySayingsUnlockedAllCheck(SAVE_EASY_CHAT_T *ec) { u32 i; for (i = 0; i < 32; i++) { @@ -244,11 +244,11 @@ ECWORD TrendyWordIdxToECWord(int a0) { return n + a0; } -BOOL SaveEasyChat_GetGreetingsFlag(SAVE_EASY_CHAT_T *ec, u8 idx) { +BOOL Save_EasyChat_GetGreetingsFlag(SAVE_EASY_CHAT_T *ec, u8 idx) { return (ec->greetings >> idx) & 1; } -void SaveEasyChat_SetGreetingFlag(SAVE_EASY_CHAT_T *ec, u8 idx) { +void Save_EasyChat_SetGreetingFlag(SAVE_EASY_CHAT_T *ec, u8 idx) { ec->greetings |= 1 << idx; SaveSubstruct_UpdateCRC(SAVE_EASY_CHAT); } diff --git a/src/field/scrcmd_pokemon_misc.c b/src/field/scrcmd_pokemon_misc.c index 3e00f11cb6..556226f290 100644 --- a/src/field/scrcmd_pokemon_misc.c +++ b/src/field/scrcmd_pokemon_misc.c @@ -85,7 +85,7 @@ static void ov01_02201088(struct ListMenu *listMenu, s32 unused1, u8 unused2); static void ov01_022010CC(SysTask *sysTask, void *work); static void ov01_0220116C(SCR_648_STRUCT *unkPtr); static void GetHiddenPowerPowerType(Pokemon *mon, s32 *power, s32 *type); -static LocalMapObject *ov01_02201F98(MapObjectManager *mapObjectMan, u8 unkA, u16 species, u16 forme, u32 gender, u32 x, u32 y, u32 mapId); +static LocalMapObject *ov01_02201F98(MapObjectManager *mapObjectMan, u8 unkA, u16 species, u16 form, u32 gender, u32 x, u32 y, u32 mapId); extern u16 ov01_02209AE0[10]; @@ -393,7 +393,7 @@ BOOL ScrCmd_StatJudge(ScriptContext *ctx) { } BOOL ScrCmd_CommSanitizeParty(ScriptContext *ctx) { - int partyCount, i, forme; + int partyCount, i, form; u32 species, data; u32 heldItems[6]; Pokemon *mon; @@ -429,18 +429,18 @@ BOOL ScrCmd_CommSanitizeParty(ScriptContext *ctx) { for (i = 0; i < partyCount; i++) { mon = GetPartyMonByIndex(party, i); - forme = GetMonData(mon, MON_DATA_FORME, 0); - if (forme > 0) { + form = GetMonData(mon, MON_DATA_FORM, 0); + if (form > 0) { species = GetMonData(mon, MON_DATA_SPECIES, 0); switch (species) { case SPECIES_GIRATINA: - Mon_UpdateGiratinaForme(mon); + Mon_UpdateGiratinaForm(mon); break; case SPECIES_ROTOM: - Mon_UpdateRotomForme(mon, 0, 0); + Mon_UpdateRotomForm(mon, 0, 0); break; case SPECIES_SHAYMIN: - Mon_UpdateShayminForme(mon, 0); + Mon_UpdateShayminForm(mon, 0); break; } } @@ -448,18 +448,18 @@ BOOL ScrCmd_CommSanitizeParty(ScriptContext *ctx) { return FALSE; } -BOOL ScrCmd_SetMonForme(ScriptContext *ctx) { +BOOL ScrCmd_SetMonForm(ScriptContext *ctx) { FieldSystem *fsys = ctx->fsys; u16 index = ScriptGetVar(ctx); - u16 forme = ScriptGetVar(ctx); + u16 form = ScriptGetVar(ctx); Pokemon *mon = GetPartyMonByIndex(SaveArray_PlayerParty_Get(fsys->savedata), index); - SetMonData(mon, MON_DATA_FORME, &forme); + SetMonData(mon, MON_DATA_FORM, &form); return FALSE; } BOOL ScrCmd_CountTranformedRotomsInParty(ScriptContext *ctx) { int i, partyCount, count; - u32 species, forme, isEgg; + u32 species, form, isEgg; Pokemon *mon; PARTY *party; FieldSystem *fsys = ctx->fsys; @@ -474,9 +474,9 @@ BOOL ScrCmd_CountTranformedRotomsInParty(ScriptContext *ctx) { for (i = 0; i < partyCount; i++) { mon = GetPartyMonByIndex(party, i); species = GetMonData(mon, MON_DATA_SPECIES, 0); - forme = GetMonData(mon, MON_DATA_FORME, 0); + form = GetMonData(mon, MON_DATA_FORM, 0); isEgg = GetMonData(mon, MON_DATA_IS_EGG, 0); - if (species == SPECIES_ROTOM && forme && !isEgg) { + if (species == SPECIES_ROTOM && form && !isEgg) { if (*firstIndex == 255) { *firstIndex = i; } @@ -487,14 +487,14 @@ BOOL ScrCmd_CountTranformedRotomsInParty(ScriptContext *ctx) { return FALSE; } -BOOL ScrCmd_UpdateRotomForme(ScriptContext *ctx) { +BOOL ScrCmd_UpdateRotomForm(ScriptContext *ctx) { FieldSystem *fsys = ctx->fsys; int rotomIndex = ScriptGetVar(ctx); int defaultSlot = ScriptGetVar(ctx); ScriptGetVar(ctx); //unsused variable - u32 forme = ScriptGetVar(ctx); + u32 form = ScriptGetVar(ctx); Pokemon *mon = GetPartyMonByIndex(SaveArray_PlayerParty_Get(fsys->savedata), rotomIndex); - Mon_UpdateRotomForme(mon, forme, defaultSlot); + Mon_UpdateRotomForm(mon, form, defaultSlot); Pokedex_SetMonCaughtFlag(Save_Pokedex_Get(fsys->savedata), mon); return FALSE; } @@ -573,9 +573,9 @@ BOOL ScrCmd_SetFavoriteMon(ScriptContext *ctx) { Pokemon *mon = GetPartyMonByIndex(SaveArray_PlayerParty_Get(ctx->fsys->savedata), 0); SAVE_MISC_DATA *data = Save_Misc_Get(fsys->savedata); u32 species = GetMonData(mon, MON_DATA_SPECIES, 0); - u32 forme = GetMonData(mon, MON_DATA_FORME, 0); + u32 form = GetMonData(mon, MON_DATA_FORM, 0); u32 isEgg = GetMonData(mon, MON_DATA_IS_EGG, 0); - SaveMisc_SetFavoriteMon(data, species, forme, isEgg); + SaveMisc_SetFavoriteMon(data, species, form, isEgg); return FALSE; } @@ -583,22 +583,22 @@ BOOL ScrCmd_GetFavoriteMon(ScriptContext *ctx) { FieldSystem *fsys = ctx->fsys; u32 sp, form, egg; u16 *species = ScriptGetVarPointer(ctx); - u16 *forme = ScriptGetVarPointer(ctx); + u16 *formPtr = ScriptGetVarPointer(ctx); u16 *isEgg = ScriptGetVarPointer(ctx); SAVE_MISC_DATA *data = Save_Misc_Get(fsys->savedata); SaveMisc_GetFavoriteMon(data, &sp, &form, &egg); *species = sp; - *forme = form; + *formPtr = form; *isEgg = egg; return FALSE; } -BOOL ScrCmd_GetPartyMonForme(ScriptContext *ctx) { +BOOL ScrCmd_GetPartyMonForm(ScriptContext *ctx) { FieldSystem *fsys = ctx->fsys; u32 index = ScriptGetVar(ctx); - u16 *forme = ScriptGetVarPointer(ctx); + u16 *form = ScriptGetVarPointer(ctx); Pokemon *mon = GetPartyMonByIndex(SaveArray_PlayerParty_Get(fsys->savedata), index); - *forme = GetMonData(mon, MON_DATA_FORME, 0); + *form = GetMonData(mon, MON_DATA_FORM, 0); return FALSE; } @@ -937,18 +937,18 @@ BOOL ScrCmd_CreatePokeathlonFriendshipRoomStatues(ScriptContext *ctx) { species = unkPtr->friendshipRoomStatues[i].species; if (species != 0 && species <= SPECIES_ARCEUS) { - ov01_02201F98(fsys->mapObjectMan, (u8) i, species, unkPtr->friendshipRoomStatues[i].forme, unkPtr->friendshipRoomStatues[i].gender, sFriendshipRoomStatuesPositions[i][0], sFriendshipRoomStatuesPositions[i][1], fsys->location->mapId); + ov01_02201F98(fsys->mapObjectMan, (u8) i, species, unkPtr->friendshipRoomStatues[i].form, unkPtr->friendshipRoomStatues[i].gender, sFriendshipRoomStatuesPositions[i][0], sFriendshipRoomStatuesPositions[i][1], fsys->location->mapId); } } return TRUE; } -static LocalMapObject *ov01_02201F98(MapObjectManager *mapObjectMan, u8 unkA, u16 species, u16 forme, u32 gender, u32 x, u32 y, u32 mapId) { +static LocalMapObject *ov01_02201F98(MapObjectManager *mapObjectMan, u8 unkA, u16 species, u16 form, u32 gender, u32 x, u32 y, u32 mapId) { LocalMapObject *mapObj; u32 spriteId; u32 size; - spriteId = FollowingPokemon_GetSpriteID(species, forme, gender) << 1; + spriteId = FollowingPokemon_GetSpriteID(species, form, gender) << 1; size = GetFollowPokeSizeParamBySpecies(species)*3 + unkA; mapObj = CreateSpecialFieldObjectEx(mapObjectMan, x, y, DIR_SOUTH, size + 0x19f, 0, mapId, 0, 0, spriteId); @@ -962,7 +962,7 @@ static LocalMapObject *ov01_02201F98(MapObjectManager *mapObjectMan, u8 unkA, u1 MapObject_SetFlagID(mapObj, 0); MapObject_SetScript(mapObj, 0); MapObject_SetParam(mapObj, 0, 2); - sub_02069F0C(mapObj, species, (u8) forme, FALSE, spriteId); + sub_02069F0C(mapObj, species, (u8) form, FALSE, spriteId); MapObject_SetXRange(mapObj, -1); MapObject_SetYRange(mapObj, -1); MapObject_SetFlagsBits(mapObj, MAPOBJECTFLAG_UNK30); @@ -973,26 +973,26 @@ static LocalMapObject *ov01_02201F98(MapObjectManager *mapObjectMan, u8 unkA, u1 } BOOL ScrCmd_CheckSeenAllLetterUnown(ScriptContext *ctx) { - u32 forme; + u32 form; s32 i; u32 counter; - s32 unownFormes; + s32 unownForms; Pokedex *pokedex; u16 *allUnownSeen; allUnownSeen = ScriptGetVarPointer(ctx); pokedex = Save_Pokedex_Get(ctx->fsys->savedata); - unownFormes = Pokedex_GetSeenFormeNum_Unown(pokedex, 1); - if (unownFormes < 26) { + unownForms = Pokedex_GetSeenFormNum_Unown(pokedex, 1); + if (unownForms < 26) { *allUnownSeen = FALSE; return TRUE; } counter = 0; - for (i = 0; i < unownFormes; i++) { - forme = Pokedex_GetSeenFormeByIdx_Unown(pokedex, i, TRUE); - if (forme != 26 && forme != 27) { + for (i = 0; i < unownForms; i++) { + form = Pokedex_GetSeenFormByIdx_Unown(pokedex, i, TRUE); + if (form != 26 && form != 27) { counter++; } } @@ -1068,7 +1068,7 @@ extern u16 sSpikyEarPichuMoveset[4]; BOOL ScrCmd_GiveSpikyEarPichu(ScriptContext *ctx) { s32 i; - u8 forme; + u8 form; u8 maxPP; u16 heldItem; Pokemon *mon; @@ -1090,8 +1090,8 @@ BOOL ScrCmd_GiveSpikyEarPichu(ScriptContext *ctx) { u32 unkA = ChangePersonalityToNatureGenderAndAbility(trId, 0xac, NATURE_NAUGHTY, MON_FEMALE, 0, 0); CreateMon(mon, SPECIES_PICHU, 30, 0x20, 1, unkA, 1, trId); - forme = 1; - SetMonData(mon, MON_DATA_FORME, &forme); + form = 1; + SetMonData(mon, MON_DATA_FORM, &form); for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(mon, MON_DATA_MOVE1 + i, &sSpikyEarPichuMoveset[i]); diff --git a/src/field_blackthorn_tutors.c b/src/field_blackthorn_tutors.c index 177f4ce8c2..795d9a5fde 100644 --- a/src/field_blackthorn_tutors.c +++ b/src/field_blackthorn_tutors.c @@ -16,14 +16,14 @@ void MoveRelearner_Delete(struct MoveRelearner *moveRelearner) { u16 *GetEligibleLevelUpMoves(Pokemon *mon, HeapID heapId) { u16 cur_moveset[MAX_MON_MOVES]; // sp+10 u16 species; // sp+0C - u8 forme; // sp+08 + u8 form; // sp+08 u8 level; // sp+04 u16 *ret; u16 *wotbl; u8 i, j, ct; species = GetMonData(mon, MON_DATA_SPECIES, NULL); - forme = GetMonData(mon, MON_DATA_FORME, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); level = GetMonData(mon, MON_DATA_LEVEL, NULL); for (i = 0; i < MAX_MON_MOVES; i++) { cur_moveset[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); @@ -32,7 +32,7 @@ u16 *GetEligibleLevelUpMoves(Pokemon *mon, HeapID heapId) { wotbl = AllocFromHeap(heapId, WOTBL_MAX * 2); ret = AllocFromHeap(heapId, WOTBL_MAX * 2); - LoadWotbl_HandleAlternateForme(species, forme, wotbl); + LoadWotbl_HandleAlternateForm(species, form, wotbl); ct = 0; for (i = 0; i < WOTBL_MAX; i++) { diff --git a/src/field_follow_poke.c b/src/field_follow_poke.c index 401cc3f141..1e3120e2b9 100644 --- a/src/field_follow_poke.c +++ b/src/field_follow_poke.c @@ -11,8 +11,8 @@ static void FsysFollowMonClear(FollowMon *followMon); static void FollowingPoke_SetObjectShinyFlag(LocalMapObject *mapObject, BOOL enable); static BOOL FollowPokePermissionDiglettCheck(int mapno); -static void FollowingPoke_SetObjectFormeParam(LocalMapObject *mapObject, int species, u8 forme); -static LocalMapObject *CreateFollowingSpriteFieldObject(MapObjectManager *mapObjectMan, int species, u16 forme, int gender, int direction, int x, int y, int shiny); +static void FollowingPoke_SetObjectFormParam(LocalMapObject *mapObject, int species, u8 form); +static LocalMapObject *CreateFollowingSpriteFieldObject(MapObjectManager *mapObjectMan, int species, u16 form, int gender, int direction, int x, int y, int shiny); static const u16 sModelIndexLUT[] = { FOLLOWER_MON_NONE, @@ -511,7 +511,7 @@ static const u16 sModelIndexLUT[] = { FOLLOWER_MON_ARCEUS_NORMAL, }; -static const u16 sFormeMaxLUT[] = { +static const u16 sFormMaxLUT[] = { 0, // SPECIES_BULBASAUR 0, // SPECIES_IVYSAUR 0, // SPECIES_VENUSAUR @@ -1509,7 +1509,7 @@ LocalMapObject *sub_020699F8(MapObjectManager *mapObjectMan, int x, int y, int d int partyCount; Pokemon *mon; int species; - int forme; + int form; int gender; int shiny; int player_unk; @@ -1528,12 +1528,12 @@ LocalMapObject *sub_020699F8(MapObjectManager *mapObjectMan, int x, int y, int d species = GetMonData(mon, MON_DATA_SPECIES, NULL); fsys->followMon.mapObject = NULL; if (GetFollowPokePermissionBySpeciesAndMap(species, mapno)) { - forme = GetMonData(mon, MON_DATA_FORME, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); gender = GetMonData(mon, MON_DATA_GENDER, NULL); shiny = MonIsShiny(mon); - fsys->followMon.mapObject = CreateFollowingSpriteFieldObject(mapObjectMan, species, forme, gender, direction, x, y, shiny); + fsys->followMon.mapObject = CreateFollowingSpriteFieldObject(mapObjectMan, species, form, gender, direction, x, y, shiny); fsys->followMon.active = TRUE; - FollowPokeFsysParamSet(fsys, species, forme, shiny, gender); + FollowPokeFsysParamSet(fsys, species, form, shiny, gender); FsysUnkSub108_Set(fsys->unk108, mon, species, GetMonData(mon, MON_DATA_PERSONALITY, NULL)); player_unk = PlayerAvatar_GetState(fsys->playerAvatar); if (player_unk == 0 || player_unk == 3) { @@ -1564,7 +1564,7 @@ void sub_02069B74(MapObjectManager *mapObjectMan, u32 mapno) { int partyCount; Pokemon *mon; int species; - int forme; + int form; u8 gender; int shiny; int player_unk; @@ -1583,14 +1583,14 @@ void sub_02069B74(MapObjectManager *mapObjectMan, u32 mapno) { if (followPokeObj == NULL) { fsys->followMon.unk15 = 1; } else { - forme = GetMonData(mon, MON_DATA_FORME, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); gender = GetMonGender(mon); shiny = MonIsShiny(mon); fsys->followMon.mapObject = followPokeObj; fsys->followMon.active = TRUE; - FollowPokeFsysParamSet(fsys, species, forme, shiny, gender); - FollowPokeMapObjectSetParams(followPokeObj, species, forme, shiny); - MapObject_SetGfxID(fsys->followMon.mapObject, FollowingPokemon_GetSpriteID(species, forme, gender)); + FollowPokeFsysParamSet(fsys, species, form, shiny, gender); + FollowPokeMapObjectSetParams(followPokeObj, species, form, shiny); + MapObject_SetGfxID(fsys->followMon.mapObject, FollowingPokemon_GetSpriteID(species, form, gender)); player_unk = PlayerAvatar_GetState(fsys->playerAvatar); if (player_unk == 0 || player_unk == 3) { SavFollowPoke_SetUnused2bitField(1, Save_FollowPoke_Get(fsys->savedata)); @@ -1614,12 +1614,12 @@ void sub_02069B74(MapObjectManager *mapObjectMan, u32 mapno) { } else { followPokeObj = GetMapObjectByID(fsys->mapObjectMan, obj_partner_poke); if (followPokeObj != NULL) { - forme = GetMonData(mon, MON_DATA_FORME, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); gender = GetMonGender(mon); shiny = MonIsShiny(mon); - FollowPokeFsysParamSet(fsys, species, forme, shiny, gender); - FollowPokeMapObjectSetParams(followPokeObj, species, forme, shiny); - MapObject_SetGfxID(followPokeObj, FollowingPokemon_GetSpriteID(species, forme, gender)); + FollowPokeFsysParamSet(fsys, species, form, shiny, gender); + FollowPokeMapObjectSetParams(followPokeObj, species, form, shiny); + MapObject_SetGfxID(followPokeObj, FollowingPokemon_GetSpriteID(species, form, gender)); fsys->followMon.mapObject = followPokeObj; fsys->followMon.active = TRUE; fsys->followMon.unk15 = 1; @@ -1632,22 +1632,22 @@ LocalMapObject *FollowingPokemon_GetMapObject(FieldSystem *fsys) { return fsys->followMon.mapObject; } -u32 FollowingPokemon_GetSpriteID(int species, u16 forme, u32 gender) { +u32 FollowingPokemon_GetSpriteID(int species, u16 form, u32 gender) { int ret; if (species <= 0 || species > NATIONAL_DEX_COUNT) { ret = SPRITE_FOLLOWER_MON_BULBASAUR; } else { ret = SPRITE_FOLLOWER_MON_BULBASAUR + SpeciesToOverworldModelIndexOffset(species); - if (OverworldModelLookupHasFemaleForme(species)) { + if (OverworldModelLookupHasFemaleForm(species)) { if (gender == MON_FEMALE) { ret++; } } else { - if (forme > OverworldModelLookupFormeCount(species)) { - forme = 0; + if (form > OverworldModelLookupFormCount(species)) { + form = 0; } - ret += forme; + ret += form; } if (ret > SPRITE_FOLLOWER_MON_ARCEUS_DARK) { ret = SPRITE_FOLLOWER_MON_BULBASAUR; @@ -1742,23 +1742,23 @@ u8 sub_02069ED4(LocalMapObject *mapObject) { return (MapObject_GetParam(mapObject, 2) >> 10) & 0x3F; } -void FollowPokeMapObjectSetParams(LocalMapObject *mapObject, int species, u8 forme, BOOL shiny) { +void FollowPokeMapObjectSetParams(LocalMapObject *mapObject, int species, u8 form, BOOL shiny) { FollowingPoke_SetObjectShinyFlag(mapObject, shiny); - FollowingPoke_SetObjectFormeParam(mapObject, species, forme); + FollowingPoke_SetObjectFormParam(mapObject, species, form); MapObject_SetParam(mapObject, species, 0); } -void sub_02069F0C(LocalMapObject *mapObject, int species, u8 forme, BOOL shiny, int a4) { +void sub_02069F0C(LocalMapObject *mapObject, int species, u8 form, BOOL shiny, int a4) { MapObject_SetParam(mapObject, a4, 2); FollowingPoke_SetObjectShinyFlag(mapObject, shiny); - FollowingPoke_SetObjectFormeParam(mapObject, species, forme); + FollowingPoke_SetObjectFormParam(mapObject, species, form); MapObject_SetParam(mapObject, species, 0); } -void FollowPokeFsysParamSet(FieldSystem *fsys, int species, u8 forme, BOOL shiny, u8 gender) { +void FollowPokeFsysParamSet(FieldSystem *fsys, int species, u8 form, BOOL shiny, u8 gender) { fsys->followMon.species = species; fsys->followMon.shiny = shiny; - fsys->followMon.forme = forme; + fsys->followMon.form = form; fsys->followMon.gender = gender; } @@ -1884,17 +1884,17 @@ static BOOL FollowPokePermissionDiglettCheck(int mapno) { } } -static void FollowingPoke_SetObjectFormeParam(LocalMapObject *mapObject, int species, u8 forme) { +static void FollowingPoke_SetObjectFormParam(LocalMapObject *mapObject, int species, u8 form) { u8 data[4]; int offset; - int formect; + int formct; u16 param; offset = SpeciesToOverworldModelIndexOffset(species); - formect = OverworldModelLookupFormeCount(species); - if (formect > 0) { - if (forme <= formect) { - offset += forme; + formct = OverworldModelLookupFormCount(species); + if (formct > 0) { + if (form <= formct) { + offset += form; } else { GF_ASSERT(0); } @@ -1904,7 +1904,7 @@ static void FollowingPoke_SetObjectFormeParam(LocalMapObject *mapObject, int spe MapObject_SetParam(mapObject, param, 1); } -static LocalMapObject *CreateFollowingSpriteFieldObject(MapObjectManager *mapObjectMan, int species, u16 forme, int gender, int direction, int x, int y, int shiny) { +static LocalMapObject *CreateFollowingSpriteFieldObject(MapObjectManager *mapObjectMan, int species, u16 form, int gender, int direction, int x, int y, int shiny) { LocalMapObject *ret; ret = CreateSpecialFieldObject( @@ -1912,7 +1912,7 @@ static LocalMapObject *CreateFollowingSpriteFieldObject(MapObjectManager *mapObj x, y, direction, - FollowingPokemon_GetSpriteID(species, forme, gender), + FollowingPokemon_GetSpriteID(species, form, gender), 0x30, MAP_NOTHING ); @@ -1922,7 +1922,7 @@ static LocalMapObject *CreateFollowingSpriteFieldObject(MapObjectManager *mapObj MapObject_SetFlagID(ret, 0); MapObject_SetScript(ret, std_following_mon); MapObject_SetParam(ret, 0, 2); - FollowPokeMapObjectSetParams(ret, species, forme, shiny); + FollowPokeMapObjectSetParams(ret, species, form, shiny); MapObject_SetXRange(ret, -1); MapObject_SetYRange(ret, -1); MapObject_SetFlagsBits(ret, MAPOBJECTFLAG_UNK13 | MAPOBJECTFLAG_UNK10); @@ -2012,17 +2012,17 @@ int SpeciesToOverworldModelIndexOffset(int species) { return sModelIndexLUT[species]; } -int OverworldModelLookupFormeCount(int species) { +int OverworldModelLookupFormCount(int species) { if (!(species > 0 && species <= NATIONAL_DEX_COUNT)) { GF_ASSERT(0); species = 0; } else { species--; } - return sFormeMaxLUT[species]; + return sFormMaxLUT[species]; } -BOOL OverworldModelLookupHasFemaleForme(int species) { +BOOL OverworldModelLookupHasFemaleForm(int species) { if (!(species > 0 && species <= NATIONAL_DEX_COUNT)) { GF_ASSERT(0); species = 0; diff --git a/src/get_egg.c b/src/get_egg.c index 58129f8541..51af5deaf0 100644 --- a/src/get_egg.c +++ b/src/get_egg.c @@ -36,7 +36,7 @@ static void InheritMoves(Pokemon *egg, BoxPokemon *father, BoxPokemon *mother); static u16 Daycare_BreedingIncenseCheck(u16 species, DAYCARE *dayCare); static void Daycare_LightBallCheck(Pokemon *egg, DAYCARE *dayCare); static u16 Daycare_GetEggSpecies(DAYCARE *dayCare, u8 *gender_idx); -static void SetBreedEggStats(Pokemon *mon, u16 species, DAYCARE *dayCare, u32 otId, u8 forme); +static void SetBreedEggStats(Pokemon *mon, u16 species, DAYCARE *dayCare, u32 otId, u8 form); static u8 GetEggCyclesToSubtract(PARTY *party); static BOOL sub_0206CB88(const u16 *a0, const u16 *a1); static u8 ComputeCompatibilityBetweenBoxMons(BoxPokemon **parents); @@ -98,7 +98,7 @@ static void DayCareMon_CopyFromPartySlot(PARTY *party, int partyIdx, DAYCAREMON mood = 0; SetMonData(partyMon, MON_DATA_MOOD, &mood); CopyPokemonToBoxPokemon(partyMon, boxMon); - BoxMon_UpdateShayminForme(boxMon, SHAYMIN_LAND); + BoxMon_UpdateShayminForm(boxMon, SHAYMIN_LAND); DayCareMon_SetSteps(daycareMon, 0); RemoveMonFromParty(party, partyIdx); if (!PartyHasMon(party, SPECIES_CHATOT)) { @@ -448,7 +448,7 @@ static void InheritMoves(Pokemon *egg, BoxPokemon *father, BoxPokemon *mother) { u16 sp1C; u16 egg_species; u16 learnset_size; - u16 egg_forme; + u16 egg_form; u16 i, j; u16 r5; struct EggMoveSearch *search; @@ -458,8 +458,8 @@ static void InheritMoves(Pokemon *egg, BoxPokemon *father, BoxPokemon *mother) { MI_CpuClearFast(search, sizeof(struct EggMoveSearch)); egg_species = GetMonData(egg, MON_DATA_SPECIES, NULL); - egg_forme = GetMonData(egg, MON_DATA_FORME, NULL); - learnset_size = Species_LoadLearnsetTable(egg_species, egg_forme, search->baby_learnset); + egg_form = GetMonData(egg, MON_DATA_FORM, NULL); + learnset_size = Species_LoadLearnsetTable(egg_species, egg_form, search->baby_learnset); for (i = 0; i < MAX_MON_MOVES; i++) { search->dad_moves[i] = GetBoxMonData(father, MON_DATA_MOVE1 + i, NULL); search->mom_moves[i] = GetBoxMonData(mother, MON_DATA_MOVE1 + i, NULL); @@ -483,7 +483,7 @@ static void InheritMoves(Pokemon *egg, BoxPokemon *father, BoxPokemon *mother) { if (search->dad_moves[i] != MOVE_NONE) { for (j = 0; j < 100; j++) { if (search->dad_moves[i] == TMHMGetMove(j + ITEM_TM01)) { - if (GetTMHMCompatBySpeciesAndForme(egg_species, egg_forme, j)) { + if (GetTMHMCompatBySpeciesAndForm(egg_species, egg_form, j)) { if (TryAppendMonMove(egg, search->dad_moves[i]) == MOVE_APPEND_FULL) { DeleteMonFirstMoveAndAppend(egg, search->dad_moves[i]); } @@ -660,7 +660,7 @@ void SetEggStats(Pokemon *mon, int species, u8 metLocation, PlayerProfile *profi MonSetTrainerMemo(mon, profile, a4, a5, HEAP_ID_0); } -static void SetBreedEggStats(Pokemon *mon, u16 species, DAYCARE *dayCare, u32 otId, u8 forme) { +static void SetBreedEggStats(Pokemon *mon, u16 species, DAYCARE *dayCare, u32 otId, u8 form) { u16 pokeball; u8 metLevel; u8 friendship; @@ -688,7 +688,7 @@ static void SetBreedEggStats(Pokemon *mon, u16 species, DAYCARE *dayCare, u32 ot SetMonData(mon, MON_DATA_POKEBALL, &pokeball); SetMonData(mon, MON_DATA_FRIENDSHIP, &friendship); SetMonData(mon, MON_DATA_MET_LEVEL, &metLevel); - SetMonData(mon, MON_DATA_FORME, &forme); + SetMonData(mon, MON_DATA_FORM, &form); name = GetSpeciesName(SPECIES_EGG, HEAP_ID_4); SetMonData(mon, MON_DATA_NICKNAME_3, name); String_Delete(name); @@ -700,14 +700,14 @@ void GiveEggToPlayer(DAYCARE *dayCare, PARTY *party, PlayerProfile* profile) { u8 gender_idx[2]; u8 isEgg; u32 otId; - u8 mom_forme; + u8 mom_form; mon = AllocMonZeroed(HEAP_ID_4); species = Daycare_GetEggSpecies(dayCare, gender_idx); species = Daycare_BreedingIncenseCheck(species, dayCare); otId = PlayerProfile_GetTrainerID(profile); - mom_forme = GetBoxMonData(Daycare_GetBoxMonI(dayCare, gender_idx[0]), MON_DATA_FORME, NULL); - SetBreedEggStats(mon, species, dayCare, otId, mom_forme); + mom_form = GetBoxMonData(Daycare_GetBoxMonI(dayCare, gender_idx[0]), MON_DATA_FORM, NULL); + SetBreedEggStats(mon, species, dayCare, otId, mom_form); InheritIVs(mon, dayCare); InheritMoves(mon, Daycare_GetBoxMonI(dayCare, gender_idx[1]), Daycare_GetBoxMonI(dayCare, gender_idx[0])); MonSetTrainerMemo(mon, profile, 3, sub_02017FE4(MAPSECTYPE_GIFT, 0), HEAP_ID_4); @@ -1015,7 +1015,7 @@ static void sub_0206D038(Pokemon *mon, HeapID heapId) { u8 markings; u8 eggCycles; u8 fateful; - u8 forme; + u8 form; u8 otGender; u8 metYear; u8 metMonth; @@ -1045,7 +1045,7 @@ static void sub_0206D038(Pokemon *mon, HeapID heapId) { GetMonData(mon, MON_DATA_OT_NAME_2, string); otGender = GetMonData(mon, MON_DATA_MET_GENDER, NULL); otId = GetMonData(mon, MON_DATA_OTID, NULL); - forme = GetMonData(mon, MON_DATA_FORME, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); if (species == SPECIES_MANAPHY && GetMonData(mon, MON_DATA_EGG_MET_LOCATION, NULL) == sub_02017FE4(MAPSECTYPE_EXTERNAL, 1)) { if (CalcShininessByOtIdAndPersonality(otId, pid)) { do { @@ -1071,7 +1071,7 @@ static void sub_0206D038(Pokemon *mon, HeapID heapId) { SetMonData(tmpMon, MON_DATA_OT_NAME_2, string); SetMonData(tmpMon, MON_DATA_MET_GENDER, &otGender); SetMonData(tmpMon, MON_DATA_OTID, &otId); - SetMonData(tmpMon, MON_DATA_FORME, &forme); + SetMonData(tmpMon, MON_DATA_FORM, &form); metLoc = GetMonData(mon, MON_DATA_EGG_MET_LOCATION, NULL); metYear = GetMonData(mon, MON_DATA_EGG_MET_YEAR, NULL); metMonth = GetMonData(mon, MON_DATA_EGG_MET_MONTH, NULL); diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 253674fb42..f38ad959be 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -39,7 +39,7 @@ void Save_HOF_RecordParty(HALL_OF_FAME *hof, PARTY *party, RTCDate *date) { if (!GetMonData(mon, MON_DATA_IS_EGG, NULL)) { team->party[j].species = GetMonData(mon, MON_DATA_SPECIES, NULL); team->party[j].level = GetMonData(mon, MON_DATA_LEVEL, NULL); - team->party[j].forme = GetMonData(mon, MON_DATA_FORME, NULL); + team->party[j].form = GetMonData(mon, MON_DATA_FORM, NULL); team->party[j].personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); team->party[j].otid = GetMonData(mon, MON_DATA_OTID, NULL); team->party[j].moves[0] = GetMonData(mon, MON_DATA_MOVE1, NULL); @@ -117,7 +117,7 @@ void Save_HOF_GetMonStatsByIndexPair(HALL_OF_FAME *hallOfFame, int teamNum, int dest->level = mon->level; dest->personality = mon->personality; dest->otid = mon->otid; - dest->forme = mon->forme; + dest->form = mon->form; CopyU16ArrayToString(dest->nickname, mon->nickname); CopyU16ArrayToString(dest->otname, mon->otname); for (i = 0; i < 4; i++) { diff --git a/src/mail.c b/src/mail.c index 7160e2675a..c0fe4025f0 100644 --- a/src/mail.c +++ b/src/mail.c @@ -12,11 +12,11 @@ struct UnkStruct_020F67A4 { u16 base_icon; u16 formed_icon; u16 species; - u8 forme; + u8 form; u8 dummy; }; -static const struct UnkStruct_020F67A4 sFormeOverrides[] = { +static const struct UnkStruct_020F67A4 sFormOverrides[] = { { 0x1EE, 0x21C, SPECIES_GIRATINA, GIRATINA_ORIGIN }, { 0x1F3, 0x21D, SPECIES_SHAYMIN, SHAYMIN_SKY }, { 0x1E6, 0x21E, SPECIES_ROTOM, ROTOM_HEAT }, @@ -41,7 +41,7 @@ void Mail_Init(MAIL *mail) { for (i = 0; i < 3; i++) { mail->mon_icons[i].raw = 0xFFFF; } - mail->forme_flags = 0; + mail->form_flags = 0; for (i = 0; i < 3; i++) { MailMsg_Init(&mail->unk_20[i]); } @@ -68,7 +68,7 @@ BOOL Mail_Compare(const MAIL *a, const MAIL *b) { || a->author_language != b->author_language || a->author_version != b->author_version || a->mail_type != b->mail_type - || a->forme_flags != b->forme_flags) { + || a->form_flags != b->form_flags) { return FALSE; } if (StringNotEqual(a->author_name, b->author_name)) { @@ -91,7 +91,7 @@ BOOL Mail_Compare(const MAIL *a, const MAIL *b) { void Mail_SetNewMessageDetails(MAIL *mail, u8 mailType, u8 mon_no, SaveData *saveData) { u8 i, j, pal, k; u16 species; - u32 icon, isEgg, forme; + u32 icon, isEgg, form; PlayerProfile *profile; PARTY *party; Pokemon *mon; @@ -107,24 +107,24 @@ void Mail_SetNewMessageDetails(MAIL *mail, u8 mailType, u8 mon_no, SaveData *sav mail->author_otId = PlayerProfile_GetTrainerID(profile); // Get the Pokemon icon data - mail->forme_flags = 0; + mail->form_flags = 0; for (i = mon_no, j = 0; i < GetPartyCount(party); i++) { mon = GetPartyMonByIndex(party, i); species = GetMonData(mon, MON_DATA_SPECIES, NULL); isEgg = GetMonData(mon, MON_DATA_IS_EGG, NULL); - forme = GetMonData(mon, MON_DATA_FORME, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); icon = Pokemon_GetIconNaix(mon); - pal = GetMonIconPaletteEx(species, forme, isEgg); + pal = GetMonIconPaletteEx(species, form, isEgg); mail->mon_icons[j].icon = icon; mail->mon_icons[j].pal = pal; - // Normal forme conversion for icons added in Platinum or later. - // Forme numbers are saved to this buffer. - for (k = 0; k < NELEMS(sFormeOverrides); k++) { - if (sFormeOverrides[k].formed_icon == mail->mon_icons[j].icon && sFormeOverrides[k].forme == forme) { - mail->mon_icons[j].icon = sFormeOverrides[k].base_icon; + // Normal form conversion for icons added in Platinum or later. + // Form numbers are saved to this buffer. + for (k = 0; k < NELEMS(sFormOverrides); k++) { + if (sFormOverrides[k].formed_icon == mail->mon_icons[j].icon && sFormOverrides[k].form == form) { + mail->mon_icons[j].icon = sFormOverrides[k].base_icon; mail->mon_icons[j].pal = GetMonIconPaletteEx(species, 0, isEgg); - mail->forme_flags |= sFormeOverrides[k].forme << (j * 5); + mail->form_flags |= sFormOverrides[k].form << (j * 5); break; } } @@ -140,7 +140,7 @@ MAIL *CreateKenyaMail(Pokemon *mon, u8 mailType, u8 gender, String *name, u8 otI u8 r0; u32 r5; u16 species; - u32 isEgg, forme; + u32 isEgg, form; MAIL *ret = Mail_New(HEAP_ID_3); Mail_Init(ret); ret->mail_type = mailType; @@ -163,13 +163,13 @@ MAIL *CreateKenyaMail(Pokemon *mon, u8 mailType, u8 gender, String *name, u8 otI MailMsg_SetFieldI(&ret->unk_20[2], 0, EC_WORD_POKEMON(SPECIES_ZUBAT)); MailMsg_SetFieldI(&ret->unk_20[2], 1, EC_WORD_NULL); - ret->forme_flags = 0; + ret->form_flags = 0; species = GetMonData(mon, MON_DATA_SPECIES, NULL); isEgg = GetMonData(mon, MON_DATA_IS_EGG, NULL); - forme = GetMonData(mon, MON_DATA_FORME, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); r5 = Pokemon_GetIconNaix(mon); - r0 = GetMonIconPaletteEx(species, forme, isEgg); + r0 = GetMonIconPaletteEx(species, form, isEgg); ret->mon_icons[0].icon = r5; ret->mon_icons[0].pal = r0; @@ -211,10 +211,10 @@ u16 sub_0202B404(MAIL *mail, u8 r1, u8 r4, u16 r3) { union MailPatternData sp0; if (r1 < NELEMS(mail->mon_icons)) { sp0 = mail->mon_icons[r1]; - for (i = 0; i < NELEMS(sFormeOverrides); i++) { - if (sFormeOverrides[i].base_icon == sp0.icon && sFormeOverrides[i].forme == ((r3 >> (5 * r1)) & 31)) { - sp0.icon = sFormeOverrides[i].formed_icon; - sp0.pal = GetMonIconPaletteEx(sFormeOverrides[i].species, sFormeOverrides[i].forme, FALSE); + for (i = 0; i < NELEMS(sFormOverrides); i++) { + if (sFormOverrides[i].base_icon == sp0.icon && sFormOverrides[i].form == ((r3 >> (5 * r1)) & 31)) { + sp0.icon = sFormOverrides[i].formed_icon; + sp0.pal = GetMonIconPaletteEx(sFormOverrides[i].species, sFormOverrides[i].form, FALSE); break; } } @@ -237,7 +237,7 @@ u16 sub_0202B404(MAIL *mail, u8 r1, u8 r4, u16 r3) { } u16 sub_0202B4E4(const MAIL *mail) { - return mail->forme_flags; + return mail->form_flags; } MAIL_MESSAGE *Mail_GetUnk20Array(MAIL *mail, int i) { diff --git a/src/mail_misc.c b/src/mail_misc.c index c7937b6d54..c5eab0b644 100644 --- a/src/mail_misc.c +++ b/src/mail_misc.c @@ -15,7 +15,7 @@ Unk02090C94 *sub_02090C94(u8 a0, u8 a1, SaveData *saveData, u32 a3, HeapID heapI ptr->unk0 = a0; ptr->unk1 = a1; ptr->pokedex = Save_Pokedex_Get(saveData); - ptr->easyChat = SaveData_EasyChat_Get(saveData); + ptr->easyChat = Save_EasyChat_Get(saveData); ptr->gameCleared = CheckGameClearFlag(Save_VarsFlags_Get(saveData)); ptr->unk5 = 0; ptr->unk2 = 1; diff --git a/src/overlay_36.c b/src/overlay_36.c index c46928ddd7..21de1874b1 100644 --- a/src/overlay_36.c +++ b/src/overlay_36.c @@ -153,7 +153,7 @@ BOOL ov36_App_MainMenu_SelectOption_Continue_AppExec(OVY_MANAGER* man, int* stat SysInfoRTC_HandleContinueOnNewConsole(Save_SysInfo_RTC_Get(savedata)); Save_BerryPotRTC_Init(Save_BerryPotRTC_Get(savedata)); Save_SysInfo_InitFromSystem(sys_info); - Party_ResetAllShayminToLandForme(SaveArray_PlayerParty_Get(savedata)); + Party_ResetAllShayminToLandForm(SaveArray_PlayerParty_Get(savedata)); } sub_0201838C(Save_PlayerData_GetIGTAddr(savedata)); diff --git a/src/overlay_94.c b/src/overlay_94.c index cd187c225c..863f3f946f 100644 --- a/src/overlay_94.c +++ b/src/overlay_94.c @@ -20,29 +20,29 @@ static void _DestroyLocalWork(struct PartyMenuStruct* unkPtr); static void _InitEffects(struct PartyMenuStruct* unkPtr); static void _CleanupEffects(struct PartyMenuStruct* unkPtr); -static void _CreateParticleSystem(struct IconFormeChangeWork* unkPtr); -static void _EmitParticles(struct IconFormeChangeWork* unkPtr); +static void _CreateParticleSystem(struct IconFormChangeData* unkPtr); +static void _EmitParticles(struct IconFormChangeData* unkPtr); static void particleEmitCallback(struct SPLEmitter* unkPtr); static s32 _RunParticleSystem(void); -static void _DestroyParticleSystem(struct IconFormeChangeWork* unkPtr); +static void _DestroyParticleSystem(struct IconFormChangeData* unkPtr); static u32 texAlloc(u32 szByte, BOOL is4x4comp); static u32 plttAlloc(u32 szByte, BOOL is4pltt); -void PartyMenu_InitIconFormeChangeWork(PartyMenuStruct* unkPtr) { - if (unkPtr->iconFormeChange != NULL) { +void PartyMenu_InitIconFormChangeData(PartyMenuStruct* unkPtr) { + if (unkPtr->iconFormChange != NULL) { GF_ASSERT(FALSE); } - unkPtr->iconFormeChange = AllocFromHeap(HEAPID_PARTY_MENU, sizeof(IconFormeChangeWork)); - MI_CpuClear8(unkPtr->iconFormeChange, sizeof(IconFormeChangeWork)); - unkPtr->iconFormeChange->partyMonIndex = unkPtr->partyMonIndex; + unkPtr->iconFormChange = AllocFromHeap(HEAPID_PARTY_MENU, sizeof(IconFormChangeData)); + MI_CpuClear8(unkPtr->iconFormChange, sizeof(IconFormChangeData)); + unkPtr->iconFormChange->partyMonIndex = unkPtr->partyMonIndex; } // TODO: Create NAIX #define NARC_particle_giratina 0 #define NARC_particle_shaymin 1 -BOOL PartyMenu_AnimateIconFormeChange(PartyMenuStruct* unkPtr) { - IconFormeChangeWork* work = unkPtr->iconFormeChange; +BOOL PartyMenu_AnimateIconFormChange(PartyMenuStruct* unkPtr) { + IconFormChangeData* work = unkPtr->iconFormChange; Pokemon *mon = GetPartyMonByIndex(unkPtr->unk654->party, unkPtr->partyMonIndex); switch (work->state) { @@ -50,12 +50,12 @@ BOOL PartyMenu_AnimateIconFormeChange(PartyMenuStruct* unkPtr) { work->species = GetMonData(mon, MON_DATA_SPECIES, NULL); switch (work->species) { case SPECIES_GIRATINA: - Mon_UpdateGiratinaForme(mon); + Mon_UpdateGiratinaForm(mon); work->duration = 65; work->fileId = NARC_particle_giratina; break; case SPECIES_SHAYMIN: - Mon_UpdateShayminForme(mon, SHAYMIN_SKY); + Mon_UpdateShayminForm(mon, SHAYMIN_SKY); work->duration = 35; work->fileId = NARC_particle_shaymin; break; @@ -106,7 +106,7 @@ BOOL PartyMenu_AnimateIconFormeChange(PartyMenuStruct* unkPtr) { } break; case 9: - String* str = NewString_ReadMsgData(unkPtr->msgData, msg_0300_00188); //" changed Forme!" + String* str = NewString_ReadMsgData(unkPtr->msgData, msg_0300_00188); //" changed Form!" BufferBoxMonNickname(unkPtr->unk7c4, 0, Mon_GetBoxMon(mon)); StringExpandPlaceholders(unkPtr->unk7c4, unkPtr->unk7c8, str); String_Delete(str); @@ -125,23 +125,23 @@ BOOL PartyMenu_AnimateIconFormeChange(PartyMenuStruct* unkPtr) { } static void _DestroyLocalWork(PartyMenuStruct* unkPtr) { - FreeToHeap(unkPtr->iconFormeChange); - unkPtr->iconFormeChange = 0; + FreeToHeap(unkPtr->iconFormChange); + unkPtr->iconFormChange = 0; } static void _InitEffects(PartyMenuStruct* unkPtr) { sub_0207991C(unkPtr, 0); - _CreateParticleSystem(unkPtr->iconFormeChange); + _CreateParticleSystem(unkPtr->iconFormChange); G2_SetBlendAlpha(0, 63, 31, 0); } static void _CleanupEffects(PartyMenuStruct* unkPtr) { - _DestroyParticleSystem(unkPtr->iconFormeChange); + _DestroyParticleSystem(unkPtr->iconFormChange); sub_0207991C(unkPtr, 1); G2_BlendNone(); } -static void _CreateParticleSystem(IconFormeChangeWork* unkPtr) { +static void _CreateParticleSystem(IconFormChangeData* unkPtr) { sub_02014DA0(); void* particleHeap = AllocFromHeap(HEAPID_PARTY_MENU, PARTICLE_HEAP_SIZE); @@ -150,7 +150,7 @@ static void _CreateParticleSystem(IconFormeChangeWork* unkPtr) { Camera_SetClipBounds(1 * FX32_ONE, 900 * FX32_ONE, sub_02015524(unkPtr->particleSystem)); } -static void _EmitParticles(IconFormeChangeWork* unkPtr) { +static void _EmitParticles(IconFormChangeData* unkPtr) { sub_0201526C(unkPtr->particleSystem, sub_02015264(NARC_a_2_0_6, unkPtr->fileId, HEAPID_PARTY_MENU), 0xA, 1); switch (unkPtr->species) { @@ -178,7 +178,7 @@ static const fx32 sPartyMonSpritePositions[][2] = { }; static void particleEmitCallback(struct SPLEmitter* emitter) { - struct IconFormeChangeWork* unkA = sub_02015504(); + struct IconFormChangeData* unkA = sub_02015504(); SPL_SetEmitterPositionX(emitter, sPartyMonSpritePositions[unkA->partyMonIndex][0]); SPL_SetEmitterPositionY(emitter, sPartyMonSpritePositions[unkA->partyMonIndex][1]); } @@ -194,7 +194,7 @@ static s32 _RunParticleSystem(void) { return val; } -static void _DestroyParticleSystem(IconFormeChangeWork* unkPtr) { +static void _DestroyParticleSystem(IconFormChangeData* unkPtr) { void* unkA = sub_020154D0(unkPtr->particleSystem); sub_02014EBC(unkPtr->particleSystem); FreeToHeap(unkA); diff --git a/src/pokedex.c b/src/pokedex.c index a36276fa45..e20017cb4c 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -7,7 +7,7 @@ #define POKEDEX_MAGIC (0xBEEFCAFE) #define ASSERT_POKEDEX(pokedex) do { GF_ASSERT((pokedex)->magic == POKEDEX_MAGIC);} while (0) -void Pokedex_InitDeoxysFormeOrder(Pokedex *pokedex); +void Pokedex_InitDeoxysFormOrder(Pokedex *pokedex); u16 *LoadSpeciesToJohtoDexNoLUT(void); void Pokedex_SetInternationalViewFlag(Pokedex *pokedex); @@ -65,19 +65,19 @@ static inline int CheckDex4Flag(u32 *flags, u8 idx) { return (flags[15] >> (24 + 4 * idx)) & 15; } -static inline void SetDex4Flag(u32 *flags, u8 forme, u8 idx) { +static inline void SetDex4Flag(u32 *flags, u8 form, u8 idx) { flags[15] &= ~(15 << (24 + 4 * idx)); - flags[15] |= (forme << (24 + 4 * idx)); + flags[15] |= (form << (24 + 4 * idx)); } static inline int CheckDex3Flag(const u32 *arr, u32 idx) { return ((*arr) >> (3 * idx)) & 7; } -static inline void SetDex3Flag(u32 *arr, u32 idx, u32 forme) { - GF_ASSERT(forme < 7); +static inline void SetDex3Flag(u32 *arr, u32 idx, u32 form) { + GF_ASSERT(form < 7); *arr &= ~(7 << (3 * idx)); - *arr |= (forme << (3 * idx)); + *arr |= (form << (3 * idx)); } static inline u8 CheckDexGender(const u8 *arr, u16 species) { @@ -103,22 +103,22 @@ static void Pokedex_SetSeenGenderFlag(Pokedex *pokeDex, u8 state, u8 num, u16 fl Pokedex_SetSeenGenderFlagInternal(pokeDex, state, num, flagId); } -static u8 *Pokedex_GetFormeOrderAddr(Pokedex *pokedex, u32 species) { +static u8 *Pokedex_GetFormOrderAddr(Pokedex *pokedex, u32 species) { switch (species) { case SPECIES_SHELLOS: - return &pokedex->shellosFormeOrder; // + 264; + return &pokedex->shellosFormOrder; // + 264; case SPECIES_GASTRODON: - return &pokedex->gastrodonFormeOrder; // + 265; + return &pokedex->gastrodonFormOrder; // + 265; case SPECIES_SHAYMIN: - return &pokedex->shayminFormeOrder; // + 828; + return &pokedex->shayminFormOrder; // + 828; case SPECIES_GIRATINA: - return &pokedex->giratinaFormeOrder; // + 829; + return &pokedex->giratinaFormOrder; // + 829; case SPECIES_BURMY: - return &pokedex->burmyFormeOrder; // + 266; + return &pokedex->burmyFormOrder; // + 266; case SPECIES_WORMADAM: - return &pokedex->wormadamFormeOrder; // + 267; + return &pokedex->wormadamFormOrder; // + 267; case SPECIES_PICHU: - return &pokedex->pichuFormeOrder; // + 830; + return &pokedex->pichuFormOrder; // + 830; default: GF_ASSERT(0); return NULL; @@ -133,7 +133,7 @@ static int Pokedex_CountRegisteredUnownLetters(const Pokedex *pokedex, BOOL caug } else { arr = pokedex->unownSeenOrder; } - for (i = 0; i < UNOWN_FORME_MAX; i++, j++) { + for (i = 0; i < UNOWN_FORM_MAX; i++, j++) { if (arr[i] == 0xFF) { break; } @@ -149,7 +149,7 @@ static BOOL Pokedex_HasAlreadyAddedUnownLetter(const Pokedex *pokedex, u8 letter } else { arr = pokedex->unownSeenOrder; } - for (i = 0; i < UNOWN_FORME_MAX; i++) { + for (i = 0; i < UNOWN_FORM_MAX; i++) { if (arr[i] == letter) { return TRUE; } @@ -167,19 +167,19 @@ static void Pokedex_TryAppendUnownLetter(Pokedex *pokedex, int letter, BOOL caug } if (!Pokedex_HasAlreadyAddedUnownLetter(pokedex, letter, caught)) { idx = Pokedex_CountRegisteredUnownLetters(pokedex, caught); - if (idx < UNOWN_FORME_MAX) { + if (idx < UNOWN_FORM_MAX) { arr[idx] = letter; } } } -static int Pokedex_GetSeenFormeNum_2max(Pokedex *pokedex, u32 species) { +static int Pokedex_GetSeenFormNum_2max(Pokedex *pokedex, u32 species) { u8 *flag_p; GF_ASSERT(species == SPECIES_SHELLOS || species == SPECIES_GASTRODON || species == SPECIES_SHAYMIN || species == SPECIES_GIRATINA); if (!Pokedex_CheckMonSeenFlag(pokedex, species)) { return 0; } - flag_p = Pokedex_GetFormeOrderAddr(pokedex, species); + flag_p = Pokedex_GetFormOrderAddr(pokedex, species); if (CheckDexFlag(flag_p, 1) == CheckDexFlag(flag_p, 2)) { return 1; } else { @@ -187,7 +187,7 @@ static int Pokedex_GetSeenFormeNum_2max(Pokedex *pokedex, u32 species) { } } -static BOOL Pokedex_CheckSeenForme_2max(Pokedex *pokedex, u32 species, u8 forme) { +static BOOL Pokedex_CheckSeenForm_2max(Pokedex *pokedex, u32 species, u8 form) { u8 *flag_p; u32 n; int i; @@ -196,24 +196,24 @@ static BOOL Pokedex_CheckSeenForme_2max(Pokedex *pokedex, u32 species, u8 forme) if (!Pokedex_CheckMonSeenFlag(pokedex, species)) { return FALSE; } - flag_p = Pokedex_GetFormeOrderAddr(pokedex, species); - n = Pokedex_GetSeenFormeNum_2max(pokedex, species); + flag_p = Pokedex_GetFormOrderAddr(pokedex, species); + n = Pokedex_GetSeenFormNum_2max(pokedex, species); for (i = 0; i < n; i++) { flag = CheckDexFlag(flag_p, i + 1); - if (flag == forme) { + if (flag == form) { return TRUE; } } return FALSE; } -static void Pokedex_SetSeenForme_2max(Pokedex *pokedex, u32 species, BOOL state) { +static void Pokedex_SetSeenForm_2max(Pokedex *pokedex, u32 species, BOOL state) { int r4; u8 *r5; GF_ASSERT(species == SPECIES_SHELLOS || species == SPECIES_GASTRODON || species == SPECIES_SHAYMIN || species == SPECIES_GIRATINA); - if (!Pokedex_CheckSeenForme_2max(pokedex, species, state)) { - r5 = Pokedex_GetFormeOrderAddr(pokedex, species); - r4 = Pokedex_GetSeenFormeNum_2max(pokedex, species); + if (!Pokedex_CheckSeenForm_2max(pokedex, species, state)) { + r5 = Pokedex_GetFormOrderAddr(pokedex, species); + r4 = Pokedex_GetSeenFormNum_2max(pokedex, species); if (r4 < 2) { SetDexFlagState(r5, state, r4 + 1); if (r4 == 0) { @@ -223,14 +223,14 @@ static void Pokedex_SetSeenForme_2max(Pokedex *pokedex, u32 species, BOOL state) } } -static int Pokedex_CountSeenFormes_3max(Pokedex *pokedex, u32 species) { +static int Pokedex_CountSeenForms_3max(Pokedex *pokedex, u32 species) { int i; u8 *flag_p; GF_ASSERT(species == SPECIES_BURMY || species == SPECIES_WORMADAM || species == SPECIES_PICHU); if (!Pokedex_CheckMonSeenFlag(pokedex, species)) { return 0; } - flag_p = Pokedex_GetFormeOrderAddr(pokedex, species); + flag_p = Pokedex_GetFormOrderAddr(pokedex, species); for (i = 0; i < 3; i++) { if (CheckDex2Flag(flag_p, i) == 3) { break; @@ -239,7 +239,7 @@ static int Pokedex_CountSeenFormes_3max(Pokedex *pokedex, u32 species) { return i; } -static BOOL Pokedex_CheckSeenForme_3max(Pokedex *pokedex, u32 species, u8 state) { +static BOOL Pokedex_CheckSeenForm_3max(Pokedex *pokedex, u32 species, u8 state) { int i; u32 flag; u8 *flag_p; @@ -247,7 +247,7 @@ static BOOL Pokedex_CheckSeenForme_3max(Pokedex *pokedex, u32 species, u8 state) if (!Pokedex_CheckMonSeenFlag(pokedex, species)) { return FALSE; } - flag_p = Pokedex_GetFormeOrderAddr(pokedex, species); + flag_p = Pokedex_GetFormOrderAddr(pokedex, species); for (i = 0; i < 3; i++) { flag = CheckDex2Flag(flag_p, i); if (flag == state) { @@ -257,82 +257,82 @@ static BOOL Pokedex_CheckSeenForme_3max(Pokedex *pokedex, u32 species, u8 state) return FALSE; } -static void Pokedex_SetSeenForme_3max(Pokedex *pokedex, u32 species, u32 state) { +static void Pokedex_SetSeenForm_3max(Pokedex *pokedex, u32 species, u32 state) { int n; u8 *flag_p; GF_ASSERT(species == SPECIES_BURMY || species == SPECIES_WORMADAM || species == SPECIES_PICHU); - if (!Pokedex_CheckSeenForme_3max(pokedex, species, state)) { - flag_p = Pokedex_GetFormeOrderAddr(pokedex, species); - n = Pokedex_CountSeenFormes_3max(pokedex, species); + if (!Pokedex_CheckSeenForm_3max(pokedex, species, state)) { + flag_p = Pokedex_GetFormOrderAddr(pokedex, species); + n = Pokedex_CountSeenForms_3max(pokedex, species); if (n < 3) { SetDex2FlagState(flag_p, state, n); } } } -static void Pokedex_DeoxysFormeFlagActionInternal(u32 *flags, u8 forme, u8 idx) { - SetDex4Flag(flags, forme, idx); +static void Pokedex_DeoxysFormFlagActionInternal(u32 *flags, u8 form, u8 idx) { + SetDex4Flag(flags, form, idx); } -static void Pokedex_DeoxysFormeFlagAction(Pokedex *pokedex, u8 forme, u8 idx) { +static void Pokedex_DeoxysFormFlagAction(Pokedex *pokedex, u8 form, u8 idx) { GF_ASSERT(idx < 4); - GF_ASSERT(forme <= 15); + GF_ASSERT(form <= 15); if (idx < 2) { - Pokedex_DeoxysFormeFlagActionInternal(pokedex->caughtSpecies, forme, idx); + Pokedex_DeoxysFormFlagActionInternal(pokedex->caughtSpecies, form, idx); } else { - Pokedex_DeoxysFormeFlagActionInternal(pokedex->seenSpecies, forme, idx - 2); + Pokedex_DeoxysFormFlagActionInternal(pokedex->seenSpecies, form, idx - 2); } } -static u32 Pokedex_GetSeenDeoxysFormeByIndex(Pokedex *pokedex, u8 forme) { - if (forme < 2) { - return CheckDex4Flag(pokedex->caughtSpecies, forme); +static u32 Pokedex_GetSeenDeoxysFormByIndex(Pokedex *pokedex, u8 form) { + if (form < 2) { + return CheckDex4Flag(pokedex->caughtSpecies, form); } else { - return CheckDex4Flag(pokedex->seenSpecies, forme - 2); + return CheckDex4Flag(pokedex->seenSpecies, form - 2); } } -static int Pokedex_CountSeenDeoxysFormes(Pokedex *pokedex) { +static int Pokedex_CountSeenDeoxysForms(Pokedex *pokedex) { int i; for (i = 0; i < 4; i++) { - if (Pokedex_GetSeenDeoxysFormeByIndex(pokedex, i) == 15) { + if (Pokedex_GetSeenDeoxysFormByIndex(pokedex, i) == 15) { break; } } return i; } -static BOOL Pokedex_CheckSeenDeoxysForme(Pokedex *pokedex, u32 forme) { +static BOOL Pokedex_CheckSeenDeoxysForm(Pokedex *pokedex, u32 form) { int i; u32 val; for (i = 0; i < 4; i++) { - val = Pokedex_GetSeenDeoxysFormeByIndex(pokedex, i); - if (forme == val) { + val = Pokedex_GetSeenDeoxysFormByIndex(pokedex, i); + if (form == val) { return TRUE; } } return FALSE; } -static void Pokedex_SetSeenDeoxysForme(Pokedex *pokedex, u16 species, Pokemon *mon) { - u8 forme; +static void Pokedex_SetSeenDeoxysForm(Pokedex *pokedex, u16 species, Pokemon *mon) { + u8 form; - forme = GetMonData(mon, MON_DATA_FORME, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); if (species == SPECIES_DEOXYS) { - if (!Pokedex_CheckSeenDeoxysForme(pokedex, forme)) { - Pokedex_DeoxysFormeFlagAction(pokedex, forme, Pokedex_CountSeenDeoxysFormes(pokedex)); + if (!Pokedex_CheckSeenDeoxysForm(pokedex, form)) { + Pokedex_DeoxysFormFlagAction(pokedex, form, Pokedex_CountSeenDeoxysForms(pokedex)); } } } -static void Pokedex_InitDeoxysFormeOrder(Pokedex *pokedex) { +static void Pokedex_InitDeoxysFormOrder(Pokedex *pokedex) { int i; for (i = 0; i < 4; i++) { - Pokedex_DeoxysFormeFlagAction(pokedex, 15, i); + Pokedex_DeoxysFormFlagAction(pokedex, 15, i); } } -static int Pokedex_GetSeenFormeNum_Rotom(const Pokedex *pokedex, u32 species) { +static int Pokedex_GetSeenFormNum_Rotom(const Pokedex *pokedex, u32 species) { int i, n; GF_ASSERT(species == SPECIES_ROTOM); @@ -341,14 +341,14 @@ static int Pokedex_GetSeenFormeNum_Rotom(const Pokedex *pokedex, u32 species) { } n = 0; for (i = 0; i < 6; i++, n++) { - if (CheckDex3Flag(&pokedex->rotomFormeOrder, i) == 7) { + if (CheckDex3Flag(&pokedex->rotomFormOrder, i) == 7) { break; } } return n; } -static BOOL Pokedex_CheckSeenRotomForme(Pokedex *pokedex, u32 species, u8 forme) { +static BOOL Pokedex_CheckSeenRotomForm(Pokedex *pokedex, u32 species, u8 form) { int i, val; u32 n; @@ -356,64 +356,64 @@ static BOOL Pokedex_CheckSeenRotomForme(Pokedex *pokedex, u32 species, u8 forme) if (!Pokedex_CheckMonSeenFlag(pokedex, species)) { return 0; } - n = Pokedex_GetSeenFormeNum_Rotom(pokedex, species); + n = Pokedex_GetSeenFormNum_Rotom(pokedex, species); for (i = 0; i < n; i++) { - val = CheckDex3Flag(&pokedex->rotomFormeOrder, i); - if (val == forme) { + val = CheckDex3Flag(&pokedex->rotomFormOrder, i); + if (val == form) { return TRUE; } } return FALSE; } -static void Pokedex_SetSeenRotomForme(Pokedex *pokedex, u32 species, u32 forme) { +static void Pokedex_SetSeenRotomForm(Pokedex *pokedex, u32 species, u32 form) { int i; GF_ASSERT(species == SPECIES_ROTOM); - if (!Pokedex_CheckSeenRotomForme(pokedex, species, forme)) { - i = Pokedex_GetSeenFormeNum_Rotom(pokedex, species); + if (!Pokedex_CheckSeenRotomForm(pokedex, species, form)) { + i = Pokedex_GetSeenFormNum_Rotom(pokedex, species); if (i < 6) { - SetDex3Flag(&pokedex->rotomFormeOrder, i, forme); + SetDex3Flag(&pokedex->rotomFormOrder, i, form); } } } -static void Pokedex_TryAppendSeenForme(Pokedex *pokedex, u16 species, Pokemon *mon) { - u32 forme; +static void Pokedex_TryAppendSeenForm(Pokedex *pokedex, u16 species, Pokemon *mon) { + u32 form; - forme = GetMonData(mon, MON_DATA_FORME, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); switch (species) { case SPECIES_UNOWN: - Pokedex_TryAppendUnownLetter(pokedex, forme, FALSE); + Pokedex_TryAppendUnownLetter(pokedex, form, FALSE); break; case SPECIES_BURMY: case SPECIES_WORMADAM: - Pokedex_SetSeenForme_3max(pokedex, species, forme); + Pokedex_SetSeenForm_3max(pokedex, species, form); break; case SPECIES_PICHU: - if (forme == 0) { + if (form == 0) { if (GetMonGender(mon) == MON_MALE) { - forme = 0; + form = 0; } else { - forme = 1; + form = 1; } } else { - forme = 2; + form = 2; } - Pokedex_SetSeenForme_3max(pokedex, species, forme); + Pokedex_SetSeenForm_3max(pokedex, species, form); break; case SPECIES_SHELLOS: case SPECIES_GASTRODON: - Pokedex_SetSeenForme_2max(pokedex, species, forme); + Pokedex_SetSeenForm_2max(pokedex, species, form); break; case SPECIES_DEOXYS: - Pokedex_SetSeenDeoxysForme(pokedex, species, mon); + Pokedex_SetSeenDeoxysForm(pokedex, species, mon); break; case SPECIES_SHAYMIN: case SPECIES_GIRATINA: - Pokedex_SetSeenForme_2max(pokedex, species, forme); + Pokedex_SetSeenForm_2max(pokedex, species, form); break; case SPECIES_ROTOM: - Pokedex_SetSeenRotomForme(pokedex, species, forme); + Pokedex_SetSeenRotomForm(pokedex, species, form); break; } } @@ -448,22 +448,22 @@ static int Pokedex_SpeciesGetLastSeenGender_Internal(Pokedex *pokedex, u16 speci return gender1; } -static BOOL Pokedex_GetSeenFormeByIdx_2max(Pokedex *pokedex, u32 species, int idx) { +static BOOL Pokedex_GetSeenFormByIdx_2max(Pokedex *pokedex, u32 species, int idx) { GF_ASSERT(species == SPECIES_SHELLOS || species == SPECIES_GASTRODON || species == SPECIES_SHAYMIN || species == SPECIES_GIRATINA); GF_ASSERT(idx < 2); - return CheckDexFlag(Pokedex_GetFormeOrderAddr(pokedex, species), idx + 1); + return CheckDexFlag(Pokedex_GetFormOrderAddr(pokedex, species), idx + 1); } -static int Pokedex_GetSeenFormeByIdx_Rotom(Pokedex *pokedex, u32 species, int idx) { +static int Pokedex_GetSeenFormByIdx_Rotom(Pokedex *pokedex, u32 species, int idx) { GF_ASSERT(species == SPECIES_ROTOM); GF_ASSERT(idx < 6); - return CheckDex3Flag(&pokedex->rotomFormeOrder, idx); + return CheckDex3Flag(&pokedex->rotomFormOrder, idx); } -static int Pokedex_GetSeenFormeByIdx_3max(Pokedex *pokedex, u32 species, int idx) { +static int Pokedex_GetSeenFormByIdx_3max(Pokedex *pokedex, u32 species, int idx) { GF_ASSERT(species == SPECIES_BURMY || species == SPECIES_WORMADAM || species == SPECIES_PICHU); GF_ASSERT(idx < 3); - return CheckDex2Flag(Pokedex_GetFormeOrderAddr(pokedex, species), idx); + return CheckDex2Flag(Pokedex_GetFormOrderAddr(pokedex, species), idx); } static const u16 sNationalMythicals[] = { @@ -513,15 +513,15 @@ void Save_Pokedex_Init(Pokedex *pokedex) { pokedex->nationalDex = 0; memset(pokedex->unownSeenOrder, 0xFF, 28); memset(pokedex->unownCaughtOrder, 0xFF, 28); - pokedex->shellosFormeOrder = 0xFF; - pokedex->gastrodonFormeOrder = 0xFF; - pokedex->burmyFormeOrder = 0xFF; - pokedex->wormadamFormeOrder = 0xFF; - pokedex->rotomFormeOrder = -1; - pokedex->shayminFormeOrder = 0xFF; - pokedex->giratinaFormeOrder = 0xFF; - pokedex->pichuFormeOrder = 0xFF; - Pokedex_InitDeoxysFormeOrder(pokedex); + pokedex->shellosFormOrder = 0xFF; + pokedex->gastrodonFormOrder = 0xFF; + pokedex->burmyFormOrder = 0xFF; + pokedex->wormadamFormOrder = 0xFF; + pokedex->rotomFormOrder = -1; + pokedex->shayminFormOrder = 0xFF; + pokedex->giratinaFormOrder = 0xFF; + pokedex->pichuFormOrder = 0xFF; + Pokedex_InitDeoxysFormOrder(pokedex); } u16 Pokedex_CountNationalDexOwned(Pokedex *pokedex) { @@ -669,7 +669,7 @@ int Pokedex_SpeciesGetLastSeenGender(Pokedex *pokedex, u16 species, u32 a2) { return -1; } -int Pokedex_GetSeenFormeByIdx_Unown(Pokedex *pokedex, int idx, u32 caught) { +int Pokedex_GetSeenFormByIdx_Unown(Pokedex *pokedex, int idx, u32 caught) { ASSERT_POKEDEX(pokedex); if (Pokedex_CountRegisteredUnownLetters(pokedex, caught) <= idx) { return -1; @@ -681,84 +681,84 @@ int Pokedex_GetSeenFormeByIdx_Unown(Pokedex *pokedex, int idx, u32 caught) { } } -u32 Pokedex_GetSeenFormeNum_Unown(Pokedex *pokedex, BOOL caught) { +u32 Pokedex_GetSeenFormNum_Unown(Pokedex *pokedex, BOOL caught) { ASSERT_POKEDEX(pokedex); return Pokedex_CountRegisteredUnownLetters(pokedex, caught); } -int Pokedex_GetSeenFormeByIdx_Shellos(Pokedex *pokedex, int a1) { +int Pokedex_GetSeenFormByIdx_Shellos(Pokedex *pokedex, int a1) { ASSERT_POKEDEX(pokedex); - if (Pokedex_GetSeenFormeNum_2max(pokedex, SPECIES_SHELLOS) <= a1) { + if (Pokedex_GetSeenFormNum_2max(pokedex, SPECIES_SHELLOS) <= a1) { return -1; } - return Pokedex_GetSeenFormeByIdx_2max(pokedex, SPECIES_SHELLOS, a1); + return Pokedex_GetSeenFormByIdx_2max(pokedex, SPECIES_SHELLOS, a1); } -static u32 Pokedex_GetSeenFormeNum_Shellos(Pokedex *pokedex) { +static u32 Pokedex_GetSeenFormNum_Shellos(Pokedex *pokedex) { ASSERT_POKEDEX(pokedex); - return Pokedex_GetSeenFormeNum_2max(pokedex, SPECIES_SHELLOS); + return Pokedex_GetSeenFormNum_2max(pokedex, SPECIES_SHELLOS); } -static int Pokedex_GetSeenFormeByIdx_Gastrodon(Pokedex *pokedex, int a1) { +static int Pokedex_GetSeenFormByIdx_Gastrodon(Pokedex *pokedex, int a1) { ASSERT_POKEDEX(pokedex); - if (Pokedex_GetSeenFormeNum_2max(pokedex, SPECIES_GASTRODON) <= a1) { + if (Pokedex_GetSeenFormNum_2max(pokedex, SPECIES_GASTRODON) <= a1) { return -1; } - return Pokedex_GetSeenFormeByIdx_2max(pokedex, SPECIES_GASTRODON, a1); + return Pokedex_GetSeenFormByIdx_2max(pokedex, SPECIES_GASTRODON, a1); } -static u32 Pokedex_GetSeenFormeNum_Gastrodon(Pokedex *pokedex) { +static u32 Pokedex_GetSeenFormNum_Gastrodon(Pokedex *pokedex) { ASSERT_POKEDEX(pokedex); - return Pokedex_GetSeenFormeNum_2max(pokedex, SPECIES_GASTRODON); + return Pokedex_GetSeenFormNum_2max(pokedex, SPECIES_GASTRODON); } -static int Pokedex_GetSeenFormeByIdx_Burmy(Pokedex *pokedex, int a1) { +static int Pokedex_GetSeenFormByIdx_Burmy(Pokedex *pokedex, int a1) { ASSERT_POKEDEX(pokedex); - if (Pokedex_CountSeenFormes_3max(pokedex, SPECIES_BURMY) <= a1) { + if (Pokedex_CountSeenForms_3max(pokedex, SPECIES_BURMY) <= a1) { return -1; } - return Pokedex_GetSeenFormeByIdx_3max(pokedex, SPECIES_BURMY, a1); + return Pokedex_GetSeenFormByIdx_3max(pokedex, SPECIES_BURMY, a1); } -static u32 Pokedex_GetSeenFormeNum_Burmy(Pokedex *pokedex) { +static u32 Pokedex_GetSeenFormNum_Burmy(Pokedex *pokedex) { ASSERT_POKEDEX(pokedex); - return Pokedex_CountSeenFormes_3max(pokedex, SPECIES_BURMY); + return Pokedex_CountSeenForms_3max(pokedex, SPECIES_BURMY); } -static int Pokedex_GetSeenFormeByIdx_Wormadam(Pokedex *pokedex, int a1) { +static int Pokedex_GetSeenFormByIdx_Wormadam(Pokedex *pokedex, int a1) { ASSERT_POKEDEX(pokedex); - if (Pokedex_CountSeenFormes_3max(pokedex, SPECIES_WORMADAM) <= a1) { + if (Pokedex_CountSeenForms_3max(pokedex, SPECIES_WORMADAM) <= a1) { return -1; } - return Pokedex_GetSeenFormeByIdx_3max(pokedex, SPECIES_WORMADAM, a1); + return Pokedex_GetSeenFormByIdx_3max(pokedex, SPECIES_WORMADAM, a1); } -static u32 Pokedex_GetSeenFormeNum_Wormadam(Pokedex *pokedex) { +static u32 Pokedex_GetSeenFormNum_Wormadam(Pokedex *pokedex) { ASSERT_POKEDEX(pokedex); - return Pokedex_CountSeenFormes_3max(pokedex, SPECIES_WORMADAM); + return Pokedex_CountSeenForms_3max(pokedex, SPECIES_WORMADAM); } -static int Pokedex_GetSeenFormeByIdx_Pichu(Pokedex *pokedex, int a1) { +static int Pokedex_GetSeenFormByIdx_Pichu(Pokedex *pokedex, int a1) { ASSERT_POKEDEX(pokedex); - if (Pokedex_CountSeenFormes_3max(pokedex, SPECIES_PICHU) <= a1) { + if (Pokedex_CountSeenForms_3max(pokedex, SPECIES_PICHU) <= a1) { return -1; } - return Pokedex_GetSeenFormeByIdx_3max(pokedex, SPECIES_PICHU, a1); + return Pokedex_GetSeenFormByIdx_3max(pokedex, SPECIES_PICHU, a1); } -static u32 Pokedex_GetSeenFormeNum_Pichu(Pokedex *pokedex) { +static u32 Pokedex_GetSeenFormNum_Pichu(Pokedex *pokedex) { ASSERT_POKEDEX(pokedex); - return Pokedex_CountSeenFormes_3max(pokedex, SPECIES_PICHU); + return Pokedex_CountSeenForms_3max(pokedex, SPECIES_PICHU); } -static u32 Pokedex_GetSeenFormeByIdx_Deoxys(Pokedex *pokedex, u32 a1) { +static u32 Pokedex_GetSeenFormByIdx_Deoxys(Pokedex *pokedex, u32 a1) { ASSERT_POKEDEX(pokedex); - return Pokedex_GetSeenDeoxysFormeByIndex(pokedex, a1); + return Pokedex_GetSeenDeoxysFormByIndex(pokedex, a1); } -static u32 Pokedex_GetSeenFormeNum_Deoxys(Pokedex *pokedex) { +static u32 Pokedex_GetSeenFormNum_Deoxys(Pokedex *pokedex) { ASSERT_POKEDEX(pokedex); - return Pokedex_CountSeenDeoxysFormes(pokedex); + return Pokedex_CountSeenDeoxysForms(pokedex); } void Pokedex_SetMonSeenFlag(Pokedex *pokedex, Pokemon *mon) { @@ -784,7 +784,7 @@ void Pokedex_SetMonSeenFlag(Pokedex *pokedex, Pokemon *mon) { Pokedex_SetSeenGenderFlag(pokedex, gender, 1, species); } } - Pokedex_TryAppendSeenForme(pokedex, species, mon); + Pokedex_TryAppendSeenForm(pokedex, species, mon); SetDexFlag((u8 *)pokedex->seenSpecies, species); } } @@ -814,7 +814,7 @@ void Pokedex_SetMonCaughtFlag(Pokedex *pokedex, Pokemon *mon) { Pokedex_SetSeenGenderFlag(pokedex, gender, 1, species); } } - Pokedex_TryAppendSeenForme(pokedex, species, mon); + Pokedex_TryAppendSeenForm(pokedex, species, mon); if (species == SPECIES_UNOWN) { Pokedex_TryAppendUnownLetter(pokedex, GetMonUnownLetter(mon), TRUE); } @@ -876,82 +876,82 @@ Pokedex *Save_Pokedex_Get(SaveData *saveData) { return SaveArray_Get(saveData, SAVE_POKEDEX); } -int Pokedex_GetSeenFormeByIdx(Pokedex *pokedex, int species, int idx) { +int Pokedex_GetSeenFormByIdx(Pokedex *pokedex, int species, int idx) { ASSERT_POKEDEX(pokedex); switch (species) { case SPECIES_UNOWN: - if (idx < Pokedex_GetSeenFormeNum_Unown(pokedex, 0)) { - return Pokedex_GetSeenFormeByIdx_Unown(pokedex, idx, 0); + if (idx < Pokedex_GetSeenFormNum_Unown(pokedex, 0)) { + return Pokedex_GetSeenFormByIdx_Unown(pokedex, idx, 0); } break; case SPECIES_SHELLOS: - if (idx < Pokedex_GetSeenFormeNum_Shellos(pokedex)) { - return Pokedex_GetSeenFormeByIdx_Shellos(pokedex, idx); + if (idx < Pokedex_GetSeenFormNum_Shellos(pokedex)) { + return Pokedex_GetSeenFormByIdx_Shellos(pokedex, idx); } break; case SPECIES_GASTRODON: - if (idx < Pokedex_GetSeenFormeNum_Gastrodon(pokedex)) { - return Pokedex_GetSeenFormeByIdx_Gastrodon(pokedex, idx); + if (idx < Pokedex_GetSeenFormNum_Gastrodon(pokedex)) { + return Pokedex_GetSeenFormByIdx_Gastrodon(pokedex, idx); } break; case SPECIES_BURMY: - if (idx < Pokedex_GetSeenFormeNum_Burmy(pokedex)) { - return Pokedex_GetSeenFormeByIdx_Burmy(pokedex, idx); + if (idx < Pokedex_GetSeenFormNum_Burmy(pokedex)) { + return Pokedex_GetSeenFormByIdx_Burmy(pokedex, idx); } break; case SPECIES_WORMADAM: - if (idx < Pokedex_GetSeenFormeNum_Wormadam(pokedex)) { - return Pokedex_GetSeenFormeByIdx_Wormadam(pokedex, idx); + if (idx < Pokedex_GetSeenFormNum_Wormadam(pokedex)) { + return Pokedex_GetSeenFormByIdx_Wormadam(pokedex, idx); } break; case SPECIES_PICHU: - if (idx < Pokedex_GetSeenFormeNum_Pichu(pokedex)) { - return Pokedex_GetSeenFormeByIdx_Pichu(pokedex, idx); + if (idx < Pokedex_GetSeenFormNum_Pichu(pokedex)) { + return Pokedex_GetSeenFormByIdx_Pichu(pokedex, idx); } break; case SPECIES_DEOXYS: - if (idx < Pokedex_GetSeenFormeNum_Deoxys(pokedex)) { - return Pokedex_GetSeenFormeByIdx_Deoxys(pokedex, idx); + if (idx < Pokedex_GetSeenFormNum_Deoxys(pokedex)) { + return Pokedex_GetSeenFormByIdx_Deoxys(pokedex, idx); } break; case SPECIES_SHAYMIN: case SPECIES_GIRATINA: - if (idx < Pokedex_GetSeenFormeNum_2max(pokedex, species)) { - return Pokedex_GetSeenFormeByIdx_2max(pokedex, species, idx); + if (idx < Pokedex_GetSeenFormNum_2max(pokedex, species)) { + return Pokedex_GetSeenFormByIdx_2max(pokedex, species, idx); } break; case SPECIES_ROTOM: - if (idx < Pokedex_GetSeenFormeNum_Rotom(pokedex, SPECIES_ROTOM)) { - return Pokedex_GetSeenFormeByIdx_Rotom(pokedex, SPECIES_ROTOM, idx); + if (idx < Pokedex_GetSeenFormNum_Rotom(pokedex, SPECIES_ROTOM)) { + return Pokedex_GetSeenFormByIdx_Rotom(pokedex, SPECIES_ROTOM, idx); } break; } return 0; } -int Pokedex_GetSeenFormeNum(Pokedex *pokedex, int species) { +int Pokedex_GetSeenFormNum(Pokedex *pokedex, int species) { ASSERT_POKEDEX(pokedex); switch (species) { case SPECIES_UNOWN: - return Pokedex_GetSeenFormeNum_Unown(pokedex, 0); + return Pokedex_GetSeenFormNum_Unown(pokedex, 0); case SPECIES_SHELLOS: - return Pokedex_GetSeenFormeNum_Shellos(pokedex); + return Pokedex_GetSeenFormNum_Shellos(pokedex); case SPECIES_GASTRODON: - return Pokedex_GetSeenFormeNum_Gastrodon(pokedex); + return Pokedex_GetSeenFormNum_Gastrodon(pokedex); case SPECIES_BURMY: - return Pokedex_GetSeenFormeNum_Burmy(pokedex); + return Pokedex_GetSeenFormNum_Burmy(pokedex); case SPECIES_WORMADAM: - return Pokedex_GetSeenFormeNum_Wormadam(pokedex); + return Pokedex_GetSeenFormNum_Wormadam(pokedex); case SPECIES_PICHU: - return Pokedex_GetSeenFormeNum_Pichu(pokedex); + return Pokedex_GetSeenFormNum_Pichu(pokedex); case SPECIES_DEOXYS: - return Pokedex_GetSeenFormeNum_Deoxys(pokedex); + return Pokedex_GetSeenFormNum_Deoxys(pokedex); case SPECIES_SHAYMIN: - return Pokedex_GetSeenFormeNum_2max(pokedex, SPECIES_SHAYMIN); + return Pokedex_GetSeenFormNum_2max(pokedex, SPECIES_SHAYMIN); case SPECIES_GIRATINA: - return Pokedex_GetSeenFormeNum_2max(pokedex, SPECIES_GIRATINA); + return Pokedex_GetSeenFormNum_2max(pokedex, SPECIES_GIRATINA); case SPECIES_ROTOM: - return Pokedex_GetSeenFormeNum_Rotom(pokedex, SPECIES_ROTOM); + return Pokedex_GetSeenFormNum_Rotom(pokedex, SPECIES_ROTOM); } return 1; } diff --git a/src/pokemon.c b/src/pokemon.c index 3e979a5f49..847eb8f9a8 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -25,7 +25,7 @@ void MonEncryptSegment(void *data, u32 size, u32 key); void MonDecryptSegment(void *data, u32 size, u32 key); u32 CalcMonChecksum(void *data, u32 size); void InitBoxMonMoveset(BoxPokemon *boxMon); -void LoadMonBaseStats_HandleAlternateForme(int species, int forme, BASE_STATS *dest); +void LoadMonBaseStats_HandleAlternateForm(int species, int form, BASE_STATS *dest); u16 ModifyStatByNature(u8 nature, u16 stat, u8 statID); static u32 GetMonDataInternal(Pokemon *mon, int attr, void * dest); static u32 GetBoxMonDataInternal(BoxPokemon *boxMon, int attr, void * dest); @@ -35,16 +35,16 @@ static void AddMonDataInternal(Pokemon *mon, int attr, int value); static void AddBoxMonDataInternal(BoxPokemon *boxMon, int attr, int value); PokemonDataBlock *GetSubstruct(BoxPokemon *boxMon, u32 pid, u8 which_struct); void LoadMonPersonal(int species, BASE_STATS *dest); -int ResolveMonForme(int species, int forme); +int ResolveMonForm(int species, int form); u8 GetGenderBySpeciesAndPersonality_PreloadedPersonal(const BASE_STATS *personal, u16 species, u32 pid); u32 MaskOfFlagNo(int flagno); void GetBoxmonSpriteCharAndPlttNarcIds(struct SomeDrawPokemonStruct *a0, BoxPokemon *boxMon, u8 whichFacing, BOOL a3); -void DP_GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct *a0, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 forme, u32 pid); -void GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct *a0, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 forme, u32 pid); -u8 sub_02070438(u16 species, u8 forme); +void DP_GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct *a0, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 pid); +void GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct *a0, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 pid); +u8 sub_02070438(u16 species, u8 form); u8 sub_02070854(BoxPokemon *boxMon, u8 whichFacing, BOOL a2); -u8 sub_02070A64(u16 species, u8 gender, u8 whichFacing, u8 forme, u32 pid); -u8 sub_020708D8(u16 species, u8 gender, u8 whichFacing, u8 forme, u32 pid); +u8 sub_02070A64(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid); +u8 sub_020708D8(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid); void sub_02070D3C(s32 trainer_class, s32 a1, s32 a2, struct UnkStruct_02070D3C *a3); int TrainerClassToBackpicID(int trainer_class, int a1); void LoadMonEvolutionTable(u16 species, struct Evolution *evoTable); @@ -324,7 +324,7 @@ void CalcMonStats(Pokemon *mon) { int speedEv; int spatkEv; int spdefEv; - int forme; + int form; int hp; int species; int newMaxHp; @@ -350,11 +350,11 @@ void CalcMonStats(Pokemon *mon) { spatkEv = (int)GetMonData(mon, MON_DATA_SPATK_EV, NULL); spdefIv = (int)GetMonData(mon, MON_DATA_SPDEF_IV, NULL); spdefEv = (int)GetMonData(mon, MON_DATA_SPDEF_EV, NULL); - forme = (int)GetMonData(mon, MON_DATA_FORME, NULL); + form = (int)GetMonData(mon, MON_DATA_FORM, NULL); species = (int)GetMonData(mon, MON_DATA_SPECIES, NULL); baseStats = (BASE_STATS *)AllocFromHeap(HEAP_ID_0, sizeof(BASE_STATS)); - LoadMonBaseStats_HandleAlternateForme(species, forme, baseStats); + LoadMonBaseStats_HandleAlternateForm(species, form, baseStats); if (species == SPECIES_SHEDINJA) { newMaxHp = 1; @@ -720,7 +720,7 @@ static u32 GetBoxMonDataInternal(BoxPokemon *boxMon, int attr, void * dest) { blockB->gender = (u8)ret; boxMon->checksum = CHECKSUM(boxMon); break; - case MON_DATA_FORME: + case MON_DATA_FORM: ret = blockB->alternateForm; break; case MON_DATA_RESERVED_113: @@ -866,7 +866,7 @@ static u32 GetBoxMonDataInternal(BoxPokemon *boxMon, int attr, void * dest) { if (blockA->species == SPECIES_ARCEUS && blockA->ability == ABILITY_MULTITYPE) { ret = (u32)GetArceusTypeByHeldItemEffect((u16) GetItemAttr(blockA->heldItem, ITEMATTR_HOLD_EFFECT, HEAP_ID_0)); } else { - ret = (u32)GetMonBaseStat_HandleAlternateForme(blockA->species, blockB->alternateForm, (enum BaseStat)(attr - MON_DATA_TYPE_1 + BASE_TYPE1)); + ret = (u32)GetMonBaseStat_HandleAlternateForm(blockA->species, blockB->alternateForm, (enum BaseStat)(attr - MON_DATA_TYPE_1 + BASE_TYPE1)); } break; case MON_DATA_SPECIES_NAME: @@ -1189,7 +1189,7 @@ static void SetBoxMonDataInternal(BoxPokemon *boxMon, int attr, const void * val case MON_DATA_GENDER: blockB->gender = GetGenderBySpeciesAndPersonality(blockA->species, boxMon->pid); break; - case MON_DATA_FORME: + case MON_DATA_FORM: blockB->alternateForm = VALUE(u8); break; case MON_DATA_RESERVED_113: @@ -1636,7 +1636,7 @@ static void AddBoxMonDataInternal(BoxPokemon *boxMon, int attr, int value) { case MON_DATA_HOENN_WORLD_RIBBON: case MON_DATA_FATEFUL_ENCOUNTER: case MON_DATA_GENDER: - case MON_DATA_FORME: + case MON_DATA_FORM: case MON_DATA_RESERVED_113: case MON_DATA_RESERVED_114: case MON_DATA_NICKNAME: @@ -1716,9 +1716,9 @@ static void AddBoxMonDataInternal(BoxPokemon *boxMon, int attr, int value) { } } -BASE_STATS *AllocAndLoadMonPersonal_HandleAlternateForme(int species, int forme, HeapID heap_id) { +BASE_STATS *AllocAndLoadMonPersonal_HandleAlternateForm(int species, int form, HeapID heap_id) { BASE_STATS *ret = AllocFromHeap(heap_id, sizeof(BASE_STATS)); - LoadMonBaseStats_HandleAlternateForme(species, forme, ret); + LoadMonBaseStats_HandleAlternateForm(species, form, ret); return ret; } @@ -1840,9 +1840,9 @@ void FreeMonPersonal(BASE_STATS * personal) { FreeToHeap(personal); } -int GetMonBaseStat_HandleAlternateForme(int species, int forme, BaseStat attr) { +int GetMonBaseStat_HandleAlternateForm(int species, int form, BaseStat attr) { int ret; - BASE_STATS * personal = AllocAndLoadMonPersonal(ResolveMonForme(species, forme), HEAP_ID_0); + BASE_STATS * personal = AllocAndLoadMonPersonal(ResolveMonForm(species, form), HEAP_ID_0); ret = GetPersonalAttr(personal, attr); FreeMonPersonal(personal); return ret; @@ -1856,8 +1856,8 @@ int GetMonBaseStat(int species, BaseStat attr) { return ret; } -int GetMonBaseStatEx_HandleAlternateForme(NARC *narc, int species, int forme, BaseStat attr) { - int resolved = ResolveMonForme(species, forme); +int GetMonBaseStatEx_HandleAlternateForm(NARC *narc, int species, int form, BaseStat attr) { + int resolved = ResolveMonForm(species, form); int ret; BASE_STATS *buf = AllocFromHeap(HEAP_ID_0, sizeof(BASE_STATS)); NARC_ReadWholeMember(narc, resolved, buf); @@ -2161,79 +2161,79 @@ void GetBoxmonSpriteCharAndPlttNarcIds(struct SomeDrawPokemonStruct *spC, BoxPok u8 gender = GetBoxMonGender(boxMon); u8 shiny = BoxMonIsShiny(boxMon); u32 pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); - u8 forme; + u8 form; if (species == SPECIES_EGG) { if (GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL) == SPECIES_MANAPHY) { - forme = EGG_MANAPHY; + form = EGG_MANAPHY; } else { - forme = EGG_STANDARD; + form = EGG_STANDARD; } } else { - forme = GetBoxMonData(boxMon, MON_DATA_FORME, NULL); + form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); } if (sp14 == TRUE) { - DP_GetMonSpriteCharAndPlttNarcIdsEx(spC, species, gender, whichFacing, shiny, forme, pid); + DP_GetMonSpriteCharAndPlttNarcIdsEx(spC, species, gender, whichFacing, shiny, form, pid); } else { - GetMonSpriteCharAndPlttNarcIdsEx(spC, species, gender, whichFacing, shiny, forme, pid); + GetMonSpriteCharAndPlttNarcIdsEx(spC, species, gender, whichFacing, shiny, form, pid); } ReleaseBoxMonLock(boxMon, decry); } -void GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct * spC, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 forme, u32 personality) { +void GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct * spC, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality) { spC->unk6 = 0; spC->unk8 = 0; spC->unkC = 0; - forme = sub_02070438(species, forme); + form = sub_02070438(species, form); switch (species) { case SPECIES_BURMY: spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x48 + forme * 2); - spC->palDataID = (u16)(shiny + 0xAA + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x48 + form * 2); + spC->palDataID = (u16)(shiny + 0xAA + form * 2); break; case SPECIES_WORMADAM: spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x4E + forme * 2); - spC->palDataID = (u16)(shiny + 0xB0 + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x4E + form * 2); + spC->palDataID = (u16)(shiny + 0xB0 + form * 2); break; case SPECIES_SHELLOS: spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing + 0x54 + forme); - spC->palDataID = (u16)(shiny + 0xB6 + forme * 2); + spC->charDataID = (u16)(whichFacing + 0x54 + form); + spC->palDataID = (u16)(shiny + 0xB6 + form * 2); break; case SPECIES_GASTRODON: spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing + 0x58 + forme); - spC->palDataID = (u16)(shiny + 0xBA + forme * 2); + spC->charDataID = (u16)(whichFacing + 0x58 + form); + spC->palDataID = (u16)(shiny + 0xBA + form * 2); break; case SPECIES_CHERRIM: spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing + 0x5C + forme); - spC->palDataID = (u16)(shiny * 2 + 0xBE + forme); + spC->charDataID = (u16)(whichFacing + 0x5C + form); + spC->palDataID = (u16)(shiny * 2 + 0xBE + form); break; case SPECIES_ARCEUS: spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x60 + forme * 2); - spC->palDataID = (u16)(shiny + 0xC2 + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x60 + form * 2); + spC->palDataID = (u16)(shiny + 0xC2 + form * 2); break; case SPECIES_CASTFORM: spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing * 2 + 0x40 + forme); - spC->palDataID = (u16)(shiny * 4 + 0xA2 + forme); + spC->charDataID = (u16)(whichFacing * 2 + 0x40 + form); + spC->palDataID = (u16)(shiny * 4 + 0xA2 + form); break; case SPECIES_DEOXYS: spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + form * 2); spC->palDataID = (u16)(shiny + 0x9E); break; case SPECIES_UNOWN: spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x8 + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x8 + form * 2); spC->palDataID = (u16)(shiny + 0xA0); break; case SPECIES_EGG: // egg, manaphy egg spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(0x84 + forme); - spC->palDataID = (u16)(0xE6 + forme); + spC->charDataID = (u16)(0x84 + form); + spC->palDataID = (u16)(0xE6 + form); break; case SPECIES_MANAPHY_EGG: // bad egg spC->narcID = NARC_poketool_pokegra_otherpoke; @@ -2242,23 +2242,23 @@ void GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct * spC, u16 sp break; case SPECIES_SHAYMIN: // land, sky spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x86 + forme * 2); - spC->palDataID = (u16)(shiny + 0xE8 + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x86 + form * 2); + spC->palDataID = (u16)(shiny + 0xE8 + form * 2); break; case SPECIES_ROTOM: // normal, fan, mow, wash, heat, frost spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x8A + forme * 2); - spC->palDataID = (u16)(shiny + 0xEC + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x8A + form * 2); + spC->palDataID = (u16)(shiny + 0xEC + form * 2); break; case SPECIES_GIRATINA: // altered, origin spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x96 + forme * 2); - spC->palDataID = (u16)(shiny + 0xF8 + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x96 + form * 2); + spC->palDataID = (u16)(shiny + 0xF8 + form * 2); break; case SPECIES_PICHU: // spiky-ear spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x9A + forme * 2); - spC->palDataID = (u16)(shiny + 0xFC + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x9A + form * 2); + spC->palDataID = (u16)(shiny + 0xFC + form * 2); break; default: spC->narcID = NARC_poketool_pokegra_pokegra; @@ -2274,80 +2274,80 @@ void GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct * spC, u16 sp } } -u8 sub_02070438(u16 species, u8 forme) { +u8 sub_02070438(u16 species, u8 form) { switch (species) { case SPECIES_BURMY: - if (forme > BURMY_FORME_MAX - 1) { - forme = 0; + if (form > BURMY_FORM_MAX - 1) { + form = 0; } break; case SPECIES_WORMADAM: - if (forme > WORMADAM_FORME_MAX - 1) { - forme = 0; + if (form > WORMADAM_FORM_MAX - 1) { + form = 0; } break; case SPECIES_SHELLOS: - if (forme > SHELLOS_FORME_MAX - 1) { - forme = 0; + if (form > SHELLOS_FORM_MAX - 1) { + form = 0; } break; case SPECIES_GASTRODON: - if (forme > GASTRODON_FORME_MAX - 1) { - forme = 0; + if (form > GASTRODON_FORM_MAX - 1) { + form = 0; } break; case SPECIES_CHERRIM: - if (forme > CHERRIM_FORME_MAX - 1) { - forme = 0; + if (form > CHERRIM_FORM_MAX - 1) { + form = 0; } break; case SPECIES_ARCEUS: - if (forme > ARCEUS_FORME_MAX - 1) { - forme = 0; + if (form > ARCEUS_FORM_MAX - 1) { + form = 0; } break; case SPECIES_CASTFORM: - if (forme > CASTFORM_FORME_MAX - 1) { - forme = 0; + if (form > CASTFORM_FORM_MAX - 1) { + form = 0; } break; case SPECIES_DEOXYS: - if (forme > DEOXYS_FORME_MAX - 1) { - forme = 0; + if (form > DEOXYS_FORM_MAX - 1) { + form = 0; } break; case SPECIES_UNOWN: - if (forme >= UNOWN_FORME_MAX) { - forme = 0; + if (form >= UNOWN_FORM_MAX) { + form = 0; } break; case SPECIES_EGG: - if (forme > EGG_FORME_MAX - 1) { - forme = 0; + if (form > EGG_FORM_MAX - 1) { + form = 0; } break; case SPECIES_SHAYMIN: - if (forme > SHAYMIN_FORME_MAX - 1) { - forme = 0; + if (form > SHAYMIN_FORM_MAX - 1) { + form = 0; } break; case SPECIES_ROTOM: - if (forme > ROTOM_FORME_MAX - 1) { - forme = 0; + if (form > ROTOM_FORM_MAX - 1) { + form = 0; } break; case SPECIES_GIRATINA: - if (forme > GIRATINA_FORME_MAX - 1) { - forme = 0; + if (form > GIRATINA_FORM_MAX - 1) { + form = 0; } break; case SPECIES_PICHU: - if (forme > PICHU_FORME_MAX - 1) { - forme = 0; + if (form > PICHU_FORM_MAX - 1) { + form = 0; } break; } - return forme; + return form; } void sub_02070560(struct SomeDrawPokemonStruct * spC, u16 species, u8 whichFacing, u8 gender, u32 shiny) { @@ -2356,61 +2356,61 @@ void sub_02070560(struct SomeDrawPokemonStruct * spC, u16 species, u8 whichFacin spC->palDataID = (u16)(shiny + (species * 6 + 4)); } -void DP_GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct * spC, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 forme, u32 personality) { +void DP_GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct * spC, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality) { spC->unk6 = 0; spC->unk8 = 0; spC->unkC = 0; - forme = sub_02070438(species, forme); + form = sub_02070438(species, form); switch (species) { case SPECIES_BURMY: spC->narcID = NARC_pbr_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x48 + forme * 2); - spC->palDataID = (u16)(shiny + 0x92 + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x48 + form * 2); + spC->palDataID = (u16)(shiny + 0x92 + form * 2); break; case SPECIES_WORMADAM: spC->narcID = NARC_pbr_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x4E + forme * 2); - spC->palDataID = (u16)(shiny + 0x98 + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x4E + form * 2); + spC->palDataID = (u16)(shiny + 0x98 + form * 2); break; case SPECIES_SHELLOS: spC->narcID = NARC_pbr_otherpoke; - spC->charDataID = (u16)(whichFacing + 0x54 + forme); - spC->palDataID = (u16)(shiny + 0x9E + forme * 2); + spC->charDataID = (u16)(whichFacing + 0x54 + form); + spC->palDataID = (u16)(shiny + 0x9E + form * 2); break; case SPECIES_GASTRODON: spC->narcID = NARC_pbr_otherpoke; - spC->charDataID = (u16)(whichFacing + 0x58 + forme); - spC->palDataID = (u16)(shiny + 0xA2 + forme * 2); + spC->charDataID = (u16)(whichFacing + 0x58 + form); + spC->palDataID = (u16)(shiny + 0xA2 + form * 2); break; case SPECIES_CHERRIM: spC->narcID = NARC_pbr_otherpoke; - spC->charDataID = (u16)(whichFacing + 0x5C + forme); - spC->palDataID = (u16)(shiny * 2 + 0xA6 + forme); + spC->charDataID = (u16)(whichFacing + 0x5C + form); + spC->palDataID = (u16)(shiny * 2 + 0xA6 + form); break; case SPECIES_ARCEUS: spC->narcID = NARC_pbr_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x60 + forme * 2); - spC->palDataID = (u16)(shiny + 0xAA + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x60 + form * 2); + spC->palDataID = (u16)(shiny + 0xAA + form * 2); break; case SPECIES_CASTFORM: spC->narcID = NARC_pbr_otherpoke; - spC->charDataID = (u16)(whichFacing * 2 + 0x40 + forme); - spC->palDataID = (u16)(shiny * 4 + 0x8A + forme); + spC->charDataID = (u16)(whichFacing * 2 + 0x40 + form); + spC->palDataID = (u16)(shiny * 4 + 0x8A + form); break; case SPECIES_DEOXYS: spC->narcID = NARC_pbr_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + form * 2); spC->palDataID = (u16)(shiny + 0x86); break; case SPECIES_UNOWN: spC->narcID = NARC_pbr_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x8 + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x8 + form * 2); spC->palDataID = (u16)(shiny + 0x88); break; case SPECIES_EGG: // egg, manaphy egg spC->narcID = NARC_pbr_otherpoke; - spC->charDataID = (u16)(0x84 + forme); - spC->palDataID = (u16)(0xCE + forme); + spC->charDataID = (u16)(0x84 + form); + spC->palDataID = (u16)(0xCE + form); break; case SPECIES_MANAPHY_EGG: // bad egg spC->narcID = NARC_pbr_otherpoke; @@ -2418,34 +2418,34 @@ void DP_GetMonSpriteCharAndPlttNarcIdsEx(struct SomeDrawPokemonStruct * spC, u16 spC->palDataID = 0xCE; break; case SPECIES_SHAYMIN: // land, sky - if (forme != 0) { + if (form != 0) { spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x86 + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x86 + form * 2); spC->palDataID = (u16)(shiny + 0xEA); } else { sub_02070560(spC, species, whichFacing, gender, shiny); } break; case SPECIES_ROTOM: // normal, fan, mow, wash, heat, frost - if (forme != 0) { + if (form != 0) { spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x8A + forme * 2); - spC->palDataID = (u16)(shiny + 0xEC + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x8A + form * 2); + spC->palDataID = (u16)(shiny + 0xEC + form * 2); } else { sub_02070560(spC, species, whichFacing, gender, shiny); } break; case SPECIES_GIRATINA: // altered, origin - if (forme != 0) { + if (form != 0) { spC->narcID = NARC_poketool_pokegra_otherpoke; - spC->charDataID = (u16)(whichFacing / 2 + 0x96 + forme * 2); - spC->palDataID = (u16)(shiny + 0xF8 + forme * 2); + spC->charDataID = (u16)(whichFacing / 2 + 0x96 + form * 2); + spC->palDataID = (u16)(shiny + 0xF8 + form * 2); } else { sub_02070560(spC, species, whichFacing, gender, shiny); } break; case SPECIES_PICHU: // spiky-ear - if (forme != 0) { + if (form != 0) { spC->narcID = NARC_poketool_pokegra_otherpoke; spC->charDataID = (u16)(whichFacing / 2 + 0x9C); spC->palDataID = (u16)(shiny + 0xFE); @@ -2477,75 +2477,75 @@ u8 sub_02070854(BoxPokemon *boxMon, u8 whichFacing, BOOL a2) { u16 species = GetBoxMonData(boxMon, MON_DATA_SPECIES2, NULL); u8 gender = GetBoxMonGender(boxMon); u32 pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); - u8 forme; + u8 form; if (species == SPECIES_EGG) { if (GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL) == SPECIES_MANAPHY) { - forme = EGG_MANAPHY; + form = EGG_MANAPHY; } else { - forme = EGG_STANDARD; + form = EGG_STANDARD; } } else { - forme = GetBoxMonData(boxMon, MON_DATA_FORME, NULL); + form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); } if (a2 == TRUE) { - return sub_02070A64(species, gender, whichFacing, forme, pid); + return sub_02070A64(species, gender, whichFacing, form, pid); } else { - return sub_020708D8(species, gender, whichFacing, forme, pid); + return sub_020708D8(species, gender, whichFacing, form, pid); } } -u8 sub_020708D8(u16 species, u8 gender, u8 whichFacing, u8 forme, u32 pid) { +u8 sub_020708D8(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid) { // species -> r5 // gender -> r6 // whichFacing -> r4 - // forme -> + // form -> // pid -> sp18 #pragma unused(pid) NarcId narcId; s32 fileId; u8 ret; - forme = sub_02070438(species, forme); + form = sub_02070438(species, form); switch (species) { case SPECIES_BURMY: narcId = NARC_poketool_pokegra_height_o; - fileId = 0x48 + whichFacing / 2 + forme * 2; + fileId = 0x48 + whichFacing / 2 + form * 2; break; case SPECIES_WORMADAM: narcId = NARC_poketool_pokegra_height_o; - fileId = 0x4E + whichFacing / 2 + forme * 2; + fileId = 0x4E + whichFacing / 2 + form * 2; break; case SPECIES_SHELLOS: narcId = NARC_poketool_pokegra_height_o; - fileId = 0x54 + whichFacing + forme; + fileId = 0x54 + whichFacing + form; break; case SPECIES_GASTRODON: narcId = NARC_poketool_pokegra_height_o; - fileId = 0x58 + whichFacing + forme; + fileId = 0x58 + whichFacing + form; break; case SPECIES_CHERRIM: narcId = NARC_poketool_pokegra_height_o; - fileId = 0x5C + whichFacing + forme; + fileId = 0x5C + whichFacing + form; break; case SPECIES_ARCEUS: narcId = NARC_poketool_pokegra_height_o; - fileId = 0x60 + whichFacing / 2 + forme * 2; + fileId = 0x60 + whichFacing / 2 + form * 2; break; case SPECIES_CASTFORM: narcId = NARC_poketool_pokegra_height_o; - fileId = 0x40 + 2 * whichFacing + forme; + fileId = 0x40 + 2 * whichFacing + form; break; case SPECIES_DEOXYS: narcId = NARC_poketool_pokegra_height_o; - fileId = 0x00 + whichFacing / 2 + forme * 2; + fileId = 0x00 + whichFacing / 2 + form * 2; break; case SPECIES_UNOWN: narcId = NARC_poketool_pokegra_height_o; - fileId = 0x08 + whichFacing / 2 + forme * 2; + fileId = 0x08 + whichFacing / 2 + form * 2; break; case SPECIES_EGG: // egg, manaphy egg narcId = NARC_poketool_pokegra_height_o; - fileId = 0x84 + forme; + fileId = 0x84 + form; break; case SPECIES_MANAPHY_EGG: // bad egg narcId = NARC_poketool_pokegra_height_o; @@ -2553,19 +2553,19 @@ u8 sub_020708D8(u16 species, u8 gender, u8 whichFacing, u8 forme, u32 pid) { break; case SPECIES_SHAYMIN: // land, sky narcId = NARC_poketool_pokegra_height_o; - fileId = 0x88 + whichFacing / 2 + forme * 2; + fileId = 0x88 + whichFacing / 2 + form * 2; break; case SPECIES_ROTOM: // normal, fan, mow, wash, heat, frost narcId = NARC_poketool_pokegra_height_o; - fileId = 0x8C + whichFacing / 2 + forme * 2; + fileId = 0x8C + whichFacing / 2 + form * 2; break; case SPECIES_GIRATINA: // altered, origin narcId = NARC_poketool_pokegra_height_o; - fileId = 0x98 + whichFacing / 2 + forme * 2; + fileId = 0x98 + whichFacing / 2 + form * 2; break; case SPECIES_PICHU: // spiky-ear narcId = NARC_poketool_pokegra_height_o; - fileId = 0x9C + whichFacing / 2 + forme * 2; + fileId = 0x9C + whichFacing / 2 + form * 2; break; default: narcId = NARC_poketool_pokegra_height; @@ -2576,94 +2576,94 @@ u8 sub_020708D8(u16 species, u8 gender, u8 whichFacing, u8 forme, u32 pid) { return ret; } -u8 sub_02070A64(u16 species, u8 gender, u8 whichFacing, u8 forme, u32 pid) { +u8 sub_02070A64(u16 species, u8 gender, u8 whichFacing, u8 form, u32 pid) { // species -> r5 // gender -> r6 // whichFacing -> r4 - // forme -> + // form -> // pid -> sp18 #pragma unused(pid) NarcId narcId; s32 fileId; u8 ret; - forme = sub_02070438(species, forme); + form = sub_02070438(species, form); switch (species) { case SPECIES_BURMY: narcId = NARC_pbr_dp_height_o; - fileId = 0x48 + whichFacing / 2 + forme * 2; + fileId = 0x48 + whichFacing / 2 + form * 2; break; case SPECIES_WORMADAM: narcId = NARC_pbr_dp_height_o; - fileId = 0x4E + whichFacing / 2 + forme * 2; + fileId = 0x4E + whichFacing / 2 + form * 2; break; case SPECIES_SHELLOS: narcId = NARC_pbr_dp_height_o; - fileId = 0x54 + whichFacing + forme; + fileId = 0x54 + whichFacing + form; break; case SPECIES_GASTRODON: narcId = NARC_pbr_dp_height_o; - fileId = 0x58 + whichFacing + forme; + fileId = 0x58 + whichFacing + form; break; case SPECIES_CHERRIM: narcId = NARC_pbr_dp_height_o; - fileId = 0x5C + whichFacing + forme; + fileId = 0x5C + whichFacing + form; break; case SPECIES_ARCEUS: narcId = NARC_pbr_dp_height_o; - fileId = 0x60 + whichFacing / 2 + forme * 2; + fileId = 0x60 + whichFacing / 2 + form * 2; break; case SPECIES_CASTFORM: narcId = NARC_pbr_dp_height_o; - fileId = 0x40 + 2 * whichFacing + forme; + fileId = 0x40 + 2 * whichFacing + form; break; case SPECIES_DEOXYS: narcId = NARC_pbr_dp_height_o; - fileId = 0x00 + whichFacing / 2 + forme * 2; + fileId = 0x00 + whichFacing / 2 + form * 2; break; case SPECIES_UNOWN: narcId = NARC_pbr_dp_height_o; - fileId = 0x08 + whichFacing / 2 + forme * 2; + fileId = 0x08 + whichFacing / 2 + form * 2; break; case SPECIES_EGG: // egg, manaphy egg narcId = NARC_pbr_dp_height_o; - fileId = 0x84 + forme; + fileId = 0x84 + form; break; case SPECIES_MANAPHY_EGG: // bad egg narcId = NARC_pbr_dp_height_o; fileId = 0x84; break; case SPECIES_SHAYMIN: // land, sky - if (forme != 0) { + if (form != 0) { narcId = NARC_poketool_pokegra_height_o; - fileId = 0x88 + whichFacing / 2 + forme * 2; + fileId = 0x88 + whichFacing / 2 + form * 2; } else { narcId = NARC_pbr_dp_height; fileId = species * 4 + whichFacing + (gender != MON_FEMALE ? 1 : 0); } break; case SPECIES_ROTOM: // normal, fan, mow, wash, heat, frost - if (forme != 0) { + if (form != 0) { narcId = NARC_poketool_pokegra_height_o; - fileId = 0x8C + whichFacing / 2 + forme * 2; + fileId = 0x8C + whichFacing / 2 + form * 2; } else { narcId = NARC_pbr_dp_height; fileId = species * 4 + whichFacing + (gender != MON_FEMALE ? 1 : 0); } break; case SPECIES_GIRATINA: // altered, origin - if (forme != 0) { + if (form != 0) { narcId = NARC_poketool_pokegra_height_o; - fileId = 0x98 + whichFacing / 2 + forme * 2; + fileId = 0x98 + whichFacing / 2 + form * 2; } else { narcId = NARC_pbr_dp_height; fileId = species * 4 + whichFacing + (gender != MON_FEMALE ? 1 : 0); } break; // case SPECIES_PICHU: // spiky-ear -// if (forme != 0) { +// if (form != 0) { // narcId = NARC_pbr_dp_height_o; -// fileId = 0x9C + whichFacing / 2 + forme * 2; +// fileId = 0x9C + whichFacing / 2 + form * 2; // } else { // narcId = NARC_pbr_dp_height; // fileId = species * 4 + whichFacing + (gender != MON_FEMALE ? 1 : 0); @@ -2757,7 +2757,7 @@ u8 GetMonUnownLetter(Pokemon *mon) { } u8 GetBoxMonUnownLetter(BoxPokemon *boxMon) { - return (u8)GetBoxMonData(boxMon, MON_DATA_FORME, NULL); + return (u8)GetBoxMonData(boxMon, MON_DATA_FORM, NULL); } BoxPokemon *Mon_GetBoxMon(Pokemon *mon) { @@ -2808,7 +2808,7 @@ u16 GetMonEvolution(PARTY *party, Pokemon *mon, u8 context, u16 usedItem, int *m return SPECIES_NONE; } // Spiky-ear Pichu cannot evolve - if (species == SPECIES_PICHU && GetMonData(mon, MON_DATA_FORME, 0) == 1) { + if (species == SPECIES_PICHU && GetMonData(mon, MON_DATA_FORM, 0) == 1) { return SPECIES_NONE; } if (method_ret == NULL) { @@ -3041,15 +3041,15 @@ void InitBoxMonMoveset(BoxPokemon *boxMon) { u16 * wotbl; int i; u16 species; - u32 forme; + u32 form; u8 level; u16 move; wotbl = AllocFromHeap(HEAP_ID_0, 22 * sizeof(u16)); decry = AcquireBoxMonLock(boxMon); species = (u16)GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); - forme = GetBoxMonData(boxMon, MON_DATA_FORME, NULL); + form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); level = (u8)CalcBoxMonLevel(boxMon); - LoadWotbl_HandleAlternateForme(species, (int)forme, wotbl); + LoadWotbl_HandleAlternateForm(species, (int)form, wotbl); for (i = 0; wotbl[i] != WOTBL_END; i++) { if ((wotbl[i] & WOTBL_LEVEL_MASK) > (level << WOTBL_LEVEL_SHIFT)) break; @@ -3145,9 +3145,9 @@ u32 MonTryLearnMoveOnLevelUp(Pokemon *mon, int * last_i, u16 * sp0) { u32 ret = 0; u16 * wotbl = AllocFromHeap(HEAP_ID_0, 22 * sizeof(u16)); u16 species = (u16)GetMonData(mon, MON_DATA_SPECIES, NULL); - u32 forme = GetMonData(mon, MON_DATA_FORME, NULL); + u32 form = GetMonData(mon, MON_DATA_FORM, NULL); u8 level = (u8)GetMonData(mon, MON_DATA_LEVEL, NULL); - LoadWotbl_HandleAlternateForme(species, (int)forme, wotbl); + LoadWotbl_HandleAlternateForm(species, (int)form, wotbl); if (wotbl[*last_i] == WOTBL_END) { FreeToHeap(wotbl); @@ -3298,10 +3298,10 @@ s8 GetFlavorPreferenceFromPID(u32 personality, int flavor) { return sFlavorPreferencesByNature[GetNatureFromPersonality(personality)][flavor]; } -int Species_LoadLearnsetTable(u16 species, u32 forme, u16 * dest) { +int Species_LoadLearnsetTable(u16 species, u32 form, u16 * dest) { int i; u16 * wotbl = AllocFromHeap(HEAP_ID_0, 22 * sizeof(u16)); - LoadWotbl_HandleAlternateForme(species, (int)forme, wotbl); + LoadWotbl_HandleAlternateForm(species, (int)form, wotbl); for (i = 0; wotbl[i] != WOTBL_END; i++) { dest[i] = WOTBL_MOVE(wotbl[i]); } @@ -3440,18 +3440,18 @@ BOOL BoxMon_IsImmuneToPokerus(BoxPokemon *boxMon) { return FALSE; } -void Pokemon_UpdateArceusForme(Pokemon *mon) { - BoxMon_UpdateArceusForme(&mon->box); +void Pokemon_UpdateArceusForm(Pokemon *mon) { + BoxMon_UpdateArceusForm(&mon->box); } -void BoxMon_UpdateArceusForme(BoxPokemon *boxMon) { +void BoxMon_UpdateArceusForm(BoxPokemon *boxMon) { u32 species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); u32 ability = GetBoxMonData(boxMon, MON_DATA_ABILITY, NULL); u32 heldItem = GetBoxMonData(boxMon, MON_DATA_HELD_ITEM, NULL); - u32 forme; + u32 form; if (species == SPECIES_ARCEUS && ability == ABILITY_MULTITYPE) { - forme = GetArceusTypeByHeldItemEffect((u16)GetItemAttr((u16)heldItem, 1, HEAP_ID_0)); - SetBoxMonData(boxMon, MON_DATA_FORME, &forme); + form = GetArceusTypeByHeldItemEffect((u16)GetItemAttr((u16)heldItem, 1, HEAP_ID_0)); + SetBoxMonData(boxMon, MON_DATA_FORM, &form); } } @@ -3494,35 +3494,35 @@ u32 GetArceusTypeByHeldItemEffect(u16 heldEffect) { } } -s32 Mon_UpdateGiratinaForme(Pokemon *mon) { - s32 ret = BoxMon_UpdateGiratinaForme(&mon->box); +s32 Mon_UpdateGiratinaForm(Pokemon *mon) { + s32 ret = BoxMon_UpdateGiratinaForm(&mon->box); if (ret != -1) { CalcMonLevelAndStats(mon); } return ret; } -s32 BoxMon_UpdateGiratinaForme(BoxPokemon *boxMon) { +s32 BoxMon_UpdateGiratinaForm(BoxPokemon *boxMon) { int species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); int heldItem = GetBoxMonData(boxMon, MON_DATA_HELD_ITEM, NULL); - int forme; + int form; if (species == SPECIES_GIRATINA) { if (heldItem == ITEM_GRISEOUS_ORB) { - forme = GIRATINA_ORIGIN; + form = GIRATINA_ORIGIN; } else { - forme = GIRATINA_ALTERED; + form = GIRATINA_ALTERED; } - SetBoxMonData(boxMon, MON_DATA_FORME, &forme); + SetBoxMonData(boxMon, MON_DATA_FORM, &form); UpdateBoxMonAbility(boxMon); - return forme; + return form; } return -1; } -void Mon_ForceSetGiratinaOriginForme(Pokemon *mon) { - s32 forme = GIRATINA_ORIGIN; +void Mon_ForceSetGiratinaOriginForm(Pokemon *mon) { + s32 form = GIRATINA_ORIGIN; if (GetMonData(mon, MON_DATA_SPECIES, NULL) == SPECIES_GIRATINA) { - SetBoxMonData(&mon->box, MON_DATA_FORME, &forme); + SetBoxMonData(&mon->box, MON_DATA_FORM, &form); UpdateBoxMonAbility(&mon->box); CalcMonLevelAndStats(mon); } @@ -3535,22 +3535,22 @@ void Party_UpdateAllGiratina_DistortionWorld(PARTY *party, BOOL force_origin) { for (i = 0; i < npoke; i++) { mon = GetPartyMonByIndex(party, i); if (force_origin) { - Mon_ForceSetGiratinaOriginForme(mon); + Mon_ForceSetGiratinaOriginForm(mon); } else { - Mon_UpdateGiratinaForme(mon); + Mon_UpdateGiratinaForm(mon); } } } -void Mon_UpdateShayminForme(Pokemon *mon, int forme) { - BoxMon_UpdateShayminForme(&mon->box, forme); +void Mon_UpdateShayminForm(Pokemon *mon, int form) { + BoxMon_UpdateShayminForm(&mon->box, form); CalcMonLevelAndStats(mon); } -void BoxMon_UpdateShayminForme(BoxPokemon *boxMon, int forme) { +void BoxMon_UpdateShayminForm(BoxPokemon *boxMon, int form) { if (GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL) == SPECIES_SHAYMIN) { - GF_ASSERT(forme <= 1); - SetBoxMonData(boxMon, MON_DATA_FORME, &forme); + GF_ASSERT(form <= 1); + SetBoxMonData(boxMon, MON_DATA_FORM, &form); UpdateBoxMonAbility(boxMon); } } @@ -3558,31 +3558,31 @@ void BoxMon_UpdateShayminForme(BoxPokemon *boxMon, int forme) { BOOL Mon_CanUseGracidea(Pokemon *mon) { RTCTime time; int species = GetMonData(mon, MON_DATA_SPECIES, NULL); - int forme = GetMonData(mon, MON_DATA_FORME, NULL); + int form = GetMonData(mon, MON_DATA_FORM, NULL); int status = GetMonData(mon, MON_DATA_STATUS, NULL); int hp = GetMonData(mon, MON_DATA_HP, NULL); BOOL fatefulEncounter = GetMonData(mon, MON_DATA_FATEFUL_ENCOUNTER, NULL); GF_RTC_CopyTime(&time); - if (species == SPECIES_SHAYMIN && forme == SHAYMIN_LAND && hp != 0 && fatefulEncounter == TRUE && !(status & MON_STATUS_FRZ_MASK) && (time.hour >= 4 && time.hour < 20)) { + if (species == SPECIES_SHAYMIN && form == SHAYMIN_LAND && hp != 0 && fatefulEncounter == TRUE && !(status & MON_STATUS_FRZ_MASK) && (time.hour >= 4 && time.hour < 20)) { return TRUE; } else { return FALSE; } } -void Party_ResetAllShayminToLandForme(PARTY *party) { +void Party_ResetAllShayminToLandForm(PARTY *party) { int npoke = GetPartyCount(party); int i; int species; - int forme; + int form; Pokemon *mon; for (i = 0; i < npoke; i++) { mon = GetPartyMonByIndex(party, i); species = GetMonData(mon, MON_DATA_SPECIES, NULL); - forme = GetMonData(mon, MON_DATA_FORME, NULL); - if (species == SPECIES_SHAYMIN && forme == SHAYMIN_SKY) { - Mon_UpdateShayminForme(mon, SHAYMIN_LAND); + form = GetMonData(mon, MON_DATA_FORM, NULL); + if (species == SPECIES_SHAYMIN && form == SHAYMIN_SKY) { + Mon_UpdateShayminForm(mon, SHAYMIN_LAND); } } } @@ -3596,7 +3596,7 @@ BOOL Party_TryResetShaymin(PARTY *party, int min_max, const RTCTime *time) { } minute = time->minute + 60 * (hour - 20); if (minute < min_max + 1) { - Party_ResetAllShayminToLandForme(party); + Party_ResetAllShayminToLandForm(party); return TRUE; } else { return FALSE; @@ -3605,7 +3605,7 @@ BOOL Party_TryResetShaymin(PARTY *party, int min_max, const RTCTime *time) { hour = time->hour; minute = time->minute + 60 * (hour - 4); if (minute < min_max) { - Party_ResetAllShayminToLandForme(party); + Party_ResetAllShayminToLandForm(party); return TRUE; } else { return FALSE; @@ -3613,8 +3613,8 @@ BOOL Party_TryResetShaymin(PARTY *party, int min_max, const RTCTime *time) { } } -BOOL Mon_UpdateRotomForme(Pokemon *mon, int forme, int defaultSlot) { - static const u16 forme_moves[ROTOM_FORME_MAX] = { +BOOL Mon_UpdateRotomForm(Pokemon *mon, int form, int defaultSlot) { + static const u16 form_moves[ROTOM_FORM_MAX] = { MOVE_NONE, MOVE_OVERHEAT, MOVE_HYDRO_PUMP, @@ -3629,12 +3629,12 @@ BOOL Mon_UpdateRotomForme(Pokemon *mon, int forme, int defaultSlot) { if (GetMonData(mon, MON_DATA_SPECIES, NULL) != SPECIES_ROTOM) { return FALSE; } - GetMonData(mon, MON_DATA_FORME, NULL); - new_move = forme_moves[forme]; + GetMonData(mon, MON_DATA_FORM, NULL); + new_move = form_moves[form]; for (i = 0; i < MAX_MON_MOVES; i++) { cur_move = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); - for (j = ROTOM_HEAT; j < (unsigned)ROTOM_FORME_MAX; j++) { - if (cur_move != MOVE_NONE && cur_move == forme_moves[j]) { + for (j = ROTOM_HEAT; j < (unsigned)ROTOM_FORM_MAX; j++) { + if (cur_move != MOVE_NONE && cur_move == form_moves[j]) { if (new_move != MOVE_NONE) { MonSetMoveInSlot_ResetPpUp(mon, new_move, i); new_move = MOVE_NONE; @@ -3660,14 +3660,14 @@ BOOL Mon_UpdateRotomForme(Pokemon *mon, int forme, int defaultSlot) { if (GetMonData(mon, MON_DATA_MOVE1, NULL) == MOVE_NONE) { MonSetMoveInSlot_ResetPpUp(mon, MOVE_THUNDER_SHOCK, 0); } - SetMonData(mon, MON_DATA_FORME, &forme); + SetMonData(mon, MON_DATA_FORM, &form); UpdateMonAbility(mon); CalcMonLevelAndStats(mon); return TRUE; } -void LoadWotbl_HandleAlternateForme(int species, int forme, u16 * wotbl) { - ReadWholeNarcMemberByIdPair(wotbl, NARC_poketool_personal_wotbl, ResolveMonForme(species, forme)); +void LoadWotbl_HandleAlternateForm(int species, int form, u16 * wotbl) { + ReadWholeNarcMemberByIdPair(wotbl, NARC_poketool_personal_wotbl, ResolveMonForm(species, form)); } void sub_02071FDC(SOUND_CHATOT *r6, u32 r5, u16 r4, s32 unused, s32 sp18, u32 sp1C, u32 sp20, u32 sp24) { @@ -3704,7 +3704,7 @@ void sub_0207204C(SOUND_CHATOT *r7, u32 r6, u16 r5, s32 r4, s32 sp20, u32 sp24, } void sub_020720D4(Pokemon *mon) { - PlayCry(GetMonData(mon, MON_DATA_SPECIES, NULL), GetMonData(mon, MON_DATA_FORME, NULL)); + PlayCry(GetMonData(mon, MON_DATA_SPECIES, NULL), GetMonData(mon, MON_DATA_FORM, NULL)); } void sub_020720FC(Pokemon *mon, PlayerProfile *a1, u32 pokeball, u32 a3, u32 encounterType, HeapID heap_id) { @@ -3741,15 +3741,15 @@ static const u16 sItemOdds[2][2] = { void WildMonSetRandomHeldItem(Pokemon *mon, u32 a1, u32 a2) { u32 chance; u16 species; - u16 forme; + u16 form; u16 item1; u16 item2; if (!(a1 & 0x81)) { chance = (u32)(LCRandom() % 100); species = (u16)GetMonData(mon, MON_DATA_SPECIES, 0); - forme = (u16)GetMonData(mon, MON_DATA_FORME, 0); - item1 = (u16)GetMonBaseStat_HandleAlternateForme(species, forme, BASE_ITEM_1); - item2 = (u16)GetMonBaseStat_HandleAlternateForme(species, forme, BASE_ITEM_2); + form = (u16)GetMonData(mon, MON_DATA_FORM, 0); + item1 = (u16)GetMonBaseStat_HandleAlternateForm(species, form, BASE_ITEM_1); + item2 = (u16)GetMonBaseStat_HandleAlternateForm(species, form, BASE_ITEM_2); if (item1 == item2 && item1 != ITEM_NONE) { SetMonData(mon, MON_DATA_HELD_ITEM, &item1); } else { @@ -3770,14 +3770,14 @@ BOOL GetMonTMHMCompat(Pokemon *mon, u8 tmhm) { BOOL GetBoxMonTMHMCompat(BoxPokemon *boxMon, u8 tmhm) { u16 species; - u32 forme; + u32 form; species = GetBoxMonData(boxMon, MON_DATA_SPECIES2, NULL); - forme = GetBoxMonData(boxMon, MON_DATA_FORME, NULL); - return GetTMHMCompatBySpeciesAndForme(species, forme, tmhm); + form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); + return GetTMHMCompatBySpeciesAndForm(species, form, tmhm); } -BOOL GetTMHMCompatBySpeciesAndForme(u16 species, u32 forme, u8 tmhm) { +BOOL GetTMHMCompatBySpeciesAndForm(u16 species, u32 form, u8 tmhm) { u32 mask; enum BaseStat baseStat; if (species == SPECIES_EGG) { @@ -3799,7 +3799,7 @@ BOOL GetTMHMCompatBySpeciesAndForme(u16 species, u32 forme, u8 tmhm) { mask = 1 << (tmhm - 96); baseStat = BASE_TMHM_4; } - return (GetMonBaseStat_HandleAlternateForme(species, forme, baseStat) & mask) != 0; + return (GetMonBaseStat_HandleAlternateForm(species, form, baseStat) & mask) != 0; } void UpdateMonAbility(Pokemon *mon) { @@ -3810,9 +3810,9 @@ void UpdateBoxMonAbility(BoxPokemon *boxMon) { BOOL decry = AcquireBoxMonLock(boxMon); int species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); int pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); - int forme = GetBoxMonData(boxMon, MON_DATA_FORME, NULL); - int ability1 = GetMonBaseStat_HandleAlternateForme(species, forme, BASE_ABILITY_1); - int ability2 = GetMonBaseStat_HandleAlternateForme(species, forme, BASE_ABILITY_2); + int form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); + int ability1 = GetMonBaseStat_HandleAlternateForm(species, form, BASE_ABILITY_1); + int ability2 = GetMonBaseStat_HandleAlternateForm(species, form, BASE_ABILITY_2); if (ability2 != ABILITY_NONE) { if (pid & 1) { SetBoxMonData(boxMon, MON_DATA_ABILITY, &ability2); @@ -3922,8 +3922,8 @@ void LoadMonPersonal(int species, BASE_STATS *personal) { ReadWholeNarcMemberByIdPair(personal, NARC_poketool_personal_personal, species); } -void LoadMonBaseStats_HandleAlternateForme(int species, int forme, BASE_STATS *personal) { - ReadWholeNarcMemberByIdPair(personal, NARC_poketool_personal_personal, ResolveMonForme(species, forme)); +void LoadMonBaseStats_HandleAlternateForm(int species, int form, BASE_STATS *personal) { + ReadWholeNarcMemberByIdPair(personal, NARC_poketool_personal_personal, ResolveMonForm(species, form)); } void LoadMonEvolutionTable(u16 species, struct Evolution *evo) { @@ -3989,31 +3989,31 @@ PokemonDataBlock *GetSubstruct(BoxPokemon *boxMon, u32 pid, u8 which) { return (PokemonDataBlock *)((char *)boxMon->substructs + offsets[pid][which]); } -int ResolveMonForme(int species, int forme) { +int ResolveMonForm(int species, int form) { switch (species) { case SPECIES_DEOXYS: - if (forme != DEOXYS_NORMAL && forme <= DEOXYS_FORME_MAX - 1) { - return SPECIES_DEOXYS_ATK + forme - DEOXYS_ATTACK; + if (form != DEOXYS_NORMAL && form <= DEOXYS_FORM_MAX - 1) { + return SPECIES_DEOXYS_ATK + form - DEOXYS_ATTACK; } break; case SPECIES_WORMADAM: - if (forme != WORMADAM_PLANT && forme <= WORMADAM_FORME_MAX - 1) { - return SPECIES_WORMADAM_SANDY + forme - WORMADAM_SANDY; + if (form != WORMADAM_PLANT && form <= WORMADAM_FORM_MAX - 1) { + return SPECIES_WORMADAM_SANDY + form - WORMADAM_SANDY; } break; case SPECIES_GIRATINA: - if (forme != GIRATINA_ALTERED && forme <= GIRATINA_FORME_MAX - 1) { - return SPECIES_GIRATINA_ORIGIN + forme - GIRATINA_ORIGIN; + if (form != GIRATINA_ALTERED && form <= GIRATINA_FORM_MAX - 1) { + return SPECIES_GIRATINA_ORIGIN + form - GIRATINA_ORIGIN; } break; case SPECIES_SHAYMIN: - if (forme != SHAYMIN_LAND && forme <= SHAYMIN_FORME_MAX - 1) { - return SPECIES_SHAYMIN_SKY + forme - SHAYMIN_SKY; + if (form != SHAYMIN_LAND && form <= SHAYMIN_FORM_MAX - 1) { + return SPECIES_SHAYMIN_SKY + form - SHAYMIN_SKY; } break; case SPECIES_ROTOM: - if (forme != ROTOM_NORMAL && forme <= ROTOM_FORME_MAX - 1) { - return SPECIES_ROTOM_HEAT + forme - ROTOM_HEAT; + if (form != ROTOM_NORMAL && form <= ROTOM_FORM_MAX - 1) { + return SPECIES_ROTOM_HEAT + form - ROTOM_HEAT; } break; } @@ -4065,14 +4065,14 @@ static const u16 sBattleFrontierBanlist[18] = { SPECIES_ARCEUS, }; -BOOL IsPokemonBannedFromBattleFrontier(u16 species, u16 forme) { +BOOL IsPokemonBannedFromBattleFrontier(u16 species, u16 form) { int i; for (i = 0; i < NELEMS(sBattleFrontierBanlist); i++) { if (species == sBattleFrontierBanlist[i]) { return TRUE; } } - if (species == SPECIES_PICHU && forme == PICHU_SPIKY_EAR) { + if (species == SPECIES_PICHU && form == PICHU_SPIKY_EAR) { return TRUE; } return FALSE; @@ -4109,8 +4109,8 @@ BOOL SpeciesIsMythical(u16 species) { BOOL MonCheckFrontierIneligibility(Pokemon *mon) { u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); - u16 forme = GetMonData(mon, MON_DATA_FORME, NULL); - return IsPokemonBannedFromBattleFrontier(species, forme); + u16 form = GetMonData(mon, MON_DATA_FORM, NULL); + return IsPokemonBannedFromBattleFrontier(species, form); } BOOL BoxmonBelongsToPlayer(BoxPokemon *boxMon, PlayerProfile * profile, HeapID heap_id) { @@ -4976,7 +4976,7 @@ void CalcBoxMonPokeathlonPerformance(BoxPokemon *boxMon, struct PokeathlonTodayP int i; s16 day; u16 species; - u16 forme; + u16 form; pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); nature = GetBoxMonNature(boxMon); @@ -4989,8 +4989,8 @@ void CalcBoxMonPokeathlonPerformance(BoxPokemon *boxMon, struct PokeathlonTodayP } species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); - forme = GetBoxMonData(boxMon, MON_DATA_FORME, NULL); - ReadWholeNarcMemberByIdPair(&data, NARC_poketool_personal_performance, sPokeathlonPerformanceArcIdxs[species] + forme); + form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); + ReadWholeNarcMemberByIdPair(&data, NARC_poketool_personal_performance, sPokeathlonPerformanceArcIdxs[species] + form); dest->stats[PERFORMANCE_POWER].base = data.base[ARCPERF_POWER]; dest->stats[PERFORMANCE_POWER].lo = data.minmax[ARCPERF_POWER][0]; dest->stats[PERFORMANCE_POWER].hi = data.minmax[ARCPERF_POWER][1]; diff --git a/src/pokemon_icon_idx.c b/src/pokemon_icon_idx.c index a5b4ab026f..59cc48fb6f 100644 --- a/src/pokemon_icon_idx.c +++ b/src/pokemon_icon_idx.c @@ -2,20 +2,20 @@ #include "pokemon_icon_idx.h" #include "constants/species.h" -static u16 _BoxMonGetForme(BoxPokemon *boxMon); +static u16 BoxMonGetForm(BoxPokemon *boxMon); u32 Boxmon_GetIconNaix(BoxPokemon *boxMon) { BOOL encry; int species; BOOL isEgg; - int forme; + int form; u32 ret; encry = AcquireBoxMonLock(boxMon); species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); isEgg = GetBoxMonData(boxMon, MON_DATA_IS_EGG, NULL); - forme = _BoxMonGetForme(boxMon); - ret = GetMonIconNaixEx(species, isEgg, forme); + form = BoxMonGetForm(boxMon); + ret = GetMonIconNaixEx(species, isEgg, form); ReleaseBoxMonLock(boxMon, encry); return ret; } @@ -24,7 +24,7 @@ u32 Pokemon_GetIconNaix(Pokemon *mon) { return Boxmon_GetIconNaix(Mon_GetBoxMon(mon)); } -u32 GetMonIconNaixEx(u32 species, BOOL isEgg, u32 forme) { +u32 GetMonIconNaixEx(u32 species, BOOL isEgg, u32 form) { if (isEgg == TRUE) { if (species == SPECIES_MANAPHY) { return 502; @@ -33,26 +33,26 @@ u32 GetMonIconNaixEx(u32 species, BOOL isEgg, u32 forme) { } } - forme = sub_02070438(species, forme); - if (forme != 0) { + form = sub_02070438(species, form); + if (form != 0) { if (species == SPECIES_DEOXYS) { - return forme + 503 - 1; + return form + 503 - 1; } else if (species == SPECIES_UNOWN) { - return forme + 507 - 1; + return form + 507 - 1; } else if (species == SPECIES_BURMY) { - return forme + 534 - 1; + return form + 534 - 1; } else if (species == SPECIES_WORMADAM) { - return forme + 536 - 1; + return form + 536 - 1; } else if (species == SPECIES_SHELLOS) { - return forme + 538 - 1; + return form + 538 - 1; } else if (species == SPECIES_GASTRODON) { - return forme + 539 - 1; + return form + 539 - 1; } else if (species == SPECIES_GIRATINA) { - return forme + 540 - 1; + return form + 540 - 1; } else if (species == SPECIES_SHAYMIN) { - return forme + 541 - 1; + return form + 541 - 1; } else if (species == SPECIES_ROTOM) { - return forme + 542 - 1; + return form + 542 - 1; } } if (species > MAX_SPECIES) { @@ -61,24 +61,24 @@ u32 GetMonIconNaixEx(u32 species, BOOL isEgg, u32 forme) { return species + 7; } -u32 GetBattleMonIconNaixEx(u32 species, BOOL isEgg, u32 forme) { +u32 GetBattleMonIconNaixEx(u32 species, BOOL isEgg, u32 form) { if (!isEgg) { if (species == SPECIES_CASTFORM) { - forme = sub_02070438(species, forme); - if (forme != 0) { - return forme + 547 - 1; + form = sub_02070438(species, form); + if (form != 0) { + return form + 547 - 1; } } else if (species == SPECIES_CHERRIM) { - forme = sub_02070438(species, forme); - if (forme != 0) { - return forme + 550 - 1; + form = sub_02070438(species, form); + if (form != 0) { + return form + 550 - 1; } } } - return GetMonIconNaixEx(species, isEgg, forme); + return GetMonIconNaixEx(species, isEgg, form); } -static u16 _BoxMonGetForme(BoxPokemon *boxMon) { +static u16 BoxMonGetForm(BoxPokemon *boxMon) { switch (GetBoxMonData(boxMon, MON_DATA_SPECIES2, NULL)) { case SPECIES_UNOWN: return GetBoxMonUnownLetter(boxMon); @@ -90,13 +90,13 @@ static u16 _BoxMonGetForme(BoxPokemon *boxMon) { case SPECIES_GIRATINA: case SPECIES_SHAYMIN: case SPECIES_ROTOM: - return GetBoxMonData(boxMon, MON_DATA_FORME, NULL); + return GetBoxMonData(boxMon, MON_DATA_FORM, NULL); default: return 0; } } -static const u8 sPokemonPalNoBySpeciesAndForme[] = { +static const u8 sPokemonPalNoBySpeciesAndForm[] = { 0, 1, 1, 1, 0, 0, 0, 0, 2, 2, 1, 1, 0, 1, 2, 2, 0, 0, 0, 2, 1, 0, 0, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, 1, 0, 0, 2, 2, 1, 0, 0, 0, 0, @@ -133,7 +133,7 @@ static const u8 sPokemonPalNoBySpeciesAndForme[] = { 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, }; -const u8 GetMonIconPaletteEx(u32 species, u32 forme, u32 isEgg) { +const u8 GetMonIconPaletteEx(u32 species, u32 form, u32 isEgg) { if (isEgg == TRUE) { if (species == SPECIES_MANAPHY) { species = 495; @@ -142,57 +142,57 @@ const u8 GetMonIconPaletteEx(u32 species, u32 forme, u32 isEgg) { } } else if (species > MAX_SPECIES) { species = 0; - } else if (forme != 0) { + } else if (form != 0) { if (species == SPECIES_DEOXYS) { - species = 496 + forme - 1; + species = 496 + form - 1; } else if (species == SPECIES_UNOWN) { - species = 499 + forme - 1; + species = 499 + form - 1; } else if (species == SPECIES_BURMY) { - species = 527 + forme - 1; + species = 527 + form - 1; } else if (species == SPECIES_WORMADAM) { - species = 529 + forme - 1; + species = 529 + form - 1; } else if (species == SPECIES_SHELLOS) { - species = 531 + forme - 1; + species = 531 + form - 1; } else if (species == SPECIES_GASTRODON) { - species = 532 + forme - 1; + species = 532 + form - 1; } else if (species == SPECIES_GIRATINA) { - species = 533 + forme - 1; + species = 533 + form - 1; } else if (species == SPECIES_SHAYMIN) { - species = 534 + forme - 1; + species = 534 + form - 1; } else if (species == SPECIES_ROTOM) { - species = 535 + forme - 1; + species = 535 + form - 1; } } - return sPokemonPalNoBySpeciesAndForme[species]; + return sPokemonPalNoBySpeciesAndForm[species]; } -const u8 GetBattleMonIconPaletteEx(u32 species, u32 forme, BOOL isEgg) { +const u8 GetBattleMonIconPaletteEx(u32 species, u32 form, BOOL isEgg) { if (!isEgg) { if (species == SPECIES_CASTFORM) { - if (forme != 0) { - return sPokemonPalNoBySpeciesAndForme[540 + forme - 1]; + if (form != 0) { + return sPokemonPalNoBySpeciesAndForm[540 + form - 1]; } } else if (species == SPECIES_CHERRIM) { - if (forme != 0) { - return sPokemonPalNoBySpeciesAndForme[543 + forme - 1]; + if (form != 0) { + return sPokemonPalNoBySpeciesAndForm[543 + form - 1]; } } } - return GetMonIconPaletteEx(species, forme, isEgg); + return GetMonIconPaletteEx(species, form, isEgg); } const u8 Boxmon_GetIconPalette(BoxPokemon *boxMon) { BOOL encry; u32 species; - u32 forme; + u32 form; BOOL isEgg; encry = AcquireBoxMonLock(boxMon); - forme = _BoxMonGetForme(boxMon); + form = BoxMonGetForm(boxMon); species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); isEgg = GetBoxMonData(boxMon, MON_DATA_IS_EGG, NULL); ReleaseBoxMonLock(boxMon, encry); - return GetMonIconPaletteEx(species, forme, isEgg); + return GetMonIconPaletteEx(species, form, isEgg); } const u8 Pokemon_GetIconPalette(Pokemon *mon) { diff --git a/src/save_local_field_data.c b/src/save_local_field_data.c index de67c9a84c..6e8cf363e8 100644 --- a/src/save_local_field_data.c +++ b/src/save_local_field_data.c @@ -130,15 +130,15 @@ void Fsys_RestoreMapObjectsFromSave(FieldSystem *fsys) { struct SavedMapObject *follower = SaveMapObjects_SearchSpriteId(unk->subs, 64, SPRITE_FOLLOWER_MON_SHAYMIN_SKY); Pokemon *mon; int species; - int forme; + int form; if (follower != NULL && follower->objId == obj_partner_poke) { mon = GetFirstAliveMonInParty_CrashIfNone(SaveArray_PlayerParty_Get(fsys->savedata)); species = GetMonData(mon, MON_DATA_SPECIES, NULL); - forme = GetMonData(mon, MON_DATA_FORME, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); if (species != SPECIES_SHAYMIN) { GF_ASSERT(FALSE); - } else if (forme == SHAYMIN_LAND) { + } else if (form == SHAYMIN_LAND) { follower->gfxId = SPRITE_FOLLOWER_MON_SHAYMIN; } } diff --git a/src/save_misc.c b/src/save_misc.c index b221f3db81..f9454a82c7 100644 --- a/src/save_misc.c +++ b/src/save_misc.c @@ -89,15 +89,15 @@ BOOL SaveMisc_CheckExtraChunksExist(SAVE_MISC_DATA *saveMiscData) { return saveMiscData->extraChunksExist; } -void SaveMisc_SetFavoriteMon(SAVE_MISC_DATA *saveMiscData, int species, int forme, int isEgg) { +void SaveMisc_SetFavoriteMon(SAVE_MISC_DATA *saveMiscData, int species, int form, int isEgg) { saveMiscData->favoriteMonSpecies = species; - saveMiscData->favoriteMonForme = forme; + saveMiscData->favoriteMonForm = form; saveMiscData->favoriteMonIsEgg = isEgg; } -void SaveMisc_GetFavoriteMon(SAVE_MISC_DATA *saveMiscData, int *species, int *forme, int *isEgg) { +void SaveMisc_GetFavoriteMon(SAVE_MISC_DATA *saveMiscData, int *species, int *form, int *isEgg) { *species = saveMiscData->favoriteMonSpecies; - *forme = saveMiscData->favoriteMonForme; + *form = saveMiscData->favoriteMonForm; *isEgg = saveMiscData->favoriteMonIsEgg; } diff --git a/src/scrcmd_20.c b/src/scrcmd_20.c index fd6428d0c6..4d84f9e01c 100644 --- a/src/scrcmd_20.c +++ b/src/scrcmd_20.c @@ -139,7 +139,7 @@ static BOOL BattleHall_DoesPartyContainEligibleMons(s32 numRequiredMons, SaveDat u8 numEligibleMons; u16 species; u16 level; - u16 forme; + u16 form; PARTY *party = SaveArray_PlayerParty_Get(savedata); u8 partyCount = GetPartyCount(party); if (partyCount < numRequiredMons) { @@ -153,10 +153,10 @@ static BOOL BattleHall_DoesPartyContainEligibleMons(s32 numRequiredMons, SaveDat Pokemon *mon = GetPartyMonByIndex(party, i); species = GetMonData(mon, MON_DATA_SPECIES, NULL); level = GetMonData(mon, MON_DATA_LEVEL, NULL); - forme = GetMonData(mon, MON_DATA_FORME, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); if (GetMonData(mon, MON_DATA_IS_EGG, NULL) == FALSE && level >= 30 - && IsPokemonBannedFromBattleFrontier(species, forme) != TRUE) { + && IsPokemonBannedFromBattleFrontier(species, form) != TRUE) { numEligibleMons++; arr[i] = species; } diff --git a/src/scrcmd_c.c b/src/scrcmd_c.c index 5b7aa1a79c..52efd995d8 100644 --- a/src/scrcmd_c.c +++ b/src/scrcmd_c.c @@ -2687,7 +2687,7 @@ BOOL ScrCmd_264(ScriptContext *ctx) { MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT); u16 r4 = ScriptReadHalfword(ctx); PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveDataPtr(ctx->fsys)); - SAVE_EASY_CHAT_T *easyChat = SaveData_EasyChat_Get(FieldSystem_GetSaveDataPtr(ctx->fsys)); + SAVE_EASY_CHAT_T *easyChat = Save_EasyChat_Get(FieldSystem_GetSaveDataPtr(ctx->fsys)); u16 objId; if (r4 == 0) { @@ -3685,7 +3685,7 @@ BOOL ScrCmd_517(ScriptContext *ctx) { } BOOL ScrCmd_518(ScriptContext *ctx) { - u16 forme = ScriptGetVar(ctx); + u16 form = ScriptGetVar(ctx); PARTY *party = SaveArray_PlayerParty_Get(ctx->fsys->savedata); int partyCount = GetPartyCount(party); Pokedex *pokedex = Save_Pokedex_Get(ctx->fsys->savedata); @@ -3694,7 +3694,7 @@ BOOL ScrCmd_518(ScriptContext *ctx) { for (i = 0; i < partyCount; i++) { Pokemon *mon = GetPartyMonByIndex(party, i); if (GetMonData(mon, MON_DATA_SPECIES, NULL) == SPECIES_DEOXYS) { - SetMonData(mon, MON_DATA_FORME, &forme); + SetMonData(mon, MON_DATA_FORM, &form); CalcMonLevelAndStats(mon); Pokedex_SetMonCaughtFlag(pokedex, mon); } @@ -3723,11 +3723,11 @@ BOOL ScrCmd_519(ScriptContext *ctx) { BOOL hasMultiple; Pokemon *mon = GetPartyMonByIndex(party, i); u32 species = GetMonData(mon, MON_DATA_SPECIES, NULL); - u32 forme = GetMonData(mon, MON_DATA_FORME, NULL); + u32 form = GetMonData(mon, MON_DATA_FORM, NULL); if (species == SPECIES_BURMY) { hasMultiple = FALSE; - for (j = 0, sp18[i] = forme; j < i; j++) { - if (sp18[j] == forme) { + for (j = 0, sp18[i] = form; j < i; j++) { + if (sp18[j] == form) { hasMultiple = TRUE; } } @@ -3780,7 +3780,7 @@ BOOL ScrCmd_524(ScriptContext *ctx) { BOOL ScrCmd_525(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Save_PlayerHasRegiInParty(ctx->fsys->savedata); + *p_ret = Save_PlayerHasAllRegisInParty(ctx->fsys->savedata); return FALSE; } @@ -3865,7 +3865,7 @@ BOOL ScrCmd_538(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); u16 wordIdx = ScriptGetVar(ctx); MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT); - int trendy = SaveEasyChat_RandomTrendySayingSet(SaveData_EasyChat_Get(ctx->fsys->savedata)); + int trendy = Save_EasyChat_RandomTrendySayingSet(Save_EasyChat_Get(ctx->fsys->savedata)); if (trendy == 32) { *p_ret = 0xFFFF; return FALSE; @@ -3877,7 +3877,7 @@ BOOL ScrCmd_538(ScriptContext *ctx) { BOOL ScrCmd_540(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = SaveEasyChat_TrendySayingsUnlockedAllCheck(SaveData_EasyChat_Get(ctx->fsys->savedata)) == TRUE; + *p_ret = Save_EasyChat_TrendySayingsUnlockedAllCheck(Save_EasyChat_Get(ctx->fsys->savedata)) == TRUE; return FALSE; } @@ -3903,7 +3903,7 @@ BOOL ScrCmd_543(ScriptContext *ctx) { BOOL ScrCmd_545(ScriptContext *ctx) { Pokedex *pokedex = Save_Pokedex_Get(ctx->fsys->savedata); u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Pokedex_GetSeenFormeNum_Unown(pokedex, TRUE); + *p_ret = Pokedex_GetSeenFormNum_Unown(pokedex, TRUE); return FALSE; } @@ -4230,7 +4230,7 @@ BOOL ScrCmd_667(ScriptContext *ctx) { u32 sub_020467A8(SaveData *saveData); -BOOL ScrCmd_GetOwnedRotomFormes(ScriptContext *ctx) { +BOOL ScrCmd_GetOwnedRotomForms(ScriptContext *ctx) { FieldSystem *fsys = ctx->fsys; u16 *hasHeat = ScriptGetVarPointer(ctx); u16 *hasWash = ScriptGetVarPointer(ctx); @@ -4273,7 +4273,7 @@ u32 sub_020467A8(SaveData *saveData) { for (i = 0; i < partyCount; i++) { Pokemon *mon = GetPartyMonByIndex(party, i); if (GetMonData(mon, MON_DATA_SPECIES, NULL) == SPECIES_ROTOM && !GetMonData(mon, MON_DATA_IS_EGG, NULL)) { - ret |= 1 << GetMonData(mon, MON_DATA_FORME, NULL); + ret |= 1 << GetMonData(mon, MON_DATA_FORM, NULL); } } @@ -4281,7 +4281,7 @@ u32 sub_020467A8(SaveData *saveData) { for (i = 0; i < 2; i++) { BoxPokemon *boxMon = DayCareMon_GetBoxMon(Save_DayCare_GetMonX(dayCare, i)); if (GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL) == SPECIES_ROTOM && !GetBoxMonData(boxMon, MON_DATA_IS_EGG, NULL)) { - ret |= 1 << GetBoxMonData(boxMon, MON_DATA_FORME, NULL); + ret |= 1 << GetBoxMonData(boxMon, MON_DATA_FORM, NULL); } } @@ -4290,7 +4290,7 @@ u32 sub_020467A8(SaveData *saveData) { for (j = 0; j < MONS_PER_BOX; j++) { BoxPokemon *boxMon = PCStorage_GetMonByIndexPair(pcStorage, i, j); if (GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL) == SPECIES_ROTOM && !GetBoxMonData(boxMon, MON_DATA_IS_EGG, NULL)) { - ret |= 1 << GetBoxMonData(boxMon, MON_DATA_FORME, NULL); + ret |= 1 << GetBoxMonData(boxMon, MON_DATA_FORM, NULL); } } } @@ -4300,7 +4300,7 @@ u32 sub_020467A8(SaveData *saveData) { POKEWALKER *pokeWalker = Save_Pokewalker_Get(saveData); if (Pokewalker_TryGetBoxMon(pokeWalker, walkerBoxMon)) { if (GetBoxMonData(walkerBoxMon, MON_DATA_SPECIES, NULL) == SPECIES_ROTOM && !GetBoxMonData(walkerBoxMon, MON_DATA_IS_EGG, NULL)) { - ret |= 1 << GetBoxMonData(walkerBoxMon, MON_DATA_FORME, NULL); + ret |= 1 << GetBoxMonData(walkerBoxMon, MON_DATA_FORM, NULL); } } FreeToHeap(walkerMon); diff --git a/src/scrcmd_daycare.c b/src/scrcmd_daycare.c index c8fe927e2c..79c1596fc7 100644 --- a/src/scrcmd_daycare.c +++ b/src/scrcmd_daycare.c @@ -7,10 +7,10 @@ #include "pokemon.h" extern void ov01_021F9048(LocalMapObject* map_object); -extern void FollowPokeMapObjectSetParams(LocalMapObject *mapObject, u16 species, u8 forme, BOOL shiny); -extern u32 FollowingPokemon_GetSpriteID(int species, u16 forme, u32 gender); +extern void FollowPokeMapObjectSetParams(LocalMapObject *mapObject, u16 species, u8 form, BOOL shiny); +extern u32 FollowingPokemon_GetSpriteID(int species, u16 form, u32 gender); -static LocalMapObject* CreateDayCareMonSpriteInternal(MapObjectManager* object_man, u8 dc_mon_idx, u16 species, u8 forme, u32 gender, u32 direction, u32 x, u32 y, u32 map_no, BOOL shiny); +static LocalMapObject* CreateDayCareMonSpriteInternal(MapObjectManager* object_man, u8 dc_mon_idx, u16 species, u8 form, u32 gender, u32 direction, u32 x, u32 y, u32 map_no, BOOL shiny); BOOL ScrCmd_BufferDayCareMonNicks(ScriptContext* ctx) { SaveData* savedata = ctx->fsys->savedata; @@ -150,7 +150,7 @@ BOOL ScrCmd_CheckDayCareEgg(ScriptContext* ctx) { BOOL ScrCmd_UpdateDayCareMonObjects(ScriptContext* ctx) { DAYCARE* daycare; - u8 forme; + u8 form; u16 species; FieldSystem* fsys = ctx->fsys; @@ -167,19 +167,19 @@ BOOL ScrCmd_UpdateDayCareMonObjects(ScriptContext* ctx) { continue; } - forme = GetBoxMonData(boxMon, MON_DATA_FORME, NULL); + form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); u32 gender = GetBoxMonData(boxMon, MON_DATA_GENDER, NULL); BOOL shiny = BoxMonIsShiny(boxMon); - CreateDayCareMonSpriteInternal(fsys->mapObjectMan, (u8)dc_mon_idx, species, forme, gender, 1, x, y, fsys->location->mapId, shiny); + CreateDayCareMonSpriteInternal(fsys->mapObjectMan, (u8)dc_mon_idx, species, form, gender, 1, x, y, fsys->location->mapId, shiny); } return FALSE; } -static LocalMapObject* CreateDayCareMonSpriteInternal(MapObjectManager* object_man, u8 dc_mon_idx, u16 species, u8 forme, u32 gender, u32 direction, u32 x, u32 y, u32 map_no, BOOL shiny) { - u32 sprite_id = FollowingPokemon_GetSpriteID(species, forme, gender); +static LocalMapObject* CreateDayCareMonSpriteInternal(MapObjectManager* object_man, u8 dc_mon_idx, u16 species, u8 form, u32 gender, u32 direction, u32 x, u32 y, u32 map_no, BOOL shiny) { + u32 sprite_id = FollowingPokemon_GetSpriteID(species, form, gender); LocalMapObject* lmo = CreateSpecialFieldObject(object_man, x, y, direction, sprite_id, 11, map_no); GF_ASSERT(lmo != NULL); @@ -188,7 +188,7 @@ static LocalMapObject* CreateDayCareMonSpriteInternal(MapObjectManager* object_m MapObject_SetFlagID(lmo, 0); MapObject_SetScript(lmo, 0); MapObject_SetParam(lmo, 0, 2); - FollowPokeMapObjectSetParams(lmo, species, (u32)forme, shiny); + FollowPokeMapObjectSetParams(lmo, species, (u32)form, shiny); MapObject_SetXRange(lmo, -1); MapObject_SetYRange(lmo, -1); MapObject_SetFlagsBits(lmo, MAPOBJECTFLAG_UNK2); @@ -226,18 +226,18 @@ BOOL ScrCmd_DayCareSanitizeMon(ScriptContext* ctx) { SetMonData(mon, MON_DATA_HELD_ITEM, &no_item); } - s32 forme = GetMonData(mon, MON_DATA_FORME, NULL); - if (forme > 0) { + s32 form = GetMonData(mon, MON_DATA_FORM, NULL); + if (form > 0) { u32 species = GetMonData(mon, MON_DATA_SPECIES, NULL); switch (species) { case SPECIES_GIRATINA: - Mon_UpdateGiratinaForme(mon); + Mon_UpdateGiratinaForm(mon); break; case SPECIES_ROTOM: - Mon_UpdateRotomForme(mon, 0, 0); + Mon_UpdateRotomForm(mon, 0, 0); break; case SPECIES_SHAYMIN: - Mon_UpdateShayminForme(mon, 0); + Mon_UpdateShayminForm(mon, 0); break; } } diff --git a/src/scrcmd_party.c b/src/scrcmd_party.c index b5c6b34e24..3cbf703b5e 100644 --- a/src/scrcmd_party.c +++ b/src/scrcmd_party.c @@ -21,12 +21,12 @@ BOOL ScrCmd_GiveMon(ScriptContext *ctx) { u16 species = ScriptGetVar(ctx); u8 level = ScriptGetVar(ctx); u16 heldItem = ScriptGetVar(ctx); - u8 forme = ScriptGetVar(ctx); + u8 form = ScriptGetVar(ctx); u16 ability = ScriptGetVar(ctx); u16 *retPtr = ScriptGetVarPointer(ctx); PARTY *party = SaveArray_PlayerParty_Get(fsys->savedata); - *retPtr = GiveMon(HEAP_ID_FIELD, fsys->savedata, species, level, forme, ability, heldItem, map, 24); + *retPtr = GiveMon(HEAP_ID_FIELD, fsys->savedata, species, level, form, ability, heldItem, map, 24); return FALSE; } @@ -771,12 +771,12 @@ BOOL ScrCmd_MonHasItem(ScriptContext *ctx) { return FALSE; } -BOOL ScrCmd_GetPartymonForme(ScriptContext *ctx) { +BOOL ScrCmd_GetPartymonForm(ScriptContext *ctx) { u16 slot = ScriptGetVar(ctx); - u16 *forme = ScriptGetVarPointer(ctx); + u16 *form = ScriptGetVarPointer(ctx); Pokemon *mon = GetPartyMonByIndex(SaveArray_PlayerParty_Get(ctx->fsys->savedata), slot); - *forme = GetMonData(mon, MON_DATA_FORME, NULL); + *form = GetMonData(mon, MON_DATA_FORM, NULL); return FALSE; } diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index 8bbb469f3f..e7319ae860 100644 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -13,7 +13,7 @@ static BOOL MonNotFaintedOrEgg(Pokemon *mon) { return !GetMonData(mon, MON_DATA_IS_EGG, NULL); } -BOOL GiveMon(HeapID heapId, SaveData *saveData, int species, int level, int forme, u8 ability, u16 heldItem, int ball, int encounterType) { +BOOL GiveMon(HeapID heapId, SaveData *saveData, int species, int level, int form, u8 ability, u16 heldItem, int ball, int encounterType) { PARTY *party; Pokemon *mon; PlayerProfile *profile; @@ -29,7 +29,7 @@ BOOL GiveMon(HeapID heapId, SaveData *saveData, int species, int level, int form sub_020720FC(mon, profile, ITEM_POKE_BALL, ball, encounterType, heapId); sp1C = heldItem; SetMonData(mon, MON_DATA_HELD_ITEM, &sp1C); - SetMonData(mon, MON_DATA_FORME, &forme); + SetMonData(mon, MON_DATA_FORM, &form); if (ability != 0) { SetMonData(mon, MON_DATA_ABILITY, &ability); } diff --git a/src/trainer_data.c b/src/trainer_data.c index 8b212e2abd..188db156c5 100644 --- a/src/trainer_data.c +++ b/src/trainer_data.c @@ -259,7 +259,7 @@ TrainerGender TrainerClass_GetGenderOrTrainerCount(int trainerClass) { return (TrainerGender)sTrainerGenders[trainerClass]; } -void TrMon_OverridePidGender(int species, int forme, int overrideParam, u32 *pid); +void TrMon_OverridePidGender(int species, int form, int overrideParam, u32 *pid); void TrMon_FrustrationCheckAndSetFriendship(Pokemon *mon); void CreateNPCTrainerParty(BATTLE_SETUP *enemies, int party_id, HeapID heap_id) { @@ -301,16 +301,16 @@ void CreateNPCTrainerParty(BATTLE_SETUP *enemies, int party_id, HeapID heap_id) case TRTYPE_MON: { TRPOKE_NOITEM_DFLTMOVES *monSpecies; u16 species; - u8 forme; + u8 form; monSpecies = &data->species; for (i = 0; i < enemies->trainer[party_id].npoke; i++) { - // Starting in Platinum, the Pokemon's forme was encoded + // Starting in Platinum, the Pokemon's form was encoded // in the upper 6 bits of the species. species = monSpecies[i].species & 0x3FF; - forme = (monSpecies[i].species & 0xFC00) >> 10; + form = (monSpecies[i].species & 0xFC00) >> 10; // Starting in HGSS, additional checks are performed to // rand each Pokemon's personality. - TrMon_OverridePidGender(species, forme, monSpecies[i].genderAbilityOverride, &pid_gender); + TrMon_OverridePidGender(species, form, monSpecies[i].genderAbilityOverride, &pid_gender); // Generate personality by seeding with a value based on the difficulty, // level, species, and opponent ID. Roll the RNG N times, where N is // the index of its trainer class. Finally, left shift the 16-bit @@ -337,7 +337,7 @@ void CreateNPCTrainerParty(BATTLE_SETUP *enemies, int party_id, HeapID heap_id) // Starting in Platinum, enemy trainer could have // personalized ball capsules. SetTrMonCapsule(monSpecies[i].capsule, mon, heap_id); - SetMonData(mon, MON_DATA_FORME, &forme); + SetMonData(mon, MON_DATA_FORM, &form); // Starting in HGSS, an AI Pokemon with Frustration // will have minimum friendship. TrMon_FrustrationCheckAndSetFriendship(mon); @@ -348,12 +348,12 @@ void CreateNPCTrainerParty(BATTLE_SETUP *enemies, int party_id, HeapID heap_id) case TRTYPE_MON_MOVES: { TRPOKE_NOITEM_CUSTMOVES *monSpeciesMoves; u16 species; - u8 forme; + u8 form; monSpeciesMoves = &data->species_moves; for (i = 0; i < enemies->trainer[party_id].npoke; i++) { species = monSpeciesMoves[i].species & 0x3FF; - forme = (monSpeciesMoves[i].species & 0xFC00) >> 10; - TrMon_OverridePidGender(species, forme, monSpeciesMoves[i].genderAbilityOverride, &pid_gender); + form = (monSpeciesMoves[i].species & 0xFC00) >> 10; + TrMon_OverridePidGender(species, form, monSpeciesMoves[i].genderAbilityOverride, &pid_gender); personality = monSpeciesMoves[i].difficulty + monSpeciesMoves[i].level + species + enemies->trainerId[party_id]; SetLCRNGSeed(personality); for (j = 0; j < enemies->trainer[party_id].trainerClass; j++) { @@ -366,7 +366,7 @@ void CreateNPCTrainerParty(BATTLE_SETUP *enemies, int party_id, HeapID heap_id) MonSetMoveInSlot(mon, monSpeciesMoves[i].moves[j], (u8)j); } SetTrMonCapsule(monSpeciesMoves[i].capsule, mon, heap_id); - SetMonData(mon, MON_DATA_FORME, &forme); + SetMonData(mon, MON_DATA_FORM, &form); TrMon_FrustrationCheckAndSetFriendship(mon); AddMonToParty(enemies->party[party_id], mon); } @@ -375,12 +375,12 @@ void CreateNPCTrainerParty(BATTLE_SETUP *enemies, int party_id, HeapID heap_id) case TRTYPE_MON_ITEM: { TRPOKE_ITEM_DFLTMOVES *monSpeciesItem; u16 species; - u8 forme; + u8 form; monSpeciesItem = &data->species_item; for (i = 0; i < enemies->trainer[party_id].npoke; i++) { species = monSpeciesItem[i].species & 0x3FF; - forme = (monSpeciesItem[i].species & 0xFC00) >> 10; - TrMon_OverridePidGender(species, forme, monSpeciesItem[i].genderAbilityOverride, &pid_gender); + form = (monSpeciesItem[i].species & 0xFC00) >> 10; + TrMon_OverridePidGender(species, form, monSpeciesItem[i].genderAbilityOverride, &pid_gender); personality = monSpeciesItem[i].difficulty + monSpeciesItem[i].level + species + enemies->trainerId[party_id]; SetLCRNGSeed(personality); for (j = 0; j < enemies->trainer[party_id].trainerClass; j++) { @@ -391,7 +391,7 @@ void CreateNPCTrainerParty(BATTLE_SETUP *enemies, int party_id, HeapID heap_id) CreateMon(mon, species, monSpeciesItem[i].level, iv, TRUE, (s32)personality, OT_ID_RANDOM_NO_SHINY, 0); SetMonData(mon, MON_DATA_HELD_ITEM, &monSpeciesItem[i].item); SetTrMonCapsule(monSpeciesItem[i].capsule, mon, heap_id); - SetMonData(mon, MON_DATA_FORME, &forme); + SetMonData(mon, MON_DATA_FORM, &form); TrMon_FrustrationCheckAndSetFriendship(mon); AddMonToParty(enemies->party[party_id], mon); } @@ -400,12 +400,12 @@ void CreateNPCTrainerParty(BATTLE_SETUP *enemies, int party_id, HeapID heap_id) case TRTYPE_MON_ITEM_MOVES: { TRPOKE_ITEM_CUSTMOVES *monSpeciesItemMoves; u16 species; - u8 forme; + u8 form; monSpeciesItemMoves = &data->species_item_moves; for (i = 0; i < enemies->trainer[party_id].npoke; i++) { species = monSpeciesItemMoves[i].species & 0x3FF; - forme = (monSpeciesItemMoves[i].species & 0xFC00) >> 10; - TrMon_OverridePidGender(species, forme, monSpeciesItemMoves[i].genderAbilityOverride, &pid_gender); + form = (monSpeciesItemMoves[i].species & 0xFC00) >> 10; + TrMon_OverridePidGender(species, form, monSpeciesItemMoves[i].genderAbilityOverride, &pid_gender); personality = monSpeciesItemMoves[i].difficulty + monSpeciesItemMoves[i].level + species + enemies->trainerId[party_id]; SetLCRNGSeed(personality); for (j = 0; j < enemies->trainer[party_id].trainerClass; j++) { @@ -419,7 +419,7 @@ void CreateNPCTrainerParty(BATTLE_SETUP *enemies, int party_id, HeapID heap_id) MonSetMoveInSlot(mon, monSpeciesItemMoves[i].moves[j], (u8)j); } SetTrMonCapsule(monSpeciesItemMoves[i].capsule, mon, heap_id); - SetMonData(mon, MON_DATA_FORME, &forme); + SetMonData(mon, MON_DATA_FORM, &form); TrMon_FrustrationCheckAndSetFriendship(mon); AddMonToParty(enemies->party[party_id], mon); } @@ -431,12 +431,12 @@ void CreateNPCTrainerParty(BATTLE_SETUP *enemies, int party_id, HeapID heap_id) SetLCRNGSeed(seed_bak); // Restore the RNG state } -void TrMon_OverridePidGender(int species, int forme, int overrideParam, u32 *pid) { +void TrMon_OverridePidGender(int species, int form, int overrideParam, u32 *pid) { int genderOverride = overrideParam & 0xF; int abilityOverride = (overrideParam & 0xF0) >> 4; if (overrideParam != 0) { if (genderOverride != 0) { - *pid = GetMonBaseStat_HandleAlternateForme(species, forme, BASE_GENDER_RATIO); + *pid = GetMonBaseStat_HandleAlternateForm(species, form, BASE_GENDER_RATIO); if (genderOverride == 1) { *pid += 2; } else { diff --git a/tools/py_scripts/scrcmd.json b/tools/py_scripts/scrcmd.json index bf580ca59c..26cc35bb70 100644 --- a/tools/py_scripts/scrcmd.json +++ b/tools/py_scripts/scrcmd.json @@ -4163,7 +4163,7 @@ ] }, { - "name": "set_mon_forme", + "name": "set_mon_form", "args": [ 2, 2 @@ -4255,7 +4255,7 @@ ] }, { - "name": "get_owned_rotom_formes", + "name": "get_owned_rotom_forms", "args": [ "var", "var", @@ -4272,7 +4272,7 @@ ] }, { - "name": "update_rotom_forme", + "name": "update_rotom_form", "args": [ "var", "var", @@ -4281,7 +4281,7 @@ ] }, { - "name": "get_party_mon_forme", + "name": "get_party_mon_form", "args": [ "var", "var" @@ -5164,7 +5164,7 @@ ] }, { - "name": "get_partymon_forme", + "name": "get_partymon_form", "args": [ "var", "var"