diff --git a/include/global.berry.h b/include/global.berry.h index 4b9ca644c..a77da20ba 100644 --- a/include/global.berry.h +++ b/include/global.berry.h @@ -46,10 +46,6 @@ struct EnigmaBerry u8 holdEffect; u8 holdEffectParam; u32 checksum; - u8 pic[(6 * 6) * TILE_SIZE_4BPP]; - u16 palette[16]; - u8 description1[45]; - u8 description2[45]; }; struct BattleEnigmaBerry diff --git a/ld_script.txt b/ld_script.txt index 78d0e6cca..19ddabab1 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -207,7 +207,7 @@ SECTIONS { asm/battle_controller_wally.o(.text); asm/player_pc.o(.text); asm/intro.o(.text); - src/rom_81700F8.o(.text); + src/reset_save_heap.o(.text); asm/field_region_map.o(.text); asm/battle_anim_8170478.o(.text); asm/hall_of_fame.o(.text); diff --git a/src/berry.c b/src/berry.c index b6eaa14a0..46b93d6ff 100644 --- a/src/berry.c +++ b/src/berry.c @@ -807,7 +807,7 @@ const struct Berry gBerries[] = // unused void ClearEnigmaBerries(void) { - CpuFill16(0, &gSaveBlock1Ptr->enigmaBerry, sizeof(gSaveBlock1Ptr->enigmaBerry)); + CpuFill16(0, &gSaveBlock1Ptr->enigmaBerry, 52 /*FIXME: sizeof(gSaveBlock1Ptr->enigmaBerry)*/); } void SetEnigmaBerry(u8 *src) @@ -815,7 +815,7 @@ void SetEnigmaBerry(u8 *src) u32 i; u8 *dest = (u8*)&gSaveBlock1Ptr->enigmaBerry; - for (i = 0; i < sizeof(gSaveBlock1Ptr->enigmaBerry); i++) + for (i = 0; i < 52 /*FIXME: sizeof(gSaveBlock1Ptr->enigmaBerry)*/; i++) dest[i] = src[i]; } @@ -827,7 +827,7 @@ u32 GetEnigmaBerryChecksum(struct EnigmaBerry *enigmaBerry) dest = (u8*)enigmaBerry; checksum = 0; - for (i = 0; i < sizeof(gSaveBlock1Ptr->enigmaBerry) - sizeof(gSaveBlock1Ptr->enigmaBerry.checksum); i++) + for (i = 0; i < 52 /*FIXME: sizeof(gSaveBlock1Ptr->enigmaBerry)*/ - sizeof(gSaveBlock1Ptr->enigmaBerry.checksum); i++) { checksum += dest[i]; } diff --git a/src/load_save.c b/src/load_save.c index 588387186..68d978e3d 100644 --- a/src/load_save.c +++ b/src/load_save.c @@ -6,15 +6,11 @@ #include "rng.h" #include "malloc.h" -extern u8 gPlayerPartyCount; -extern struct PokemonStorage* gPokemonStoragePtr; extern void* gUnknown_0203CF5C; -extern u8 gHeap[0x1C000]; extern bool16 IdentifyFlash(void); extern void SetBagItemsPointers(void); extern void SetDecorationInventoriesPointers(void); -extern void InitHeap(void *heapStart, u32 heapSize); void ApplyNewEncyprtionKeyToAllEncryptedData(u32 encryptionKey); diff --git a/src/rom_81700F8.c b/src/reset_save_heap.c similarity index 100% rename from src/rom_81700F8.c rename to src/reset_save_heap.c