[#1712] Reset fileNum when returning to title screen and prevent saving when file = 0xFF (#1721)

This commit is contained in:
Garrett Cox 2022-10-10 03:16:40 -05:00 committed by GitHub
parent fd3872ae30
commit b0510d78f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -2006,7 +2006,7 @@ s32 func_800C0DB4(GlobalContext* globalCtx, Vec3f* pos) {
}
void Gameplay_PerformSave(GlobalContext* globalCtx) {
if (globalCtx != NULL) {
if (globalCtx != NULL && gSaveContext.fileNum != 0xFF) {
Gameplay_SaveSceneFlags(globalCtx);
gSaveContext.savedSceneNum = globalCtx->sceneNum;
if (gSaveContext.temporaryWeapon) {

View File

@ -10,6 +10,7 @@ void Opening_SetupTitleScreen(OpeningContext* this) {
gSaveContext.gameMode = 1;
this->state.running = false;
gSaveContext.linkAge = 0;
gSaveContext.fileNum = 0xFF;
Sram_InitDebugSave();
gSaveContext.cutsceneIndex = 0xFFF3;
gSaveContext.sceneSetupIndex = 7;