diff --git a/include/config/save.h b/include/config/save.h index 8bd3fb5b5b..43680cdf89 100644 --- a/include/config/save.h +++ b/include/config/save.h @@ -7,7 +7,7 @@ #define FREE_MYSTERY_EVENT_BUFFERS FALSE //frees up mystery event and ramScript. roughly 1880 bytes Needed by FREE_BATTLE_TOWER_E_READER #define FREE_MATCH_CALL FALSE // Frees up match call and rematch data. (104 bytes). #define FREE_UNION_ROOM_CHAT FALSE // Frees up union room chat (212 bytes). -#define FREE_ENIGMA_BERRY FALSE //frees up enigma berry. 52 bytes +#define FREE_ENIGMA_BERRY FALSE // Frees up E-Reader Enigma Berry data (52 bytes). #define FREE_LINK_BATTLE_RECORDS FALSE //frees link battle record data. 88 bytes // saveblock1 total: 1846 bytes //free saveblock 2 defines diff --git a/src/berry.c b/src/berry.c index facd5734db..efa5ee9bbe 100644 --- a/src/berry.c +++ b/src/berry.c @@ -15,7 +15,6 @@ #include "constants/event_object_movement.h" #include "constants/items.h" -static u32 GetEnigmaBerryChecksum(struct EnigmaBerry *enigmaBerry); static u16 BerryTypeToItemId(u16 berry); static u8 BerryTreeGetNumStagesWatered(struct BerryTree *tree); static u8 GetNumStagesWateredByBerryTreeId(u8 id); @@ -1678,9 +1677,9 @@ void SetEnigmaBerry(u8 *src) #endif //FREE_ENIGMA_BERRY } +#if FREE_ENIGMA_BERRY == FALSE static u32 GetEnigmaBerryChecksum(struct EnigmaBerry *enigmaBerry) { -#if FREE_ENIGMA_BERRY == FALSE u32 i; u32 checksum; u8 *dest; @@ -1691,10 +1690,8 @@ static u32 GetEnigmaBerryChecksum(struct EnigmaBerry *enigmaBerry) checksum += dest[i]; return checksum; -#else - return 0; -#endif //FREE_ENIGMA_BERRY } +#endif //FREE_ENIGMA_BERRY bool32 IsEnigmaBerryValid(void) {