From e838a7d13689e08398ff40353a7c8ba3b98ecd12 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Mon, 19 Feb 2024 10:31:10 -0300 Subject: [PATCH 1/3] Added FREE_EXTRA_SEEN_FLAGS to Pokedex struct --- include/config/save.h | 6 ++++-- include/global.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/config/save.h b/include/config/save.h index 46ebe39cadee..f6d7ccf679a7 100644 --- a/include/config/save.h +++ b/include/config/save.h @@ -2,7 +2,6 @@ #define GUARD_CONFIG_SAVE_H // SaveBlock1 configs -#define FREE_EXTRA_SEEN_FLAGS 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). @@ -16,7 +15,10 @@ #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 +// Multiple SaveBlock configs +#define FREE_EXTRA_SEEN_FLAGS FALSE // Free up unused Pokédex seen flags (SaveBlock1: 52 bytes, SaveBlock2: 108 bytes). + // SaveBlock1/2 total: 160 bytes - // Grand Total: 3682 + // Grand Total: 3790 #endif // GUARD_CONFIG_SAVE_H diff --git a/include/global.h b/include/global.h index fac78b0eedc5..873fdf6b2727 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 == FALSE /*0x10*/ u8 filler[0x68]; // Previously Dex Flags, feel free to remove. +#endif //FREE_EXTRA_SEEN_FLAGS }; struct PokemonJumpRecords From c506f7da4137bd5439fcf7b7e5c812b245d62d66 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Mon, 19 Feb 2024 10:48:41 -0300 Subject: [PATCH 2/3] Fixed SaveBlock1 comment (please squash) --- include/config/save.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/config/save.h b/include/config/save.h index f6d7ccf679a7..d81520c1a308 100644 --- a/include/config/save.h +++ b/include/config/save.h @@ -9,7 +9,7 @@ #define FREE_ENIGMA_BERRY FALSE // Frees up E-Reader Enigma Berry data (52 bytes). #define FREE_LINK_BATTLE_RECORDS FALSE // Frees up link battle record data (88 bytes). #define FREE_MYSTERY_GIFT FALSE // Frees up Mystery Gift data (876 bytes). - // SaveBlock1 total: 2516 bytes + // SaveBlock1 total: 2464 bytes // SaveBlock2 configs #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). From 1c5bd39785956f832fd52d9478ec07b1153c91f4 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Mon, 19 Feb 2024 10:55:25 -0300 Subject: [PATCH 3/3] Separated FREE_EXTRA_SEEN_FLAGS for each SaveBlock --- include/config/save.h | 9 ++++----- include/global.h | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/config/save.h b/include/config/save.h index d81520c1a308..bf89bae9fbaa 100644 --- a/include/config/save.h +++ b/include/config/save.h @@ -2,6 +2,7 @@ #define GUARD_CONFIG_SAVE_H // SaveBlock1 configs +#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). @@ -9,15 +10,13 @@ #define FREE_ENIGMA_BERRY FALSE // Frees up E-Reader Enigma Berry data (52 bytes). #define FREE_LINK_BATTLE_RECORDS FALSE // Frees up link battle record data (88 bytes). #define FREE_MYSTERY_GIFT FALSE // Frees up Mystery Gift data (876 bytes). - // SaveBlock1 total: 2464 bytes + // SaveBlock1 total: 2516 bytes // SaveBlock2 configs #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 -// Multiple SaveBlock configs -#define FREE_EXTRA_SEEN_FLAGS FALSE // Free up unused Pokédex seen flags (SaveBlock1: 52 bytes, SaveBlock2: 108 bytes). - // SaveBlock1/2 total: 160 bytes +#define FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK2 FALSE // Free up unused Pokédex seen flags (108 bytes). + // SaveBlock2 total: 1274 bytes // Grand Total: 3790 diff --git a/include/global.h b/include/global.h index 873fdf6b2727..83bff49c0c95 100644 --- a/include/global.h +++ b/include/global.h @@ -190,9 +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 == FALSE +#if FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK2 == FALSE /*0x10*/ u8 filler[0x68]; // Previously Dex Flags, feel free to remove. -#endif //FREE_EXTRA_SEEN_FLAGS +#endif //FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK2 }; struct PokemonJumpRecords @@ -999,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