diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2017-09-17 23:42:44 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2017-09-17 23:42:44 -0400 |
commit | 16f2e40576b29fd85366305b4165da3aff4aef0e (patch) | |
tree | 24b5d9112f6cec70b2ba9f8cc4a3a63a8c0cb023 /src/reset_save_heap.c | |
parent | 380858293e4597dd40390129a9a7bac713bdf080 (diff) |
Fix naming conflicts
Diffstat (limited to 'src/reset_save_heap.c')
-rw-r--r-- | src/reset_save_heap.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/reset_save_heap.c b/src/reset_save_heap.c new file mode 100644 index 000000000..b786ff9f8 --- /dev/null +++ b/src/reset_save_heap.c @@ -0,0 +1,32 @@ +#include "global.h" +#include "main.h" +#include "gpu_regs.h" +#include "m4a.h" +#include "load_save.h" +#include "save.h" +#include "new_game.h" +#include "rom4.h" +#include "malloc.h" + +void sub_81700F8(void) +{ + u16 imeBackup; + + imeBackup = REG_IME; + REG_IME = 0; + RegisterRamReset(0x00000001); + ClearGpuRegBits(REG_OFFSET_DISPCNT, 0x80); + REG_IME = imeBackup; + gMain.inBattle = FALSE; + SetSaveBlocksPointers(sub_815355C()); + sub_808447C(); + ResetSaveCounters(); + sub_81534D0(0); + if (gSaveFileStatus == 0 || gSaveFileStatus == 2) + { + Sav2_ClearSetDefault(); + } + SetPokemonCryStereo(gSaveBlock2Ptr->optionsSound); + InitHeap(gHeap, 0x1c000); + SetMainCallback2(sub_8086230); +} |