From 27a65a59619fe22a611a07342e2f80654dd0edef Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Fri, 2 Feb 2024 13:46:19 +0100 Subject: [PATCH] Fix FREE_RECORD_MIXING_HALL_RECORDS --- include/config/save.h | 2 +- src/record_mixing.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/config/save.h b/include/config/save.h index c00b559c9b..c4d458432d 100644 --- a/include/config/save.h +++ b/include/config/save.h @@ -13,7 +13,7 @@ //free saveblock 2 defines #define FREE_BATTLE_TOWER_E_READER FALSE //frees up battle tower e reader trainer data. 188 bytes. WARNING THIS HAS BEEN SHOWN TO BREAK THE POKÉ MARTS' QUESTIONNAIRE #define FREE_POKEMON_JUMP FALSE // Frees up Pokémon Jump data (16 bytes). -#define FREE_RECORD_MIXING_HALL_RECORDS FALSE //frees up hall records for record mixing. 1032 bytes +#define FREE_RECORD_MIXING_HALL_RECORDS FALSE // Frees up hall records for record mixing (1032 bytes). // saveblock2 total: 1236 bytes //grand total: 3082 diff --git a/src/record_mixing.c b/src/record_mixing.c index dc02cf7a48..7d78119f86 100644 --- a/src/record_mixing.c +++ b/src/record_mixing.c @@ -97,7 +97,9 @@ static void *sApprenticesSave; static void *sBattleTowerSave_Duplicate; static u32 sRecordStructSize; static u8 sDaycareMailRandSum; +#if FREE_RECORD_MIXING_HALL_RECORDS == FALSE static struct PlayerHallRecords *sPartnerHallRecords[HALL_RECORDS_COUNT]; +#endif //FREE_RECORD_MIXING_HALL_RECORDS static EWRAM_DATA struct RecordMixingDaycareMail sRecordMixMail = {0}; static EWRAM_DATA union PlayerRecord *sReceivedRecords = NULL; @@ -1198,9 +1200,9 @@ static void ReceiveApprenticeData(struct Apprentice *records, size_t recordSize, } } +#if FREE_RECORD_MIXING_HALL_RECORDS == FALSE static void GetNewHallRecords(struct RecordMixingHallRecords *dst, void *records, size_t recordSize, u32 multiplayerId, s32 linkPlayerCount) { -#if FREE_RECORD_MIXING_HALL_RECORDS == FALSE s32 i, j, k, l; s32 repeatTrainers; @@ -1276,7 +1278,6 @@ static void GetNewHallRecords(struct RecordMixingHallRecords *dst, void *records dst->hallRecords2P[j][k + HALL_RECORDS_COUNT] = sPartnerHallRecords[k]->twoPlayers[j]; } } -#endif //FREE_RECORD_MIXING_HALL_RECORDS } static void FillWinStreakRecords1P(struct RankingHall1P *playerRecords, struct RankingHall1P *mixRecords) @@ -1337,7 +1338,6 @@ static void FillWinStreakRecords2P(struct RankingHall2P *playerRecords, struct R static void SaveHighestWinStreakRecords(struct RecordMixingHallRecords *mixHallRecords) { -#if FREE_RECORD_MIXING_HALL_RECORDS == FALSE s32 i, j; for (i = 0; i < HALL_FACILITIES_COUNT; i++) @@ -1348,8 +1348,8 @@ static void SaveHighestWinStreakRecords(struct RecordMixingHallRecords *mixHallR for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) FillWinStreakRecords2P(gSaveBlock2Ptr->hallRecords2P[j], mixHallRecords->hallRecords2P[j]); -#endif //FREE_RECORD_MIXING_HALL_RECORDS } +#endif //FREE_RECORD_MIXING_HALL_RECORDS static void ReceiveRankingHallRecords(struct PlayerHallRecords *records, size_t recordSize, u32 multiplayerId) {