2017-09-16 04:12:45 +02: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 09:06:19 +02:00
|
|
|
#include "overworld.h"
|
2018-11-29 12:24:28 +01:00
|
|
|
#include "alloc.h"
|
2017-09-16 04:12:45 +02:00
|
|
|
|
|
|
|
void sub_81700F8(void)
|
|
|
|
{
|
|
|
|
u16 imeBackup;
|
|
|
|
|
|
|
|
imeBackup = REG_IME;
|
|
|
|
REG_IME = 0;
|
|
|
|
RegisterRamReset(0x00000001);
|
2018-02-08 00:00:25 +01:00
|
|
|
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_FORCED_BLANK);
|
2017-09-16 04:12:45 +02:00
|
|
|
REG_IME = imeBackup;
|
|
|
|
gMain.inBattle = FALSE;
|
|
|
|
SetSaveBlocksPointers(sub_815355C());
|
2019-02-10 03:07:07 +01:00
|
|
|
ResetMenuAndMonGlobals();
|
2018-02-15 23:54:34 +01:00
|
|
|
Save_ResetSaveCounters();
|
|
|
|
Save_LoadGameData(0);
|
2017-09-16 04:12:45 +02:00
|
|
|
if (gSaveFileStatus == 0 || gSaveFileStatus == 2)
|
|
|
|
Sav2_ClearSetDefault();
|
|
|
|
SetPokemonCryStereo(gSaveBlock2Ptr->optionsSound);
|
2018-01-06 07:35:48 +01:00
|
|
|
InitHeap(gHeap, HEAP_SIZE);
|
2018-02-14 00:58:22 +01:00
|
|
|
SetMainCallback2(CB2_ContinueSavedGame);
|
2017-09-16 04:12:45 +02:00
|
|
|
}
|