From 5e79fcd5b42499d320108faab8cdaa69841f214b Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 19 Feb 2024 14:42:56 -0300 Subject: [PATCH] Added FREE_EXTRA_SEEN_FLAGS to Pokedex struct (#4213) * Added FREE_EXTRA_SEEN_FLAGS to Pokedex struct * Fixed SaveBlock1 comment (please squash) * Separated FREE_EXTRA_SEEN_FLAGS for each SaveBlock --- include/config/save.h | 7 ++++--- include/global.h | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/config/save.h b/include/config/save.h index 46ebe39cad..bf89bae9fb 100644 --- a/include/config/save.h +++ b/include/config/save.h @@ -2,7 +2,7 @@ #define GUARD_CONFIG_SAVE_H // SaveBlock1 configs -#define FREE_EXTRA_SEEN_FLAGS FALSE // Free up unused Pokédex seen flags (52 bytes). +#define FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK1 FALSE // Free up unused Pokédex seen flags (52 bytes). #define FREE_TRAINER_HILL FALSE // Frees up Trainer Hill data (28 bytes). #define FREE_MYSTERY_EVENT_BUFFERS FALSE // Frees up ramScript (1104 bytes). #define FREE_MATCH_CALL FALSE // Frees up match call and rematch data. (104 bytes). @@ -15,8 +15,9 @@ #define FREE_BATTLE_TOWER_E_READER FALSE // Frees up Battle Tower E-Reader data (188 bytes). #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). - // SaveBlock2 total: 1166 bytes +#define FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK2 FALSE // Free up unused Pokédex seen flags (108 bytes). + // SaveBlock2 total: 1274 bytes - // Grand Total: 3682 + // Grand Total: 3790 #endif // GUARD_CONFIG_SAVE_H diff --git a/include/global.h b/include/global.h index fac78b0eed..83bff49c0c 100644 --- a/include/global.h +++ b/include/global.h @@ -190,7 +190,9 @@ struct Pokedex /*0x04*/ u32 unownPersonality; // set when you first see Unown /*0x08*/ u32 spindaPersonality; // set when you first see Spinda /*0x0C*/ u32 unknown3; +#if FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK2 == FALSE /*0x10*/ u8 filler[0x68]; // Previously Dex Flags, feel free to remove. +#endif //FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK2 }; struct PokemonJumpRecords @@ -997,9 +999,9 @@ struct SaveBlock1 /*0x690*/ struct ItemSlot bagPocket_TMHM[BAG_TMHM_COUNT]; /*0x790*/ struct ItemSlot bagPocket_Berries[BAG_BERRIES_COUNT]; /*0x848*/ struct Pokeblock pokeblocks[POKEBLOCKS_COUNT]; -#if FREE_EXTRA_SEEN_FLAGS == FALSE +#if FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK1 == FALSE /*0x988*/ u8 filler1[0x34]; // Previously Dex Flags, feel free to remove. -#endif //FREE_EXTRA_SEEN_FLAGS +#endif //FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK1 /*0x9BC*/ u16 berryBlenderRecords[3]; /*0x9C2*/ u8 unused_9C2[6]; #if FREE_MATCH_CALL == FALSE