diff options
-rw-r--r-- | data-de/event_scripts.s | 79 | ||||
-rw-r--r-- | data/event_scripts.s | 74 | ||||
-rw-r--r-- | data/maps/BattleTower_Lobby/scripts.inc | 2 | ||||
-rw-r--r-- | data/maps/LilycoveCity_ContestLobby/scripts.inc | 2 | ||||
-rw-r--r-- | data/maps/MossdeepCity_GameCorner_1F/scripts.inc | 2 | ||||
-rw-r--r-- | data/scripts/cable_club.inc | 6 | ||||
-rw-r--r-- | data/scripts/pokeblocks.inc | 2 | ||||
-rw-r--r-- | data/scripts/std_msgbox.inc | 36 | ||||
-rw-r--r-- | data/specials.inc | 2 | ||||
-rw-r--r-- | include/start_menu.h | 2 | ||||
-rw-r--r-- | src/cable_club.c | 2 | ||||
-rw-r--r-- | src/start_menu.c | 2 |
12 files changed, 85 insertions, 126 deletions
diff --git a/data-de/event_scripts.s b/data-de/event_scripts.s index a4bf3a744..e1c097459 100644 --- a/data-de/event_scripts.s +++ b/data-de/event_scripts.s @@ -49,14 +49,14 @@ gSpecialVars:: .align 2 gStdScripts:: - .4byte Std_ObtainItem - .4byte Std_FindItem - .4byte Std_MsgboxNPC - .4byte Std_MsgboxSign - .4byte Std_MsgboxDefault - .4byte Std_MsgboxYesNo - .4byte Std_MsgboxAutoclose - .4byte Std_ObtainDecoration + .4byte Std_ObtainItem @ STD_OBTAIN_ITEM + .4byte Std_FindItem @ STD_FIND_ITEM + .4byte Std_MsgboxNPC @ MSGBOX_NPC + .4byte Std_MsgboxSign @ MSGBOX_SIGN + .4byte Std_MsgboxDefault @ MSGBOX_DEFAULT + .4byte Std_MsgboxYesNo @ MSGBOX_YESNO + .4byte Std_MsgboxAutoclose @ MSGBOX_AUTOCLOSE + .4byte Std_ObtainDecoration @ STD_OBTAIN_DECORATION gStdScripts_End:: .include "data/maps/PetalburgCity/scripts.inc" @@ -710,48 +710,7 @@ UnknownString_819C21F: @ 819C21F .include "data/maps/Route119_House/text.inc" .include "data/maps/Route124_DivingTreasureHuntersHouse/text.inc" - -Std_MsgboxNPC: - lock - faceplayer - message 0x0 - waitmessage - waitbuttonpress - release - return - -Std_MsgboxSign: - lockall - message 0x0 - waitmessage - waitbuttonpress - releaseall - return - -Std_MsgboxDefault: - message 0x0 - waitmessage - waitbuttonpress - return - -Std_MsgboxYesNo: - message 0x0 - waitmessage - yesnobox 20, 8 - return - -@ 819F805 - return - -S_DoSaveDialog:: @ 819F806 -S_DoSaveDialog:: @ 819F806 -S_DoSaveDialog:: @ 819F806 -S_DoSaveDialog:: @ 819F806 -S_DoSaveDialog:: @ 819F806 -S_DoSaveDialog:: @ 819F806 - special ScrSpecial_DoSaveDialog - waitstate - return + .include "data/scripts/std_msgbox.inc" gUnknown_0819F80B:: @ 819F80B lock @@ -3770,7 +3729,7 @@ SecretBase_RedCave1_EventScript_1A3032:: @ 81A3032 goto_if_eq SecretBase_RedCave1_EventScript_1A308F setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A308F erasebox 0, 0, 15, 10 @@ -3804,7 +3763,7 @@ SecretBase_RedCave1_EventScript_1A30AE:: @ 81A30AE goto_if_eq SecretBase_RedCave1_EventScript_1A310B setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A310B erasebox 0, 0, 15, 10 @@ -3838,7 +3797,7 @@ SecretBase_RedCave1_EventScript_1A312A:: @ 81A312A goto_if_eq SecretBase_RedCave1_EventScript_1A3187 setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A3187 erasebox 0, 0, 15, 10 @@ -3872,7 +3831,7 @@ SecretBase_RedCave1_EventScript_1A31A6:: @ 81A31A6 goto_if_eq SecretBase_RedCave1_EventScript_1A3203 setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A3203 erasebox 0, 0, 15, 10 @@ -3906,7 +3865,7 @@ SecretBase_RedCave1_EventScript_1A3222:: @ 81A3222 goto_if_eq SecretBase_RedCave1_EventScript_1A327F setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A327F erasebox 0, 0, 15, 10 @@ -3940,7 +3899,7 @@ SecretBase_RedCave1_EventScript_1A329E:: @ 81A329E goto_if_eq SecretBase_RedCave1_EventScript_1A32FB setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A32FB erasebox 0, 0, 15, 10 @@ -3974,7 +3933,7 @@ SecretBase_RedCave1_EventScript_1A331A:: @ 81A331A goto_if_eq SecretBase_RedCave1_EventScript_1A3377 setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A3377 erasebox 0, 0, 15, 10 @@ -4008,7 +3967,7 @@ SecretBase_RedCave1_EventScript_1A3396:: @ 81A3396 goto_if_eq SecretBase_RedCave1_EventScript_1A33F3 setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A33F3 erasebox 0, 0, 15, 10 @@ -4042,7 +4001,7 @@ SecretBase_RedCave1_EventScript_1A3412:: @ 81A3412 goto_if_eq SecretBase_RedCave1_EventScript_1A346F setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A346F erasebox 0, 0, 15, 10 @@ -4076,7 +4035,7 @@ SecretBase_RedCave1_EventScript_1A348E:: @ 81A348E goto_if_eq SecretBase_RedCave1_EventScript_1A34EB setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A34EB erasebox 0, 0, 15, 10 diff --git a/data/event_scripts.s b/data/event_scripts.s index bb4b87130..268d0f3f8 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -49,14 +49,14 @@ gSpecialVars:: .align 2 gStdScripts:: - .4byte Std_ObtainItem - .4byte Std_FindItem - .4byte Std_MsgboxNPC - .4byte Std_MsgboxSign - .4byte Std_MsgboxDefault - .4byte Std_MsgboxYesNo - .4byte Std_MsgboxAutoclose - .4byte Std_ObtainDecoration + .4byte Std_ObtainItem @ STD_OBTAIN_ITEM + .4byte Std_FindItem @ STD_FIND_ITEM + .4byte Std_MsgboxNPC @ MSGBOX_NPC + .4byte Std_MsgboxSign @ MSGBOX_SIGN + .4byte Std_MsgboxDefault @ MSGBOX_DEFAULT + .4byte Std_MsgboxYesNo @ MSGBOX_YESNO + .4byte Std_MsgboxAutoclose @ MSGBOX_AUTOCLOSE + .4byte Std_ObtainDecoration @ STD_OBTAIN_DECORATION gStdScripts_End:: .include "data/maps/PetalburgCity/scripts.inc" @@ -709,43 +709,7 @@ UnknownString_819C21F: @ 819C21F .include "data/maps/Route119_House/text.inc" .include "data/maps/Route124_DivingTreasureHuntersHouse/text.inc" - -Std_MsgboxNPC: - lock - faceplayer - message 0x0 - waitmessage - waitbuttonpress - release - return - -Std_MsgboxSign: - lockall - message 0x0 - waitmessage - waitbuttonpress - releaseall - return - -Std_MsgboxDefault: - message 0x0 - waitmessage - waitbuttonpress - return - -Std_MsgboxYesNo: - message 0x0 - waitmessage - yesnobox 20, 8 - return - -@ 819F805 - return - -S_DoSaveDialog:: @ 819F806 - special ScrSpecial_DoSaveDialog - waitstate - return + .include "data/scripts/std_msgbox.inc" gUnknown_0819F80B:: @ 819F80B lock @@ -3749,7 +3713,7 @@ SecretBase_RedCave1_EventScript_1A3032:: @ 81A3032 goto_if_eq SecretBase_RedCave1_EventScript_1A308F setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A308F erasebox 0, 0, 15, 10 @@ -3783,7 +3747,7 @@ SecretBase_RedCave1_EventScript_1A30AE:: @ 81A30AE goto_if_eq SecretBase_RedCave1_EventScript_1A310B setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A310B erasebox 0, 0, 15, 10 @@ -3817,7 +3781,7 @@ SecretBase_RedCave1_EventScript_1A312A:: @ 81A312A goto_if_eq SecretBase_RedCave1_EventScript_1A3187 setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A3187 erasebox 0, 0, 15, 10 @@ -3851,7 +3815,7 @@ SecretBase_RedCave1_EventScript_1A31A6:: @ 81A31A6 goto_if_eq SecretBase_RedCave1_EventScript_1A3203 setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A3203 erasebox 0, 0, 15, 10 @@ -3885,7 +3849,7 @@ SecretBase_RedCave1_EventScript_1A3222:: @ 81A3222 goto_if_eq SecretBase_RedCave1_EventScript_1A327F setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A327F erasebox 0, 0, 15, 10 @@ -3919,7 +3883,7 @@ SecretBase_RedCave1_EventScript_1A329E:: @ 81A329E goto_if_eq SecretBase_RedCave1_EventScript_1A32FB setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A32FB erasebox 0, 0, 15, 10 @@ -3953,7 +3917,7 @@ SecretBase_RedCave1_EventScript_1A331A:: @ 81A331A goto_if_eq SecretBase_RedCave1_EventScript_1A3377 setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A3377 erasebox 0, 0, 15, 10 @@ -3987,7 +3951,7 @@ SecretBase_RedCave1_EventScript_1A3396:: @ 81A3396 goto_if_eq SecretBase_RedCave1_EventScript_1A33F3 setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A33F3 erasebox 0, 0, 15, 10 @@ -4021,7 +3985,7 @@ SecretBase_RedCave1_EventScript_1A3412:: @ 81A3412 goto_if_eq SecretBase_RedCave1_EventScript_1A346F setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A346F erasebox 0, 0, 15, 10 @@ -4055,7 +4019,7 @@ SecretBase_RedCave1_EventScript_1A348E:: @ 81A348E goto_if_eq SecretBase_RedCave1_EventScript_1A34EB setvar VAR_RESULT, 1 special sub_80BCE4C - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq SecretBase_RedCave1_EventScript_1A34EB erasebox 0, 0, 15, 10 diff --git a/data/maps/BattleTower_Lobby/scripts.inc b/data/maps/BattleTower_Lobby/scripts.inc index 5086e0bea..f03bb2a52 100644 --- a/data/maps/BattleTower_Lobby/scripts.inc +++ b/data/maps/BattleTower_Lobby/scripts.inc @@ -240,7 +240,7 @@ BattleTower_Lobby_EventScript_160587:: @ 8160587 special LoadPlayerParty closemessage delay 2 - call S_DoSaveDialog + call Common_EventScript_SaveGame setvar VAR_TEMP_0, 5 erasebox 0, 0, 15, 10 compare VAR_RESULT, 0 diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index 7a09fa121..527a4e178 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -327,7 +327,7 @@ LilycoveCity_ContestLobby_EventScript_158BC4:: @ 8158BC4 msgbox LilycoveCity_ContestLobby_Text_188521, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq LilycoveCity_ContestLobby_EventScript_158C35 - call S_DoSaveDialog + call Common_EventScript_SaveGame erasebox 0, 0, 15, 9 compare VAR_RESULT, 0 goto_if_eq LilycoveCity_ContestLobby_EventScript_158C35 diff --git a/data/maps/MossdeepCity_GameCorner_1F/scripts.inc b/data/maps/MossdeepCity_GameCorner_1F/scripts.inc index 62aa0d7dc..67a77d6a9 100644 --- a/data/maps/MossdeepCity_GameCorner_1F/scripts.inc +++ b/data/maps/MossdeepCity_GameCorner_1F/scripts.inc @@ -103,7 +103,7 @@ MossdeepCity_GameCorner_1F_EventScript_15AD59:: @ 815AD59 compare VAR_RESULT, NO call_if_eq MossdeepCity_GameCorner_1F_EventScript_15ADE8 special LoadPlayerParty - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq MossdeepCity_GameCorner_1F_EventScript_15ADE8 erasebox 0, 0, 15, 10 diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 365992fb3..1da7d0dda 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -190,7 +190,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3EBC:: @ 81A3EBC case 127, OldaleTown_PokemonCenter_2F_EventScript_1A4319 OldaleTown_PokemonCenter_2F_EventScript_1A3EF2:: @ 81A3EF2 - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 call OldaleTown_PokemonCenter_2F_EventScript_1A3FEF @@ -359,7 +359,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A40FA:: @ 81A40FA call OldaleTown_PokemonCenter_2F_EventScript_1A41BB compare VAR_RESULT, 0 goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 message OldaleTown_PokemonCenter_2F_Text_1A490C @@ -452,7 +452,7 @@ VerdanturfTown_PokemonCenter_2F_EventScript_1A41FB:: @ 81A41FB goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4229 OldaleTown_PokemonCenter_2F_EventScript_1A4229:: @ 81A4229 - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 message OldaleTown_PokemonCenter_2F_Text_1A490C diff --git a/data/scripts/pokeblocks.inc b/data/scripts/pokeblocks.inc index bd3323024..1b1f3a333 100644 --- a/data/scripts/pokeblocks.inc +++ b/data/scripts/pokeblocks.inc @@ -233,7 +233,7 @@ FallarborTown_ContestLobby_EventScript_1B7897:: @ 81B7897 end FallarborTown_ContestLobby_EventScript_1B78A1:: @ 81B78A1 - call S_DoSaveDialog + call Common_EventScript_SaveGame compare VAR_RESULT, 0 goto_if_eq FallarborTown_ContestLobby_EventScript_1B7936 message FallarborTown_ContestLobby_Text_1B7304 diff --git a/data/scripts/std_msgbox.inc b/data/scripts/std_msgbox.inc new file mode 100644 index 000000000..912f88fa1 --- /dev/null +++ b/data/scripts/std_msgbox.inc @@ -0,0 +1,36 @@ +Std_MsgboxNPC: + lock + faceplayer + message 0x0 + waitmessage + waitbuttonpress + release + return + +Std_MsgboxSign: + lockall + message 0x0 + waitmessage + waitbuttonpress + releaseall + return + +Std_MsgboxDefault: + message 0x0 + waitmessage + waitbuttonpress + return + +Std_MsgboxYesNo: + message 0x0 + waitmessage + yesnobox 20, 8 + return + +EventScript_UnusedReturn: @ 819F805 + return + +Common_EventScript_SaveGame:: @ 819F806 + special SaveGame + waitstate + return diff --git a/data/specials.inc b/data/specials.inc index d3a20bda8..6988d90c4 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -101,7 +101,7 @@ gSpecials:: def_special sub_80C5044 def_special GiveMonArtistRibbon def_special sub_808363C - def_special ScrSpecial_DoSaveDialog + def_special SaveGame def_special DoWateringBerryTreeAnim def_special sub_80E60D8 def_special sub_80EB7C4 diff --git a/include/start_menu.h b/include/start_menu.h index 327df8c16..575efeb8c 100644 --- a/include/start_menu.h +++ b/include/start_menu.h @@ -7,7 +7,7 @@ extern u8 (*gMenuCallback)(void); void CreateStartMenuTask(void (*func)(u8)); void sub_80712B4(u8 taskId); void sub_8071310(void); -void ScrSpecial_DoSaveDialog(void); +void SaveGame(void); void sub_8071B28(void); void debug_sub_8075DB4(struct BattleTowerEReaderTrainer *ereaderTrainer, const u8 *b, u32 trainerId); bool8 debug_sub_8075C30(void); diff --git a/src/cable_club.c b/src/cable_club.c index 28bf3b759..78e227cef 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -732,7 +732,7 @@ static void sub_80837EC(u8 taskId) void sub_8083820(void) { - ScrSpecial_DoSaveDialog(); + SaveGame(); } static void sub_808382C(u8 taskId) diff --git a/src/start_menu.c b/src/start_menu.c index 747f13b3a..c87ad6330 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -613,7 +613,7 @@ static u8 RunSaveDialogCallback(void) return saveDialogCallback(); } -void ScrSpecial_DoSaveDialog(void) +void SaveGame(void) { sub_807160C(); CreateTask(Task_SaveDialog, 0x50); |