diff options
author | U-User-PC\User <golemgalvanize@github.com> | 2017-10-03 15:54:19 -0400 |
---|---|---|
committer | U-User-PC\User <golemgalvanize@github.com> | 2017-10-03 15:54:19 -0400 |
commit | 1ae3d9b57b0f4ad506a1bd7323e46d2fa768b6b7 (patch) | |
tree | fca8b14b2e5e3a2390c1b890db2f56f6f8cff744 /src/reset_save_heap.c | |
parent | 0a88d1042a80bcc703d05f1cf19527272424a03f (diff) | |
parent | d32ec8bf7246468625ab68a2d62835d70b7ac98c (diff) |
I hope this fixes merge 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); +} |