Merge branch 'master' into lilycove_lady
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
32
src/reset_save_heap.c
Normal file
32
src/reset_save_heap.c
Normal file
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user