diff --git a/asm/macros/event.inc b/asm/macros/event.inc index b3c7ce050a..efc30cabae 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -2471,6 +2471,11 @@ callnative Script_SetDifficulty, requests_effects=1 .byte \difficulty .endm + + .macro forcesave + callnative Script_ForceSaveGame + waitstate + .endm @ Makes the trainer unable to see the player if executed. @ This is a no-op if the player interacts with the trainer. diff --git a/src/start_menu.c b/src/start_menu.c index fcd8f7b42b..a49b7c6d8a 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -1497,3 +1497,11 @@ static bool8 StartMenuDexNavCallback(void) CreateTask(Task_OpenDexNavFromStartMenu, 0); return TRUE; } + +void Script_ForceSaveGame(struct ScriptContext *ctx) +{ + SaveGame(); + ShowSaveInfoWindow(); + gMenuCallback = SaveCallback; + sSaveDialogCallback = SaveSavingMessageCallback; +}