2017-09-15 22:12:45 -04:00
|
|
|
#include "global.h"
|
|
|
|
#include "main.h"
|
|
|
|
#include "gpu_regs.h"
|
|
|
|
#include "m4a.h"
|
|
|
|
#include "load_save.h"
|
|
|
|
#include "save.h"
|
|
|
|
#include "new_game.h"
|
2017-10-12 02:06:19 -05:00
|
|
|
#include "overworld.h"
|
2019-09-08 21:07:54 -04:00
|
|
|
#include "malloc.h"
|
2017-09-15 22:12:45 -04:00
|
|
|
|
|
|
|
void sub_81700F8(void)
|
|
|
|
{
|
|
|
|
u16 imeBackup;
|
|
|
|
|
|
|
|
imeBackup = REG_IME;
|
|
|
|
REG_IME = 0;
|
2019-06-26 16:23:00 -04:00
|
|
|
RegisterRamReset(RESET_EWRAM);
|
2018-02-08 00:00:25 +01:00
|
|
|
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_FORCED_BLANK);
|
2017-09-15 22:12:45 -04:00
|
|
|
REG_IME = imeBackup;
|
|
|
|
gMain.inBattle = FALSE;
|
|
|
|
SetSaveBlocksPointers(sub_815355C());
|
2019-02-09 21:07:07 -05:00
|
|
|
ResetMenuAndMonGlobals();
|
2018-02-15 16:54:34 -06:00
|
|
|
Save_ResetSaveCounters();
|
2020-01-12 15:27:37 -05:00
|
|
|
Save_LoadGameData(SAVE_NORMAL);
|
|
|
|
if (gSaveFileStatus == SAVE_STATUS_EMPTY || gSaveFileStatus == SAVE_STATUS_CORRUPT)
|
2017-09-15 22:12:45 -04:00
|
|
|
Sav2_ClearSetDefault();
|
|
|
|
SetPokemonCryStereo(gSaveBlock2Ptr->optionsSound);
|
2018-01-06 00:35:48 -06:00
|
|
|
InitHeap(gHeap, HEAP_SIZE);
|
2018-02-14 00:58:22 +01:00
|
|
|
SetMainCallback2(CB2_ContinueSavedGame);
|
2017-09-15 22:12:45 -04:00
|
|
|
}
|