Skip to content

Commit

Permalink
Format the source tree with clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
lhearachel committed Apr 4, 2024
1 parent 5db7224 commit f84d7a0
Show file tree
Hide file tree
Showing 2,673 changed files with 108,410 additions and 157,145 deletions.
2 changes: 1 addition & 1 deletion include/battle/ai_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ typedef struct AIContext {
int padding0014; // this does not match with a u32, weird

u8 moveDamageRolls[LEARNED_MOVES_MAX];

u16 battlerMoves[MAX_BATTLERS][LEARNED_MOVES_MAX];
u8 battlerAbilities[MAX_BATTLERS];
u16 battlerHeldItems[MAX_BATTLERS];
Expand Down
14 changes: 7 additions & 7 deletions include/battle/battle_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ struct BattleContext {
int sideEffectFlags;
int sideEffectMon;
int lastBattlerId;

int gainedExp;
int sharedExp;
u32 sideGetExpMask[2];
Expand Down Expand Up @@ -197,13 +197,13 @@ struct BattleContext {

BattleScriptTaskData *taskData;
void *tmpData;

u32 fieldConditionsMask;
FieldConditions fieldConditions;

u32 sideConditionsMask[NUM_BATTLE_SIDES];
SideConditions sideConditions[NUM_BATTLE_SIDES];

TurnFlags turnFlags[MAX_BATTLERS];
SelfTurnFlags selfTurnFlags[MAX_BATTLERS];
MoveFailFlags moveFailFlags[MAX_BATTLERS];
Expand All @@ -214,7 +214,7 @@ struct BattleContext {

u32 battleStatusMask;
u32 battleStatusMask2;

int damage;
int hitDamage;
int criticalBoosts;
Expand Down Expand Up @@ -243,12 +243,12 @@ struct BattleContext {
u8 selectedPartySlot[MAX_BATTLERS];
u8 switchedPartySlot[MAX_BATTLERS];
u8 aiSwitchedPartySlot[MAX_BATTLERS];

u32 battlerActions[MAX_BATTLERS][MAX_BATTLE_ACTIONS];
u8 battlerActionOrder[MAX_BATTLERS];
u8 monSpeedOrder[MAX_BATTLERS];
u32 monSpeedValues[MAX_BATTLERS];

u8 ioQueue[MAX_LINK_BATTLERS][MAX_BATTLERS][BATTLE_IO_QUEUE_SIZE];
u8 ioBuffer[MAX_BATTLERS][BATTLE_IO_BUFFER_SIZE];
int battleScript[BATTLE_SCRIPT_SIZE_MAX];
Expand Down Expand Up @@ -282,7 +282,7 @@ struct BattleContext {
u16 padding310A;

u16 speedRand[MAX_BATTLERS];

int flingTemp;
int flingScript;

Expand Down
34 changes: 17 additions & 17 deletions include/battle/battle_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,50 +92,50 @@ enum {

/**
* @brief Create a new BattleContext struct from the given BattleSystem.
*
*
* The context itself will be initialized along with its state-counters, its AI
* context, the move data table, and the item data table. Memory for the new
* structure will always be allocated from the Battle heap.
*
* @param battleSys
*
* @param battleSys
* @return Address of the newly-allocated BattleContext struct.
*/
void* BattleContext_New(BattleSystem *battleSys);
void *BattleContext_New(BattleSystem *battleSys);

/**
* @brief Main executor for the battle state machine.
*
*
* If the battle is deemed to not yet be complete, then a command will be
* loaded from the parent context struct and the respective state machine
* function will be invoked.
*
*
* For the sequence of states in the machine, see enum BattleControlSequence.
*
* @param battleSys
* @param battleCtx
*
* @param battleSys
* @param battleCtx
* @return TRUE if the battle for this state machine is complete; FALSE
* otherwise.
*/
BOOL BattleController_Main(BattleSystem *battleSys, BattleContext *battleCtx);

/**
* @brief Free the child memory blocks allocated for a BattleContext struct.
*
* @param battleCtx
*
* @param battleCtx
*/
void BattleContext_Free(BattleContext *battleCtx);

/**
* @brief Determine if a move used by the attacking battler will hit its target.
*
*
* This routine will account for both the standard accuracy formula and any
* effects which would otherwise override that formula. Move status flags will
* be updated with information about the move's result.
*
* @param battleSys
* @param battleCtx
* @param attacker
* @param defender
*
* @param battleSys
* @param battleCtx
* @param attacker
* @param defender
* @param move
*/
void BattleController_CheckMoveHit(BattleSystem *battleSys, BattleContext *battleCtx, int attacker, int defender, int move);
Expand Down
156 changes: 78 additions & 78 deletions include/battle/battle_display.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,121 +41,121 @@
#include "overlay016/struct_ov16_022674C4.h"
#include "overlay016/struct_ov16_0226C378.h"

void ov16_0225CBB8(BattleSystem * param0, BattlerData * param1);
void ov16_0225CBDC(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C168 * param2);
void ov16_0225CE1C(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C17C * param2);
void ov16_0225CF70(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C17C * param2);
void ov16_0225D118(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_02264EF8 * param2);
void ov16_0225D1C4(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_02265050 * param2);
void ov16_0225D228(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_02265124 * param2);
void ov16_0225D360(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_02265154 * param2);
void ov16_0225D3CC(BattleSystem * param0, BattlerData * param1);
void ov16_0225D414(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_022651A8 * param2);
void ov16_0225CBB8(BattleSystem *param0, BattlerData *param1);
void ov16_0225CBDC(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C168 *param2);
void ov16_0225CE1C(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C17C *param2);
void ov16_0225CF70(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C17C *param2);
void ov16_0225D118(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_02264EF8 *param2);
void ov16_0225D1C4(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_02265050 *param2);
void ov16_0225D228(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_02265124 *param2);
void ov16_0225D360(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_02265154 *param2);
void ov16_0225D3CC(BattleSystem *param0, BattlerData *param1);
void ov16_0225D414(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_022651A8 *param2);

/**
* @brief Slide the healthbar into the screen.
*
* @param battleSys
* @param battlerData
* @param healthbarData
*
* @param battleSys
* @param battlerData
* @param healthbarData
*/
void BattleDisplay_SlideHealthbarIn(BattleSystem *battleSys, BattlerData *battlerData, HealthbarData *healthbarData);

/**
* @brief Slide the healthbar out of the screen.
*
* @param battleSys
* @param battlerData
*
* @param battleSys
* @param battlerData
*/
void BattleDisplay_SlideHealthbarOut(BattleSystem *battleSys, BattlerData *battlerData);
void ov16_0225D5B8(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C260 * param2);
void ov16_0225D698(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_022656F0 * param2);
void ov16_0225D708(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C29C * param2);
void ov16_0225D794(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C2B0 * param2);
void ov16_0225D840(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C2C4 * param2);
void ov16_0225D8AC(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C2D8 * param2);
void ov16_0225D8F0(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C2EC * param2);
void ov16_0225D5B8(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C260 *param2);
void ov16_0225D698(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_022656F0 *param2);
void ov16_0225D708(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C29C *param2);
void ov16_0225D794(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C2B0 *param2);
void ov16_0225D840(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C2C4 *param2);
void ov16_0225D8AC(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C2D8 *param2);
void ov16_0225D8F0(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C2EC *param2);

/**
* @brief Print a message to the screen.
*
*
* @param battleSys
* @param battlerData
* @param battleMsg
*/
void BattleDisplay_PrintMessage(BattleSystem *battleSys, BattlerData *battlerData, BattleMessage *battleMsg);
void ov16_0225D9A8(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_02265BBC * param2);
void ov16_0225DA44(BattleSystem * param0, BattlerData * param1);
void ov16_0225DA74(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C35C * param2);
void ov16_0225DB00(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C370 * param2);
void ov16_0225DB74(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C384 * param2);
void ov16_0225DC4C(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C398 * param2);
void ov16_0225DC7C(BattleSystem * param0, BattlerData * param1);
void ov16_0225DCB0(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C3BC * param2);
void ov16_0225DD44(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C3D0 * param2);
void ov16_0225DD7C(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C3E4 * param2);
void ov16_0225DDD8(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C3F8 * param2);
void ov16_0225DE30(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C40C * param2);
void ov16_0225DE88(BattleSystem * param0, BattlerData * param1);
void ov16_0225DEDC(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C430 * param2);
void ov16_0225DF34(BattleSystem * param0, BattlerData * param1);
void ov16_0225DF6C(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C454 * param2);
void ov16_0225E008(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C468 * param2);
void ov16_0225E0BC(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C65C * param2);
void ov16_0225E0F4(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_022664F8 * param2);
void ov16_0225D9A8(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_02265BBC *param2);
void ov16_0225DA44(BattleSystem *param0, BattlerData *param1);
void ov16_0225DA74(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C35C *param2);
void ov16_0225DB00(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C370 *param2);
void ov16_0225DB74(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C384 *param2);
void ov16_0225DC4C(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C398 *param2);
void ov16_0225DC7C(BattleSystem *param0, BattlerData *param1);
void ov16_0225DCB0(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C3BC *param2);
void ov16_0225DD44(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C3D0 *param2);
void ov16_0225DD7C(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C3E4 *param2);
void ov16_0225DDD8(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C3F8 *param2);
void ov16_0225DE30(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C40C *param2);
void ov16_0225DE88(BattleSystem *param0, BattlerData *param1);
void ov16_0225DEDC(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C430 *param2);
void ov16_0225DF34(BattleSystem *param0, BattlerData *param1);
void ov16_0225DF6C(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C454 *param2);
void ov16_0225E008(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C468 *param2);
void ov16_0225E0BC(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C65C *param2);
void ov16_0225E0F4(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_022664F8 *param2);

/**
* @brief Show the start-of-battle party gauge.
*
* @param battleSys
* @param battlerData
* @param partyGauge
*
* @param battleSys
* @param battlerData
* @param partyGauge
*/
void BattleDisplay_ShowBattleStartPartyGauge(BattleSystem *battleSys, BattlerData *battlerData, PartyGaugeData *partyGauge);

/**
* @brief Hide the start-of-battle party gauge.
*
* @param battleSys
* @param battlerData
* @param partyGauge
*
* @param battleSys
* @param battlerData
* @param partyGauge
*/
void BattleDisplay_HideBattleStartPartyGauge(BattleSystem *battleSys, BattlerData *battlerData, PartyGaugeData *partyGauge);

/**
* @brief Show the mid-battle party gauge.
*
* @param battleSys
* @param battlerData
* @param partyGauge
*
* @param battleSys
* @param battlerData
* @param partyGauge
*/
void BattleDisplay_ShowPartyGauge(BattleSystem *battleSys, BattlerData *battlerData, PartyGaugeData *partyGauge);

/**
* @brief Hide the mid-battle party gauge.
*
* @param battleSys
* @param battlerData
* @param partyGauge
*
* @param battleSys
* @param battlerData
* @param partyGauge
*/
void BattleDisplay_HidePartyGauge(BattleSystem *battleSys, BattlerData *battlerData, PartyGaugeData *partyGauge);
void ov16_0225E23C(BattleSystem * param0, BattlerData * param1);
void ov16_0225E294(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_02265BBC * param2);
void ov16_0225E2C8(BattleSystem * param0, BattlerData * param1);
void ov16_0225E300(BattleSystem * param0, BattlerData * param1);
void ov16_0225E338(BattleSystem * param0, BattlerData * param1);
void ov16_0225E38C(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225C9F0 * param2);
void ov16_0225E3E0(BattleSystem * param0, BattlerData * param1);
void ov16_0225E434(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_02265BBC * param2);
void ov16_0225E468(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225CA4C * param2);
void ov16_0225E4C8(BattleSystem * param0, BattlerData * param1, UnkStruct_ov16_0225CA60 * param2);
void ov16_02263730(BattleSystem * param0, BattlerData * param1);
u8 Battler_Type(BattlerData * param0);
u8 Battler_BootState(BattlerData * param0);
Sprite * ov16_02263AFC(BattlerData * param0);
Healthbar * ov16_02263B08(BattlerData * param0);
UnkStruct_ov16_0226C378 * ov16_02263B0C(BattlerData * param0);
void ov16_02263B10(BattlerData * param0);
void ov16_02263B20(BattlerData * param0, int param1);
void ov16_0225E23C(BattleSystem *param0, BattlerData *param1);
void ov16_0225E294(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_02265BBC *param2);
void ov16_0225E2C8(BattleSystem *param0, BattlerData *param1);
void ov16_0225E300(BattleSystem *param0, BattlerData *param1);
void ov16_0225E338(BattleSystem *param0, BattlerData *param1);
void ov16_0225E38C(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225C9F0 *param2);
void ov16_0225E3E0(BattleSystem *param0, BattlerData *param1);
void ov16_0225E434(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_02265BBC *param2);
void ov16_0225E468(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225CA4C *param2);
void ov16_0225E4C8(BattleSystem *param0, BattlerData *param1, UnkStruct_ov16_0225CA60 *param2);
void ov16_02263730(BattleSystem *param0, BattlerData *param1);
u8 Battler_Type(BattlerData *param0);
u8 Battler_BootState(BattlerData *param0);
Sprite *ov16_02263AFC(BattlerData *param0);
Healthbar *ov16_02263B08(BattlerData *param0);
UnkStruct_ov16_0226C378 *ov16_02263B0C(BattlerData *param0);
void ov16_02263B10(BattlerData *param0);
void ov16_02263B20(BattlerData *param0, int param1);

#endif // POKEPLATINUM_OV16_0225CBB8_H
Loading

0 comments on commit f84d7a0

Please sign in to comment.