Standarized use of star in pointer types

This commit is contained in:
Eduardo Quezada
2022-07-29 10:17:58 -04:00
parent 9caca17064
commit 7b3401ee27
94 changed files with 524 additions and 524 deletions
+6 -6
View File
@@ -996,7 +996,7 @@ static bool8 ChooseSpecialBattleTowerTrainer(void)
winStreak = GetCurrentBattleTowerWinStreak(lvlMode, battleMode);
for (i = 0; i < BATTLE_TOWER_RECORD_COUNT; i++)
{
u32 *record = (u32*)(&gSaveBlock2Ptr->frontier.towerRecords[i]);
u32 *record = (u32 *)(&gSaveBlock2Ptr->frontier.towerRecords[i]);
u32 recordHasData = 0;
u32 checksum = 0;
for (j = 0; j < (sizeof(struct EmeraldBattleTowerRecord) - 4) / 4; j++) // - 4, because of the last field being the checksum itself.
@@ -2374,7 +2374,7 @@ static void LoadMultiPartnerCandidatesData(void)
r10 = 0;
for (i = 0; i < BATTLE_TOWER_RECORD_COUNT; i++)
{
u32 *record = (u32*)(&gSaveBlock2Ptr->frontier.towerRecords[i]);
u32 *record = (u32 *)(&gSaveBlock2Ptr->frontier.towerRecords[i]);
u32 recordHasData = 0;
u32 checksum = 0;
for (j = 0; j < (sizeof(struct EmeraldBattleTowerRecord) - 4) / 4; j++) // - 4, because of the last field being the checksum itself.
@@ -2690,7 +2690,7 @@ static void SetTowerInterviewData(void)
static void ValidateBattleTowerRecordChecksums(void)
{
s32 i, j;
u32 *record = (u32*)(&gSaveBlock2Ptr->frontier.towerPlayer);
u32 *record = (u32 *)(&gSaveBlock2Ptr->frontier.towerPlayer);
u32 checksum = 0;
for (j = 0; j < (sizeof(struct EmeraldBattleTowerRecord) - 4) / 4; j++) // - 4, because of the last field being the checksum itself.
@@ -2702,7 +2702,7 @@ static void ValidateBattleTowerRecordChecksums(void)
for (i = 0; i < BATTLE_TOWER_RECORD_COUNT; i++)
{
record = (u32*)(&gSaveBlock2Ptr->frontier.towerRecords[i]);
record = (u32 *)(&gSaveBlock2Ptr->frontier.towerRecords[i]);
checksum = 0;
for (j = 0; j < (sizeof(struct EmeraldBattleTowerRecord) - 4) / 4; j++) // - 4, because of the last field being the checksum itself.
{
@@ -3195,7 +3195,7 @@ static void ValidateApprenticesChecksums(void)
for (i = 0; i < APPRENTICE_COUNT; i++)
{
u32 *data = (u32*) &gSaveBlock2Ptr->apprentices[i];
u32 *data = (u32 *) &gSaveBlock2Ptr->apprentices[i];
u32 checksum = 0;
for (j = 0; j < (sizeof(struct Apprentice) - 4) / 4; j++)
checksum += data[j];
@@ -3504,7 +3504,7 @@ u8 FacilityClassToGraphicsId(u8 facilityClass)
bool32 ValidateBattleTowerRecord(u8 recordId) // unused
{
s32 i;
u32 *record = (u32*)(&gSaveBlock2Ptr->frontier.towerRecords[recordId]);
u32 *record = (u32 *)(&gSaveBlock2Ptr->frontier.towerRecords[recordId]);
u32 checksum = 0;
u32 hasData = 0;
for (i = 0; i < (sizeof(struct EmeraldBattleTowerRecord) - 4) / 4; i++) // - 4, because of the last fjeld bejng the checksum jtself.