diff --git a/include/dungeon_8041AD0.h b/include/dungeon_8041AD0.h index b982792b0..4361dbffd 100644 --- a/include/dungeon_8041AD0.h +++ b/include/dungeon_8041AD0.h @@ -94,15 +94,15 @@ void sub_8041EE8(Entity *pokemon); void sub_8041EF8(Entity *pokemon); void sub_8041F08(Entity *pokemon); void nullsub_90(Entity *pokemon); -void PlayOffensiveStatDownEffect(Entity *pokemon, struct StatIndex stat); -void PlayDefensiveStatDownEffect(Entity *pokemon, struct StatIndex stat); -void PlayOffensiveStatUpEffect(Entity *pokemon, struct StatIndex stat); -void PlayDefensiveStatUpEffect(Entity *pokemon, struct StatIndex stat); -void PlayOffensiveStatMultiplierUpEffect(Entity *pokemon, struct StatIndex stat); -void PlayOffensiveStatMultiplierDownEffect(Entity *pokemon, struct StatIndex stat); -void PlayDefensiveStatMultiplierUpEffect(Entity *pokemon, struct StatIndex stat); -void PlayDefensiveStatMultiplierDownEffect(Entity *pokemon, struct StatIndex stat); -void PlayHitChanceUpEffect(Entity *pokemon, struct StatIndex stat); +void PlayOffensiveStatDownEffect(Entity *pokemon, StatIndex stat); +void PlayDefensiveStatDownEffect(Entity *pokemon, StatIndex stat); +void PlayOffensiveStatUpEffect(Entity *pokemon, StatIndex stat); +void PlayDefensiveStatUpEffect(Entity *pokemon, StatIndex stat); +void PlayOffensiveStatMultiplierUpEffect(Entity *pokemon, StatIndex stat); +void PlayOffensiveStatMultiplierDownEffect(Entity *pokemon, StatIndex stat); +void PlayDefensiveStatMultiplierUpEffect(Entity *pokemon, StatIndex stat); +void PlayDefensiveStatMultiplierDownEffect(Entity *pokemon, StatIndex stat); +void PlayHitChanceUpEffect(Entity *pokemon, StatIndex stat); void PlayHitChanceDownEffect(Entity *pokemon, u32 r1); void sub_8042080(Entity *pokemon, u32 r1); void PlayCringeExclamationPointEffect(Entity *pokemon); diff --git a/include/move_orb_actions_1.h b/include/move_orb_actions_1.h index 1eedd7d1e..00218bb6c 100644 --- a/include/move_orb_actions_1.h +++ b/include/move_orb_actions_1.h @@ -80,7 +80,7 @@ bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI bool8 SureShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 CosmicPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); -extern const struct StatIndex gStatIndexAtkDef; -extern const struct StatIndex gStatIndexSpecial; +extern const StatIndex gStatIndexAtkDef; +extern const StatIndex gStatIndexSpecial; #endif /* ifndef GUARD_MOVE_ORB_ACTIONS_1_H */ diff --git a/include/move_orb_actions_2.h b/include/move_orb_actions_2.h index 393bd92f5..61d6f85c2 100644 --- a/include/move_orb_actions_2.h +++ b/include/move_orb_actions_2.h @@ -43,7 +43,7 @@ bool8 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 NaturePowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 EndureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); -bool8 DamageLowerDefMoveAction(Entity *pokemon, Entity *target, Move *move, struct StatIndex stat, u32 param_5); +bool8 DamageLowerDefMoveAction(Entity *pokemon, Entity *target, Move *move, StatIndex stat, u32 param_5); bool8 SonicboomMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 SelfDestructMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 ExplosionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); diff --git a/include/move_orb_actions_3.h b/include/move_orb_actions_3.h index d64b2c6b4..97d345459 100644 --- a/include/move_orb_actions_3.h +++ b/include/move_orb_actions_3.h @@ -42,7 +42,7 @@ bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId bool8 BellyDrumMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 HiJumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId,u8 param_5); bool8 JumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId,u8 param_5); -bool8 SteelWingMoveAction(Entity *pokemon, Entity *target, Move *move, struct StatIndex stat, u32 param_5); +bool8 SteelWingMoveAction(Entity *pokemon, Entity *target, Move *move, StatIndex stat, u32 param_5); bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 AmnesiaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 HandleColorChange(Entity *pokemon, Entity *target, Move *move, s32 itemId); diff --git a/include/move_orb_actions_4.h b/include/move_orb_actions_4.h index 3dd74248e..1c26e3be3 100644 --- a/include/move_orb_actions_4.h +++ b/include/move_orb_actions_4.h @@ -51,7 +51,7 @@ bool8 AttractMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) bool8 MimicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 FrustrationMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 LeechSeedMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); -bool8 MetalClawMoveAction(Entity * pokemon,Entity * target,Move *move, struct StatIndex stat, s32 param_5); +bool8 MetalClawMoveAction(Entity * pokemon,Entity * target,Move *move, StatIndex stat, s32 param_5); bool8 InvisifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 CalmMindMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 DefenseCurlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); diff --git a/include/move_orb_effects_1.h b/include/move_orb_effects_1.h index 61fdbf36f..aacb9f6c7 100644 --- a/include/move_orb_effects_1.h +++ b/include/move_orb_effects_1.h @@ -28,16 +28,16 @@ void IngrainedStatusTarget(Entity * pokemon, Entity * target); void WrapTarget(Entity * pokemon, Entity * target); void sub_8076CB4(s32 param_1); void PetrifiedStatusTarget(Entity * pokemon, Entity * target); -void LowerOffensiveStat(Entity *user, Entity *target, struct StatIndex stat, s32 nStages, bool8 checkProtected, bool8 logMsgProtected); -void LowerDefensiveStat(Entity *user, Entity *target, struct StatIndex stat, s32 nStages, bool8 checkProtected, bool8 logMsgProtected); -void BoostOffensiveStat(Entity *user, Entity *target, struct StatIndex stat, s32 nStages); -void BoostDefensiveStat(Entity *user, Entity *target, struct StatIndex stat, s32 nStages); +void LowerOffensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStages, bool8 checkProtected, bool8 logMsgProtected); +void LowerDefensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStages, bool8 checkProtected, bool8 logMsgProtected); +void BoostOffensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStages); +void BoostDefensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStages); u8 GetFlashFireStatus(Entity *pokemon); void ActivateFlashFire(Entity * pokemon, Entity *target); -void ApplyOffensiveStatMultiplier(Entity *user, Entity *target, struct StatIndex stat, s24_8 multiplier, bool8 displayMessage); -void ApplyDefensiveStatMultiplier(Entity *user, Entity *target, struct StatIndex stat, s24_8 multiplier, bool8 displayMessage); -void BoostHitChanceStat(Entity *user, Entity *target, struct StatIndex stat); -void LowerHitChanceStat(Entity *user, Entity *target, struct StatIndex stat, bool8 displayMessage); +void ApplyOffensiveStatMultiplier(Entity *user, Entity *target, StatIndex stat, s24_8 multiplier, bool8 displayMessage); +void ApplyDefensiveStatMultiplier(Entity *user, Entity *target, StatIndex stat, s24_8 multiplier, bool8 displayMessage); +void BoostHitChanceStat(Entity *user, Entity *target, StatIndex stat); +void LowerHitChanceStat(Entity *user, Entity *target, StatIndex stat, bool8 displayMessage); void TryInflictCringeStatus(Entity *user ,Entity *target, bool8 displayMessage); void TryInflictParalysisStatus(Entity *user, Entity *target, bool8 displayMessage); void BoostSpeed(Entity *user, Entity *target, s32 turns, bool8 displayMessage); diff --git a/include/structs/str_stat_index.h b/include/structs/str_stat_index.h index 3e8d5bcc2..1f3fa8400 100644 --- a/include/structs/str_stat_index.h +++ b/include/structs/str_stat_index.h @@ -7,9 +7,9 @@ #define STAT_INDEX_EVASION STAT_INDEX_SPECIAL // Needed to match in Blue/Sky. I wonder what was the reason for making it a struct as opposed to a simple int... -struct StatIndex +typedef struct StatIndex { int id; -}; +} StatIndex; #endif // GUARD_STR_STAT_INDEX_X diff --git a/src/dungeon_8041AD0.c b/src/dungeon_8041AD0.c index a5a5eda5b..b922a3712 100644 --- a/src/dungeon_8041AD0.c +++ b/src/dungeon_8041AD0.c @@ -840,7 +840,7 @@ void nullsub_90(Entity *pokemon) { } -void PlayOffensiveStatDownEffect(Entity *pokemon, struct StatIndex stat) +void PlayOffensiveStatDownEffect(Entity *pokemon, StatIndex stat) { if (stat.id == STAT_INDEX_PHYSICAL) { @@ -852,7 +852,7 @@ void PlayOffensiveStatDownEffect(Entity *pokemon, struct StatIndex stat) } } -void PlayDefensiveStatDownEffect(Entity *pokemon, struct StatIndex stat) +void PlayDefensiveStatDownEffect(Entity *pokemon, StatIndex stat) { if(stat.id == STAT_INDEX_PHYSICAL) { @@ -864,7 +864,7 @@ void PlayDefensiveStatDownEffect(Entity *pokemon, struct StatIndex stat) } } -void PlayOffensiveStatUpEffect(Entity *pokemon, struct StatIndex stat) +void PlayOffensiveStatUpEffect(Entity *pokemon, StatIndex stat) { if(stat.id == STAT_INDEX_PHYSICAL) { @@ -876,7 +876,7 @@ void PlayOffensiveStatUpEffect(Entity *pokemon, struct StatIndex stat) } } -void PlayDefensiveStatUpEffect(Entity *pokemon, struct StatIndex stat) +void PlayDefensiveStatUpEffect(Entity *pokemon, StatIndex stat) { if(stat.id == STAT_INDEX_PHYSICAL) { @@ -888,7 +888,7 @@ void PlayDefensiveStatUpEffect(Entity *pokemon, struct StatIndex stat) } } -void PlayOffensiveStatMultiplierUpEffect(Entity *pokemon, struct StatIndex stat) +void PlayOffensiveStatMultiplierUpEffect(Entity *pokemon, StatIndex stat) { if(stat.id == STAT_INDEX_PHYSICAL) { @@ -900,7 +900,7 @@ void PlayOffensiveStatMultiplierUpEffect(Entity *pokemon, struct StatIndex stat) } } -void PlayOffensiveStatMultiplierDownEffect(Entity *pokemon, struct StatIndex stat) +void PlayOffensiveStatMultiplierDownEffect(Entity *pokemon, StatIndex stat) { if (stat.id == STAT_INDEX_PHYSICAL) { @@ -912,7 +912,7 @@ void PlayOffensiveStatMultiplierDownEffect(Entity *pokemon, struct StatIndex sta } } -void PlayDefensiveStatMultiplierUpEffect(Entity *pokemon, struct StatIndex stat) +void PlayDefensiveStatMultiplierUpEffect(Entity *pokemon, StatIndex stat) { if (stat.id == STAT_INDEX_PHYSICAL) { @@ -924,7 +924,7 @@ void PlayDefensiveStatMultiplierUpEffect(Entity *pokemon, struct StatIndex stat) } } -void PlayDefensiveStatMultiplierDownEffect(Entity *pokemon, struct StatIndex stat) +void PlayDefensiveStatMultiplierDownEffect(Entity *pokemon, StatIndex stat) { if (stat.id == STAT_INDEX_PHYSICAL) { @@ -936,7 +936,7 @@ void PlayDefensiveStatMultiplierDownEffect(Entity *pokemon, struct StatIndex sta } } -void PlayHitChanceUpEffect(Entity *pokemon, struct StatIndex stat) +void PlayHitChanceUpEffect(Entity *pokemon, StatIndex stat) { if(stat.id == STAT_INDEX_ACCURACY) { diff --git a/src/move_orb_actions_1.c b/src/move_orb_actions_1.c index 61461bf59..f2e979ae2 100644 --- a/src/move_orb_actions_1.c +++ b/src/move_orb_actions_1.c @@ -38,8 +38,8 @@ #include "move_orb_effects_4.h" #include "move_orb_effects_5.h" -const struct StatIndex gStatIndexAtkDef = {.id = STAT_INDEX_PHYSICAL}; -const struct StatIndex gStatIndexSpecial = {.id = STAT_INDEX_SPECIAL}; +const StatIndex gStatIndexAtkDef = {.id = STAT_INDEX_PHYSICAL}; +const StatIndex gStatIndexSpecial = {.id = STAT_INDEX_SPECIAL}; bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) { diff --git a/src/move_orb_actions_2.c b/src/move_orb_actions_2.c index 50e7ecfdf..9332480c6 100644 --- a/src/move_orb_actions_2.c +++ b/src/move_orb_actions_2.c @@ -140,7 +140,7 @@ bool8 PsywaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) return flag; } -bool8 DamageLowerDefMoveAction(Entity *pokemon, Entity *target, Move *move, struct StatIndex stat, u32 param_5) +bool8 DamageLowerDefMoveAction(Entity *pokemon, Entity *target, Move *move, StatIndex stat, u32 param_5) { bool8 flag; diff --git a/src/move_orb_actions_3.c b/src/move_orb_actions_3.c index 34ca970b0..569d8bc93 100644 --- a/src/move_orb_actions_3.c +++ b/src/move_orb_actions_3.c @@ -450,7 +450,7 @@ bool8 SuperpowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 item return flag; } -bool8 SteelWingMoveAction(Entity *pokemon, Entity *target, Move *move, struct StatIndex stat, u32 param_5) +bool8 SteelWingMoveAction(Entity *pokemon, Entity *target, Move *move, StatIndex stat, u32 param_5) { EntityInfo *entityInfo; bool8 flag; diff --git a/src/move_orb_actions_4.c b/src/move_orb_actions_4.c index d89d9701f..7490f8a30 100644 --- a/src/move_orb_actions_4.c +++ b/src/move_orb_actions_4.c @@ -113,7 +113,7 @@ bool8 HiddenPowerMoveAction(Entity * pokemon,Entity * target,Move *move, s32 ite return TRUE; } -bool8 MetalClawMoveAction(Entity * pokemon,Entity * target,Move *move, struct StatIndex stat, s32 param_5) +bool8 MetalClawMoveAction(Entity * pokemon,Entity * target,Move *move, StatIndex stat, s32 param_5) { EntityInfo *entityInfo; bool8 flag; diff --git a/src/move_orb_effects_1.c b/src/move_orb_effects_1.c index b7eb5addf..7cac41669 100644 --- a/src/move_orb_effects_1.c +++ b/src/move_orb_effects_1.c @@ -851,7 +851,7 @@ void PetrifiedStatusTarget(Entity * pokemon, Entity * target) } } -void LowerOffensiveStat(Entity *user, Entity *target, struct StatIndex stat, s32 nStages, bool8 checkProtected, bool8 logMsgProtected) +void LowerOffensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStages, bool8 checkProtected, bool8 logMsgProtected) { EntityInfo *entityInfo; s32 newStage; @@ -910,7 +910,7 @@ void LowerOffensiveStat(Entity *user, Entity *target, struct StatIndex stat, s32 UpdateStatusIconFlags(target); } -void LowerDefensiveStat(Entity *user, Entity *target, struct StatIndex stat, s32 nStages, bool8 checkProtected, bool8 logMsgProtected) +void LowerDefensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStages, bool8 checkProtected, bool8 logMsgProtected) { EntityInfo *entityInfo; s32 newStage; @@ -957,7 +957,7 @@ void LowerDefensiveStat(Entity *user, Entity *target, struct StatIndex stat, s32 UpdateStatusIconFlags(target); } -void BoostOffensiveStat(Entity *user, Entity *target, struct StatIndex stat, s32 nStages) +void BoostOffensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStages) { EntityInfo *entityInfo; s32 newStage; @@ -998,7 +998,7 @@ void BoostOffensiveStat(Entity *user, Entity *target, struct StatIndex stat, s32 UpdateStatusIconFlags(target); } -void BoostDefensiveStat(Entity *user, Entity *target, struct StatIndex stat, s32 nStages) +void BoostDefensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStages) { EntityInfo *entityInfo; s32 newStage; @@ -1072,7 +1072,7 @@ void ActivateFlashFire(Entity * pokemon, Entity *target) } } -void ApplyOffensiveStatMultiplier(Entity *user, Entity *target, struct StatIndex stat, s24_8 multiplier, bool8 displayMessage) +void ApplyOffensiveStatMultiplier(Entity *user, Entity *target, StatIndex stat, s24_8 multiplier, bool8 displayMessage) { EntityInfo *entityInfo; s24_8 oldMulti; @@ -1139,7 +1139,7 @@ void ApplyOffensiveStatMultiplier(Entity *user, Entity *target, struct StatIndex UpdateStatusIconFlags(target); } -void ApplyDefensiveStatMultiplier(Entity *user, Entity *target, struct StatIndex stat, s24_8 multiplier, bool8 displayMessage) +void ApplyDefensiveStatMultiplier(Entity *user, Entity *target, StatIndex stat, s24_8 multiplier, bool8 displayMessage) { EntityInfo *entityInfo; s24_8 oldMulti; @@ -1190,7 +1190,7 @@ void ApplyDefensiveStatMultiplier(Entity *user, Entity *target, struct StatIndex UpdateStatusIconFlags(target); } -void BoostHitChanceStat(Entity *user, Entity *target, struct StatIndex stat) +void BoostHitChanceStat(Entity *user, Entity *target, StatIndex stat) { EntityInfo *entityInfo; @@ -1217,7 +1217,7 @@ void BoostHitChanceStat(Entity *user, Entity *target, struct StatIndex stat) UpdateStatusIconFlags(target); } -void LowerHitChanceStat(Entity *user, Entity *target, struct StatIndex stat, bool8 displayMessage) +void LowerHitChanceStat(Entity *user, Entity *target, StatIndex stat, bool8 displayMessage) { EntityInfo *entityInfo;