diff options
-rw-r--r-- | data-de/event_scripts.s | 56 | ||||
-rw-r--r-- | data/event_scripts.s | 59 | ||||
-rw-r--r-- | data/field_move_scripts.inc | 2 | ||||
-rw-r--r-- | data/scripts/cable_club.inc | 6 | ||||
-rw-r--r-- | data/scripts/maps/BattleTower_Lobby.inc | 2 | ||||
-rw-r--r-- | data/scripts/maps/LilycoveCity_ContestLobby.inc | 2 | ||||
-rw-r--r-- | data/scripts/maps/MossdeepCity_GameCorner_1F.inc | 2 | ||||
-rw-r--r-- | data/scripts/pokeblocks.inc | 2 | ||||
-rw-r--r-- | data/specials.inc | 4 | ||||
-rw-r--r-- | include/data2.h | 9 | ||||
-rw-r--r-- | include/menu.h | 2 | ||||
-rw-r--r-- | include/start_menu.h | 2 | ||||
-rw-r--r-- | include/wild_encounter.h | 4 | ||||
-rw-r--r-- | src/battle_2.c | 3 | ||||
-rw-r--r-- | src/cable_club.c | 2 | ||||
-rw-r--r-- | src/field_player_avatar.c | 203 | ||||
-rw-r--r-- | src/field_screen_effect.c | 7 | ||||
-rw-r--r-- | src/menu.c | 2 | ||||
-rw-r--r-- | src/menu_helpers.c | 2 | ||||
-rw-r--r-- | src/mystery_event_menu.c | 22 | ||||
-rw-r--r-- | src/naming_screen.c | 2 | ||||
-rw-r--r-- | src/overworld.c | 1 | ||||
-rw-r--r-- | src/secret_base.c | 2 | ||||
-rw-r--r-- | src/start_menu.c | 4 | ||||
-rw-r--r-- | src/tv.c | 1 | ||||
-rw-r--r-- | src/wild_encounter.c | 4 |
26 files changed, 214 insertions, 193 deletions
diff --git a/data-de/event_scripts.s b/data-de/event_scripts.s index 5549ca7cc..ba7fedac6 100644 --- a/data-de/event_scripts.s +++ b/data-de/event_scripts.s @@ -919,13 +919,13 @@ Std_5: @ 819F805 return -BattleTower_Lobby_EventScript_19F806:: @ 819F806 -FallarborTown_ContestLobby_EventScript_19F806:: @ 819F806 -LilycoveCity_ContestLobby_EventScript_19F806:: @ 819F806 -MossdeepCity_GameCorner_1F_EventScript_19F806:: @ 819F806 -OldaleTown_PokemonCenter_2F_EventScript_19F806:: @ 819F806 -SecretBase_RedCave1_EventScript_19F806:: @ 819F806 - special InitSaveDialog +S_DoSaveDialog:: @ 819F806 +S_DoSaveDialog:: @ 819F806 +S_DoSaveDialog:: @ 819F806 +S_DoSaveDialog:: @ 819F806 +S_DoSaveDialog:: @ 819F806 +S_DoSaveDialog:: @ 819F806 + special ScrSpecial_DoSaveDialog waitstate return @@ -1438,7 +1438,7 @@ SootopolisCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B lock faceplayer - msgbox OldaleTown_PokemonCenter_1F_Text_1A0A7D, 5 + msgbox gText_NurseJoy_Welcome, 5 compare RESULT, 1 jumpeq OldaleTown_PokemonCenter_1F_EventScript_19FD7C compare RESULT, 0 @@ -1447,7 +1447,7 @@ VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B OldaleTown_PokemonCenter_1F_EventScript_19FD7C:: @ 819FD7C inccounter GAME_STAT_USED_POKECENTER - message OldaleTown_PokemonCenter_1F_Text_1A1245 + message gText_NurseJoy_OkayIllTakeYourPokemon waittext move 0x800b, OldaleTown_PokemonCenter_1F_Movement_1A083F waitmove 0 @@ -1462,16 +1462,16 @@ OldaleTown_PokemonCenter_1F_EventScript_19FD7C:: @ 819FD7C end OldaleTown_PokemonCenter_1F_EventScript_19FDB0:: @ 819FDB0 - message OldaleTown_PokemonCenter_1F_Text_1A0B14 + message gText_NurseJoy_ThankYouForWaiting waittext move 0x800b, OldaleTown_PokemonCenter_1F_Movement_19FDF4 waitmove 0 - message OldaleTown_PokemonCenter_1F_Text_1A0AFA + message gText_NurseJoy_WeHopeToSeeYouAgain waittext return OldaleTown_PokemonCenter_1F_EventScript_19FDC7:: @ 819FDC7 - message OldaleTown_PokemonCenter_1F_Text_1A0AFA + message gText_NurseJoy_WeHopeToSeeYouAgain waittext return @@ -1484,7 +1484,7 @@ OldaleTown_PokemonCenter_1F_EventScript_19FDCE:: @ 819FDCE end OldaleTown_PokemonCenter_1F_EventScript_19FDEA:: @ 819FDEA - message OldaleTown_PokemonCenter_1F_Text_1A1275 + message gText_NurseJoy_Pokerus waittext setflag 273 return @@ -2986,16 +2986,16 @@ UnknownString_81A0A54: @ 81A0A54 UnknownString_81A0A66: @ 81A0A66 .string "Verbindung zu LANETTES PC hergestellt.$" -OldaleTown_PokemonCenter_1F_Text_1A0A7D:: @ 81A0A7D +gText_NurseJoy_Welcome:: @ 81A0A7D .string "Willkommen im POKéMON-CENTER!\p" .string "Wir heilen deine POKéMON und\n" .string "machen sie wieder fit.\p" .string "O.K. Wir benötigen deine POKéMON.$" -OldaleTown_PokemonCenter_1F_Text_1A0AFA:: @ 81A0AFA +gText_NurseJoy_WeHopeToSeeYouAgain:: @ 81A0AFA .string "Komm jederzeit wieder vorbei!$" -OldaleTown_PokemonCenter_1F_Text_1A0B14:: @ 81A0B14 +gText_NurseJoy_ThankYouForWaiting:: @ 81A0B14 .string "Danke!\p" .string "Deine POKéMON sind wieder topfit!$" @@ -3214,11 +3214,11 @@ SlateportCity_Text_1A116E:: @ 81A116E .string "nehmen und dir unter der Hand tolle\l" .string "Sachen verkaufen.$" -OldaleTown_PokemonCenter_1F_Text_1A1245:: @ 81A1245 +gText_NurseJoy_OkayIllTakeYourPokemon:: @ 81A1245 .string "Okay, ich nehme deine POKéMON für einen\n" .string "Moment in meine Obhut.$" -OldaleTown_PokemonCenter_1F_Text_1A1275:: @ 81A1275 +gText_NurseJoy_Pokerus:: @ 81A1275 .string "Dein POKéMON scheint von dem\n" .string "POKéRUS befallen zu sein.\p" .string "Über den POKéRUS ist bisher wenig be-\n" @@ -3965,7 +3965,7 @@ SecretBase_RedCave1_EventScript_1A3032:: @ 81A3032 jumpeq SecretBase_RedCave1_EventScript_1A308F setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A308F hidebox 0, 0, 15, 10 @@ -4000,7 +4000,7 @@ SecretBase_RedCave1_EventScript_1A30AE:: @ 81A30AE jumpeq SecretBase_RedCave1_EventScript_1A310B setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A310B hidebox 0, 0, 15, 10 @@ -4035,7 +4035,7 @@ SecretBase_RedCave1_EventScript_1A312A:: @ 81A312A jumpeq SecretBase_RedCave1_EventScript_1A3187 setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A3187 hidebox 0, 0, 15, 10 @@ -4070,7 +4070,7 @@ SecretBase_RedCave1_EventScript_1A31A6:: @ 81A31A6 jumpeq SecretBase_RedCave1_EventScript_1A3203 setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A3203 hidebox 0, 0, 15, 10 @@ -4105,7 +4105,7 @@ SecretBase_RedCave1_EventScript_1A3222:: @ 81A3222 jumpeq SecretBase_RedCave1_EventScript_1A327F setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A327F hidebox 0, 0, 15, 10 @@ -4140,7 +4140,7 @@ SecretBase_RedCave1_EventScript_1A329E:: @ 81A329E jumpeq SecretBase_RedCave1_EventScript_1A32FB setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A32FB hidebox 0, 0, 15, 10 @@ -4175,7 +4175,7 @@ SecretBase_RedCave1_EventScript_1A331A:: @ 81A331A jumpeq SecretBase_RedCave1_EventScript_1A3377 setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A3377 hidebox 0, 0, 15, 10 @@ -4210,7 +4210,7 @@ SecretBase_RedCave1_EventScript_1A3396:: @ 81A3396 jumpeq SecretBase_RedCave1_EventScript_1A33F3 setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A33F3 hidebox 0, 0, 15, 10 @@ -4245,7 +4245,7 @@ SecretBase_RedCave1_EventScript_1A3412:: @ 81A3412 jumpeq SecretBase_RedCave1_EventScript_1A346F setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A346F hidebox 0, 0, 15, 10 @@ -4280,7 +4280,7 @@ SecretBase_RedCave1_EventScript_1A348E:: @ 81A348E jumpeq SecretBase_RedCave1_EventScript_1A34EB setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A34EB hidebox 0, 0, 15, 10 diff --git a/data/event_scripts.s b/data/event_scripts.s index 3ea5cee24..171581dd9 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -918,13 +918,8 @@ Std_5: @ 819F805 return -BattleTower_Lobby_EventScript_19F806:: @ 819F806 -FallarborTown_ContestLobby_EventScript_19F806:: @ 819F806 -LilycoveCity_ContestLobby_EventScript_19F806:: @ 819F806 -MossdeepCity_GameCorner_1F_EventScript_19F806:: @ 819F806 -OldaleTown_PokemonCenter_2F_EventScript_19F806:: @ 819F806 -SecretBase_RedCave1_EventScript_19F806:: @ 819F806 - special InitSaveDialog +S_DoSaveDialog:: @ 819F806 + special ScrSpecial_DoSaveDialog waitstate return @@ -1437,16 +1432,16 @@ SootopolisCity_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B lock faceplayer - msgbox OldaleTown_PokemonCenter_1F_Text_1A0A7D, 5 + msgbox gText_NurseJoy_Welcome, MSGBOX_YESNO compare RESULT, 1 - jumpeq OldaleTown_PokemonCenter_1F_EventScript_19FD7C + jumpeq do_heal_party compare RESULT, 0 - jumpeq OldaleTown_PokemonCenter_1F_EventScript_19FDC7 + jumpeq dont_heal_party end -OldaleTown_PokemonCenter_1F_EventScript_19FD7C:: @ 819FD7C +do_heal_party:: @ 819FD7C inccounter GAME_STAT_USED_POKECENTER - message OldaleTown_PokemonCenter_1F_Text_1A1245 + message gText_NurseJoy_OkayIllTakeYourPokemon waittext move 0x800b, OldaleTown_PokemonCenter_1F_Movement_1A083F waitmove 0 @@ -1461,16 +1456,16 @@ OldaleTown_PokemonCenter_1F_EventScript_19FD7C:: @ 819FD7C end OldaleTown_PokemonCenter_1F_EventScript_19FDB0:: @ 819FDB0 - message OldaleTown_PokemonCenter_1F_Text_1A0B14 + message gText_NurseJoy_ThankYouForWaiting waittext move 0x800b, OldaleTown_PokemonCenter_1F_Movement_19FDF4 waitmove 0 - message OldaleTown_PokemonCenter_1F_Text_1A0AFA + message gText_NurseJoy_WeHopeToSeeYouAgain waittext return -OldaleTown_PokemonCenter_1F_EventScript_19FDC7:: @ 819FDC7 - message OldaleTown_PokemonCenter_1F_Text_1A0AFA +dont_heal_party:: @ 819FDC7 + message gText_NurseJoy_WeHopeToSeeYouAgain waittext return @@ -1483,7 +1478,7 @@ OldaleTown_PokemonCenter_1F_EventScript_19FDCE:: @ 819FDCE end OldaleTown_PokemonCenter_1F_EventScript_19FDEA:: @ 819FDEA - message OldaleTown_PokemonCenter_1F_Text_1A1275 + message gText_NurseJoy_Pokerus waittext setflag 273 return @@ -2985,17 +2980,17 @@ UnknownString_81A0A54: @ 81A0A54 UnknownString_81A0A66: @ 81A0A66 .string "Accessed LANETTE’s PC.$" -OldaleTown_PokemonCenter_1F_Text_1A0A7D:: @ 81A0A7D +gText_NurseJoy_Welcome:: @ 81A0A7D .string "Hello, and welcome to the POKéMON\n" .string "CENTER.\p" .string "We restore your tired POKéMON to\n" .string "full health.\p" .string "Would you like to rest your POKéMON?$" -OldaleTown_PokemonCenter_1F_Text_1A0AFA:: @ 81A0AFA +gText_NurseJoy_WeHopeToSeeYouAgain:: @ 81A0AFA .string "We hope to see you again!$" -OldaleTown_PokemonCenter_1F_Text_1A0B14:: @ 81A0B14 +gText_NurseJoy_ThankYouForWaiting:: @ 81A0B14 .string "Thank you for waiting.\p" .string "We’ve restored your POKéMON to\n" .string "full health.$" @@ -3209,11 +3204,11 @@ SlateportCity_Text_1A116E:: @ 81A116E .string "We’ll accept you as a member and sell\n" .string "you good stuff in secrecy.$" -OldaleTown_PokemonCenter_1F_Text_1A1245:: @ 81A1245 +gText_NurseJoy_OkayIllTakeYourPokemon:: @ 81A1245 .string "Okay, I’ll take your POKéMON for a\n" .string "few seconds.$" -OldaleTown_PokemonCenter_1F_Text_1A1275:: @ 81A1275 +gText_NurseJoy_Pokerus:: @ 81A1275 .string "Your POKéMON may be infected with\n" .string "POKéRUS.\p" .string "Little is known about the POKéRUS\n" @@ -3949,7 +3944,7 @@ SecretBase_RedCave1_EventScript_1A3032:: @ 81A3032 jumpeq SecretBase_RedCave1_EventScript_1A308F setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A308F hidebox 0, 0, 15, 10 @@ -3984,7 +3979,7 @@ SecretBase_RedCave1_EventScript_1A30AE:: @ 81A30AE jumpeq SecretBase_RedCave1_EventScript_1A310B setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A310B hidebox 0, 0, 15, 10 @@ -4019,7 +4014,7 @@ SecretBase_RedCave1_EventScript_1A312A:: @ 81A312A jumpeq SecretBase_RedCave1_EventScript_1A3187 setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A3187 hidebox 0, 0, 15, 10 @@ -4054,7 +4049,7 @@ SecretBase_RedCave1_EventScript_1A31A6:: @ 81A31A6 jumpeq SecretBase_RedCave1_EventScript_1A3203 setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A3203 hidebox 0, 0, 15, 10 @@ -4089,7 +4084,7 @@ SecretBase_RedCave1_EventScript_1A3222:: @ 81A3222 jumpeq SecretBase_RedCave1_EventScript_1A327F setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A327F hidebox 0, 0, 15, 10 @@ -4124,7 +4119,7 @@ SecretBase_RedCave1_EventScript_1A329E:: @ 81A329E jumpeq SecretBase_RedCave1_EventScript_1A32FB setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A32FB hidebox 0, 0, 15, 10 @@ -4159,7 +4154,7 @@ SecretBase_RedCave1_EventScript_1A331A:: @ 81A331A jumpeq SecretBase_RedCave1_EventScript_1A3377 setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A3377 hidebox 0, 0, 15, 10 @@ -4194,7 +4189,7 @@ SecretBase_RedCave1_EventScript_1A3396:: @ 81A3396 jumpeq SecretBase_RedCave1_EventScript_1A33F3 setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A33F3 hidebox 0, 0, 15, 10 @@ -4229,7 +4224,7 @@ SecretBase_RedCave1_EventScript_1A3412:: @ 81A3412 jumpeq SecretBase_RedCave1_EventScript_1A346F setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A346F hidebox 0, 0, 15, 10 @@ -4264,7 +4259,7 @@ SecretBase_RedCave1_EventScript_1A348E:: @ 81A348E jumpeq SecretBase_RedCave1_EventScript_1A34EB setvar RESULT, 1 special sub_80BCE4C - call SecretBase_RedCave1_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq SecretBase_RedCave1_EventScript_1A34EB hidebox 0, 0, 15, 10 diff --git a/data/field_move_scripts.inc b/data/field_move_scripts.inc index 315217055..acf5e9e17 100644 --- a/data/field_move_scripts.inc +++ b/data/field_move_scripts.inc @@ -90,7 +90,7 @@ DoRockSmashMovement: @ 81B0F0C specialval RESULT, sub_810F5BC compare RESULT, 1 jumpeq DoRockSmashMovement_Done - special RockSmashWildEncounter + special ScrSpecial_RockSmashWildEncounter compare RESULT, 0 jumpeq DoRockSmashMovement_Done waitstate diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 4a919c597..5728b52d8 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -191,7 +191,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3EBC:: @ 81A3EBC case 127, OldaleTown_PokemonCenter_2F_EventScript_1A4319 OldaleTown_PokemonCenter_2F_EventScript_1A3EF2:: @ 81A3EF2 - call OldaleTown_PokemonCenter_2F_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 call OldaleTown_PokemonCenter_2F_EventScript_1A3FEF @@ -361,7 +361,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A40FA:: @ 81A40FA call OldaleTown_PokemonCenter_2F_EventScript_1A41BB compare RESULT, 0 jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 - call OldaleTown_PokemonCenter_2F_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 message OldaleTown_PokemonCenter_2F_Text_1A490C @@ -455,7 +455,7 @@ VerdanturfTown_PokemonCenter_2F_EventScript_1A41FB:: @ 81A41FB jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4229 OldaleTown_PokemonCenter_2F_EventScript_1A4229:: @ 81A4229 - call OldaleTown_PokemonCenter_2F_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 message OldaleTown_PokemonCenter_2F_Text_1A490C diff --git a/data/scripts/maps/BattleTower_Lobby.inc b/data/scripts/maps/BattleTower_Lobby.inc index 8cd3639a5..a1570ac13 100644 --- a/data/scripts/maps/BattleTower_Lobby.inc +++ b/data/scripts/maps/BattleTower_Lobby.inc @@ -242,7 +242,7 @@ BattleTower_Lobby_EventScript_160587:: @ 8160587 special LoadPlayerParty closebutton pause 2 - call BattleTower_Lobby_EventScript_19F806 + call S_DoSaveDialog setvar 0x4000, 5 hidebox 0, 0, 15, 10 compare RESULT, 0 diff --git a/data/scripts/maps/LilycoveCity_ContestLobby.inc b/data/scripts/maps/LilycoveCity_ContestLobby.inc index 3c8cc5bdf..6bdcf55e2 100644 --- a/data/scripts/maps/LilycoveCity_ContestLobby.inc +++ b/data/scripts/maps/LilycoveCity_ContestLobby.inc @@ -330,7 +330,7 @@ LilycoveCity_ContestLobby_EventScript_158BC4:: @ 8158BC4 msgbox LilycoveCity_ContestLobby_Text_188521, 5 compare RESULT, 0 jumpeq LilycoveCity_ContestLobby_EventScript_158C35 - call LilycoveCity_ContestLobby_EventScript_19F806 + call S_DoSaveDialog hidebox 0, 0, 15, 9 compare RESULT, 0 jumpeq LilycoveCity_ContestLobby_EventScript_158C35 diff --git a/data/scripts/maps/MossdeepCity_GameCorner_1F.inc b/data/scripts/maps/MossdeepCity_GameCorner_1F.inc index 14836f3e0..59669596a 100644 --- a/data/scripts/maps/MossdeepCity_GameCorner_1F.inc +++ b/data/scripts/maps/MossdeepCity_GameCorner_1F.inc @@ -103,7 +103,7 @@ MossdeepCity_GameCorner_1F_EventScript_15AD59:: @ 815AD59 compare RESULT, 0 callif 1, MossdeepCity_GameCorner_1F_EventScript_15ADE8 special LoadPlayerParty - call MossdeepCity_GameCorner_1F_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq MossdeepCity_GameCorner_1F_EventScript_15ADE8 hidebox 0, 0, 15, 10 diff --git a/data/scripts/pokeblocks.inc b/data/scripts/pokeblocks.inc index e1add8734..852acd292 100644 --- a/data/scripts/pokeblocks.inc +++ b/data/scripts/pokeblocks.inc @@ -235,7 +235,7 @@ FallarborTown_ContestLobby_EventScript_1B7897:: @ 81B7897 end FallarborTown_ContestLobby_EventScript_1B78A1:: @ 81B78A1 - call FallarborTown_ContestLobby_EventScript_19F806 + call S_DoSaveDialog compare RESULT, 0 jumpeq FallarborTown_ContestLobby_EventScript_1B7936 message FallarborTown_ContestLobby_Text_1B7304 diff --git a/data/specials.inc b/data/specials.inc index 99a4a218c..1baa55442 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -100,7 +100,7 @@ gSpecials:: def_special sub_80C5044 def_special GiveMonArtistRibbon def_special sub_808363C - def_special InitSaveDialog + def_special ScrSpecial_DoSaveDialog def_special DoWateringBerryTreeAnim def_special sub_80E60D8 def_special sub_80EB7C4 @@ -178,7 +178,7 @@ gSpecials:: def_special sub_810FF48 def_special sub_810FAA0 def_special sub_810FF60 - def_special RockSmashWildEncounter + def_special ScrSpecial_RockSmashWildEncounter def_special GabbyAndTyGetBattleNum def_special sub_80BDC14 def_special GabbyAndTyBeforeInterview diff --git a/include/data2.h b/include/data2.h index 7a58e3a8e..53a90944d 100644 --- a/include/data2.h +++ b/include/data2.h @@ -3,12 +3,7 @@ #include "sprite.h" -struct UnknownStructD2 -{ - u32 unk0; - u32 unk4; - u32 unk8; -}; +struct UnknownTaskStruct; struct MonCoords { @@ -47,7 +42,7 @@ extern u8 gSpeciesNames[][11]; extern const u8 gMoveNames[][13]; extern const u8 gAbilityNames[][13]; extern const u8 gTypeNames[][7]; -extern const struct UnknownStructD2 gUnknown_081F9674; +extern const struct UnknownTaskStruct gUnknown_081F9674; extern const u8 gUnknown_081F96C8[]; extern struct CompressedSpriteSheet gUnknown_081FAEA4; extern struct CompressedSpritePalette gUnknown_081FAEAC; diff --git a/include/menu.h b/include/menu.h index bdf59b8f0..3cf47b9b8 100644 --- a/include/menu.h +++ b/include/menu.h @@ -43,7 +43,7 @@ u16 unref_sub_8071F98(u8, u8); void unref_sub_8071FBC(u16, u8, u8, u8, u8); void MenuDisplayMessageBox(void); void MenuPrintMessage(const u8 *, u8, u8); -void sub_8072044(const u8 *); +void MenuPrintMessageDefaultCoords(const u8 *); void MenuSetText(const u8 *); u8 MenuUpdateWindowText(void); u8 unref_sub_8072098(void); diff --git a/include/start_menu.h b/include/start_menu.h index 5169b3bf0..d3f77dc99 100644 --- a/include/start_menu.h +++ b/include/start_menu.h @@ -5,7 +5,7 @@ void CreateStartMenuTask(void (*func)(u8)); void sub_80712B4(u8 taskId); void sub_8071310(void); -void InitSaveDialog(void); +void ScrSpecial_DoSaveDialog(void); void sub_8071B28(void); #endif // GUARD_STARTER_CHOOSE_H diff --git a/include/wild_encounter.h b/include/wild_encounter.h index 1a0b6982d..d4b343126 100644 --- a/include/wild_encounter.h +++ b/include/wild_encounter.h @@ -28,9 +28,9 @@ extern struct WildPokemonHeader gWildMonHeaders[]; void DisableWildEncounters(bool8 disabled); bool8 StandardWildEncounter(u16 a, u16 b); -void RockSmashWildEncounter(void); +void ScrSpecial_RockSmashWildEncounter(void); bool8 SweetScentWildEncounter(void); -bool8 GetFishingWildMonListHeader(void); +bool8 DoesCurrentMapHaveFishingMons(void); void FishingWildEncounter(u8 rod); u16 GetLocalWildMon(bool8 *isWaterMon); u16 GetLocalWaterMon(void); diff --git a/src/battle_2.c b/src/battle_2.c index 7092a857b..3cdea07be 100644 --- a/src/battle_2.c +++ b/src/battle_2.c @@ -239,7 +239,8 @@ void InitBattle(void) gUnknown_03004DE0.unk0[i] = 0xFF10; gUnknown_03004DE0.unk780[i] = 0xFF10; } - sub_80895F8(gUnknown_081F9674.unk0, gUnknown_081F9674.unk4, gUnknown_081F9674.unk8); + //sub_80895F8(gUnknown_081F9674.unk0, gUnknown_081F9674.unk4, gUnknown_081F9674.unk8); + sub_80895F8(gUnknown_081F9674); SetUpWindowConfig(&gWindowConfig_81E6C58); ResetPaletteFade(); gUnknown_030042A4 = 0; diff --git a/src/cable_club.c b/src/cable_club.c index 271bf1e3b..7a85f2b6c 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -647,7 +647,7 @@ static void sub_80837EC(u8 taskId) void sub_8083820(void) { - InitSaveDialog(); + ScrSpecial_DoSaveDialog(); } static void sub_808382C(u8 taskId) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 5d06e5fb1..fc194d513 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1406,7 +1406,7 @@ static void sub_805A2D0(u8 taskId) /* Fishing */ -static u8 (*const gUnknown_0830FCB4[])(struct Task *) = +static u8 (*const sFishingStateFuncs[])(struct Task *) = { Fishing1, Fishing2, @@ -1429,17 +1429,33 @@ static u8 (*const gUnknown_0830FCB4[])(struct Task *) = static void Task_Fishing(u8 taskId); static void sub_805A954(void); -void StartFishing(u8 a) +#define tStep data[0] +#define tFrameCounter data[1] +#define tNumDots data[2] +#define tDotsRequired data[3] +#define tRoundsPlayed data[12] +#define tMinRoundsRequired data[13] +#define tPlayerGfxId data[14] +#define tFishingRod data[15] + +#define FISHING_START_ROUND 3 +#define FISHING_GOT_BITE 6 +#define FISHING_ON_HOOK 9 +#define FISHING_NO_BITE 11 +#define FISHING_GOT_AWAY 12 +#define FISHING_SHOW_RESULT 13 + +void StartFishing(u8 rod) { u8 taskId = CreateTask(Task_Fishing, 0xFF); - gTasks[taskId].data[15] = a; + gTasks[taskId].tFishingRod = rod; Task_Fishing(taskId); } static void Task_Fishing(u8 taskId) { - while (gUnknown_0830FCB4[gTasks[taskId].data[0]](&gTasks[taskId])) + while (sFishingStateFuncs[gTasks[taskId].tStep](&gTasks[taskId])) ; } @@ -1447,7 +1463,7 @@ u8 Fishing1(struct Task *task) { ScriptContext2_Enable(); gPlayerAvatar.unk6 = 1; - task->data[0]++; + task->tStep++; return 0; } @@ -1457,23 +1473,25 @@ u8 Fishing2(struct Task *task) const s16 arr1[] = {1, 1, 1}; const s16 arr2[] = {1, 3, 6}; - task->data[12] = 0; - task->data[13] = arr1[task->data[15]] + (Random() % arr2[task->data[15]]); - task->data[14] = gMapObjects[gPlayerAvatar.mapObjectId].graphicsId; + task->tRoundsPlayed = 0; + task->tMinRoundsRequired = arr1[task->tFishingRod] + (Random() % arr2[task->tFishingRod]); + task->tPlayerGfxId = gMapObjects[gPlayerAvatar.mapObjectId].graphicsId; playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId]; FieldObjectClearAnimIfSpecialAnimActive(playerMapObj); playerMapObj->mapobj_bit_11 = 1; sub_8059C3C(playerMapObj->mapobj_unk_18); - task->data[0]++; + task->tStep++; return 0; } u8 Fishing3(struct Task *task) { sub_805A954(); - task->data[1]++; - if (task->data[1] > 0x3B) - task->data[0]++; + + // Wait one second before starting dot game + task->tFrameCounter++; + if (task->tFrameCounter >= 60) + task->tStep++; return 0; } @@ -1482,87 +1500,92 @@ u8 Fishing4(struct Task *task) u32 randVal; MenuDisplayMessageBox(); - task->data[0]++; - task->data[1] = 0; - task->data[2] = 0; + task->tStep++; + task->tFrameCounter = 0; + task->tNumDots = 0; randVal = Random(); randVal %= 10; - task->data[3] = randVal + 1; - if (task->data[12] == 0) - task->data[3] = randVal + 4; - if (task->data[3] > 9) - task->data[3] = 10; + task->tDotsRequired = randVal + 1; + if (task->tRoundsPlayed == 0) + task->tDotsRequired = randVal + 4; + if (task->tDotsRequired >= 10) + task->tDotsRequired = 10; return 1; } +// Play a round of the dot game u8 Fishing5(struct Task *task) { const u8 dot[] = _("·"); sub_805A954(); - task->data[1]++; + task->tFrameCounter++; if (gMain.newKeys & A_BUTTON) { - task->data[0] = 11; - if (task->data[12] != 0) - task->data[0] = 12; + task->tStep = FISHING_NO_BITE; + if (task->tRoundsPlayed != 0) + task->tStep = FISHING_GOT_AWAY; return 1; } else { - if (task->data[1] > 0x13) + if (task->tFrameCounter >= 20) { - task->data[1] = 0; - if (task->data[2] >= task->data[3]) + task->tFrameCounter = 0; + if (task->tNumDots >= task->tDotsRequired) { - task->data[0]++; - if (task->data[12] != 0) - task->data[0]++; - task->data[12]++; + task->tStep++; + if (task->tRoundsPlayed != 0) + task->tStep++; + task->tRoundsPlayed++; } else { - MenuPrint(dot, task->data[2] + 4, 15); - task->data[2]++; + MenuPrint(dot, task->tNumDots + 4, 15); + task->tNumDots++; } } return 0; } } +// Determine if fish bites u8 Fishing6(struct Task *task) { sub_805A954(); - task->data[0]++; - if (!GetFishingWildMonListHeader() || (Random() & 1)) - task->data[0] = 11; + task->tStep++; + if (!DoesCurrentMapHaveFishingMons() || (Random() & 1)) + task->tStep = FISHING_NO_BITE; else StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], sub_805FE08(player_get_direction_lower_nybble())); return 1; } +// Oh! A Bite! u8 Fishing7(struct Task *task) { sub_805A954(); MenuPrint(gOtherText_OhABite, 4, 17); - task->data[0]++; - task->data[1] = 0; + task->tStep++; + task->tFrameCounter = 0; return 0; } +// We have a bite. Now, wait for the player to press A, or the timer to expire. u8 Fishing8(struct Task *task) { - const s16 arr[3] = {36, 33, 30}; + const s16 reelTimeouts[3] = {36, 33, 30}; sub_805A954(); - task->data[1]++; - if (task->data[1] >= arr[task->data[15]]) - task->data[0] = 12; + task->tFrameCounter++; + if (task->tFrameCounter >= reelTimeouts[task->tFishingRod]) + task->tStep = FISHING_GOT_AWAY; else if (gMain.newKeys & A_BUTTON) - task->data[0]++; + task->tStep++; return 0; } +// Determine if we're going to play the dot game again u8 Fishing9(struct Task *task) { const s16 arr[][2] = @@ -1573,17 +1596,18 @@ u8 Fishing9(struct Task *task) }; sub_805A954(); - task->data[0]++; - if (task->data[12] < task->data[13]) + task->tStep++; + if (task->tRoundsPlayed < task->tMinRoundsRequired) { - task->data[0] = 3; + task->tStep = FISHING_START_ROUND; } - else if (task->data[12] < 2) + else if (task->tRoundsPlayed < 2) { - s16 randVal = Random() % 100; + // probability of having to play another round + s16 probability = Random() % 100; - if (arr[task->data[15]][task->data[12]] > randVal) - task->data[0] = 3; + if (arr[task->tFishingRod][task->tRoundsPlayed] > probability) + task->tStep = FISHING_START_ROUND; } return 0; } @@ -1591,72 +1615,73 @@ u8 Fishing9(struct Task *task) u8 Fishing10(struct Task *task) { sub_805A954(); - sub_8072044(gOtherText_PokeOnHook); + MenuPrintMessageDefaultCoords(gOtherText_PokeOnHook); MenuDisplayMessageBox(); - task->data[0]++; - task->data[1] = 0; + task->tStep++; + task->tFrameCounter = 0; return 0; } u8 Fishing11(struct Task *task) { - if (task->data[1] == 0) - { + if (task->tFrameCounter == 0) sub_805A954(); - if (task->data[1] == 0) + + if (task->tFrameCounter == 0) + { + if (MenuUpdateWindowText()) { - if (MenuUpdateWindowText()) - { - struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId]; - - sub_805B980(playerMapObj, task->data[14]); - FieldObjectTurn(playerMapObj, playerMapObj->placeholder18); - if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING) - sub_8127F28(gMapObjects[gPlayerAvatar.mapObjectId].mapobj_unk_1A, 0, 0); - gSprites[gPlayerAvatar.spriteId].pos2.x = 0; - gSprites[gPlayerAvatar.spriteId].pos2.y = 0; - MenuZeroFillScreen(); - task->data[1]++; - return 0; - } - else - { - if (task->data[1] == 0) - return 0; - } + struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId]; + + sub_805B980(playerMapObj, task->tPlayerGfxId); + FieldObjectTurn(playerMapObj, playerMapObj->placeholder18); + if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING) + sub_8127F28(gMapObjects[gPlayerAvatar.mapObjectId].mapobj_unk_1A, 0, 0); + gSprites[gPlayerAvatar.spriteId].pos2.x = 0; + gSprites[gPlayerAvatar.spriteId].pos2.y = 0; + MenuZeroFillScreen(); + task->tFrameCounter++; + return 0; } } - gPlayerAvatar.unk6 = 0; - ScriptContext2_Disable(); - FishingWildEncounter(task->data[15]); - sub_80BE97C(1); - DestroyTask(FindTaskIdByFunc(Task_Fishing)); + + if (task->tFrameCounter != 0) + { + gPlayerAvatar.unk6 = 0; + ScriptContext2_Disable(); + FishingWildEncounter(task->tFishingRod); + sub_80BE97C(1); + DestroyTask(FindTaskIdByFunc(Task_Fishing)); + } return 0; } +// Not even a nibble u8 Fishing12(struct Task *task) { sub_805A954(); StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], sub_805FDF8(player_get_direction_lower_nybble())); - sub_8072044(gOtherText_NotEvenANibble); - task->data[0] = 13; + MenuPrintMessageDefaultCoords(gOtherText_NotEvenANibble); + task->tStep = FISHING_SHOW_RESULT; return 1; } +// It got away u8 Fishing13(struct Task *task) { sub_805A954(); StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], sub_805FDF8(player_get_direction_lower_nybble())); - sub_8072044(gOtherText_ItGotAway); - task->data[0]++; + MenuPrintMessageDefaultCoords(gOtherText_ItGotAway); + task->tStep++; return 1; } +// Display the message u8 Fishing14(struct Task *task) { sub_805A954(); MenuDisplayMessageBox(); - task->data[0]++; + task->tStep++; return 0; } @@ -1667,13 +1692,13 @@ u8 Fishing15(struct Task *task) { struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId]; - sub_805B980(playerMapObj, task->data[14]); + sub_805B980(playerMapObj, task->tPlayerGfxId); FieldObjectTurn(playerMapObj, playerMapObj->placeholder18); if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING) sub_8127F28(gMapObjects[gPlayerAvatar.mapObjectId].mapobj_unk_1A, 0, 0); gSprites[gPlayerAvatar.spriteId].pos2.x = 0; gSprites[gPlayerAvatar.spriteId].pos2.y = 0; - task->data[0]++; + task->tStep++; } return 0; } @@ -1692,6 +1717,10 @@ u8 Fishing16(struct Task *task) return 0; } +#undef tStep +#undef tFrameCounter +#undef tFishingRod + static void sub_805A954(void) { struct Sprite *playerSprite = &gSprites[gPlayerAvatar.spriteId]; diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index dedd80237..1464a99b1 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -23,9 +23,9 @@ const static u16 gUnknown_0839ACDC[] = { 0xC8, 0x48, 0x38, 0x28, 0x18, 0x0 }; const s32 gMaxFlashLevel = 4; -const static u32 gUnknown_0839ACEC[3] = +const static struct UnknownTaskStruct gUnknown_0839ACEC = { - REG_ADDR_WIN0H, + (void *)REG_ADDR_WIN0H, ((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_DEST_RELOAD) << 16) | 1, 1 }; @@ -220,7 +220,8 @@ static void sub_80816A8(u8 taskId) REG_WINOUT = 30; sub_8081398(&gUnknown_03004DE0[0][0], data[2], data[3], 1); CpuFastSet(&gUnknown_03004DE0[0], &gUnknown_03004DE0[1], 480); - sub_80895F8(gUnknown_0839ACEC[0], gUnknown_0839ACEC[1], gUnknown_0839ACEC[2]); + //sub_80895F8(gUnknown_0839ACEC[0], gUnknown_0839ACEC[1], gUnknown_0839ACEC[2]); + sub_80895F8(gUnknown_0839ACEC); data[0] = 1; break; case 1: diff --git a/src/menu.c b/src/menu.c index 31bafa509..a9c4aaa43 100644 --- a/src/menu.c +++ b/src/menu.c @@ -205,7 +205,7 @@ void MenuPrintMessage(const u8 *str, u8 left, u8 top) sub_8002EB0(gMenuWindowPtr, str, gMenuTextTileOffset, left, top); } -void sub_8072044(const u8 *str) +void MenuPrintMessageDefaultCoords(const u8 *str) { sub_8002EB0(gMenuWindowPtr, str, gMenuTextTileOffset, 2, 15); } diff --git a/src/menu_helpers.c b/src/menu_helpers.c index eb00e72da..14e823355 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -140,7 +140,7 @@ static void PrintMessage(const u8 *str, u16 tile) { sub_80A3FA0(&gBGTilemapBuffers[1][0], 2, 15, 26, 4, tile); } - sub_8072044(str); + MenuPrintMessageDefaultCoords(str); } static void sub_80F9090(u8 taskId) diff --git a/src/mystery_event_menu.c b/src/mystery_event_menu.c index 46b76fd88..0e48dc177 100644 --- a/src/mystery_event_menu.c +++ b/src/mystery_event_menu.c @@ -94,7 +94,7 @@ static void CB2_MysteryEventMenu(void) case 1: if (gPaletteFade.active) break; - sub_8072044(gSystemText_LinkStandby); + MenuPrintMessageDefaultCoords(gSystemText_LinkStandby); gMain.state++; break; case 2: @@ -109,7 +109,7 @@ static void CB2_MysteryEventMenu(void) if ((gLinkStatus & 0x20) && (gLinkStatus & 0x1C) > 4) { PlaySE(SE_PIN); - sub_8072044(gSystemText_LoadEventPressA); + MenuPrintMessageDefaultCoords(gSystemText_LoadEventPressA); gMain.state++; } if (gMain.newKeys & B_BUTTON) @@ -128,7 +128,7 @@ static void CB2_MysteryEventMenu(void) if (GetLinkPlayerCount_2() != 2) { GetEventLoadMessage(gStringVar4, 1); - sub_8072044(gStringVar4); + MenuPrintMessageDefaultCoords(gStringVar4); gMain.state = 13; break; } @@ -158,13 +158,13 @@ static void CB2_MysteryEventMenu(void) sub_800832C(); MenuZeroFillWindowRect(6, 5, 23, 8); GetEventLoadMessage(gStringVar4, 1); - sub_8072044(gStringVar4); + MenuPrintMessageDefaultCoords(gStringVar4); gMain.state = 13; break; } else if (CheckLanguageMatch()) { - sub_8072044(gSystemText_DontCutLink); + MenuPrintMessageDefaultCoords(gSystemText_DontCutLink); gMain.state++; break; } @@ -173,7 +173,7 @@ static void CB2_MysteryEventMenu(void) CloseLink(); MenuZeroFillWindowRect(6, 5, 23, 8); GetEventLoadMessage(gStringVar4, 1); - sub_8072044(gStringVar4); + MenuPrintMessageDefaultCoords(gStringVar4); gMain.state = 13; break; } @@ -222,7 +222,7 @@ static void CB2_MysteryEventMenu(void) sub_800832C(); MenuZeroFillWindowRect(6, 5, 23, 8); GetEventLoadMessage(gStringVar4, 1); - sub_8072044(gStringVar4); + MenuPrintMessageDefaultCoords(gStringVar4); ptr = (u8 *)&gMain; offset1 = offsetof(struct Main, state); asm("" ::: "r1"); @@ -234,7 +234,7 @@ static void CB2_MysteryEventMenu(void) register u8 *ptr2 asm("r1"); register int offset3 asm("r0"); register int dummy asm("r2"); - sub_8072044(gSystemText_DontCutLink); + MenuPrintMessageDefaultCoords(gSystemText_DontCutLink); ptr2 = (u8 *)&gMain; offset3 = offsetof(struct Main, state); if (dummy) @@ -249,7 +249,7 @@ static void CB2_MysteryEventMenu(void) MenuZeroFillWindowRect(6, 5, 23, 8); label: GetEventLoadMessage(gStringVar4, 1); - sub_8072044(gStringVar4); + MenuPrintMessageDefaultCoords(gStringVar4); ptr = (u8 *)&gMain; offset2 = offsetof(struct Main, state); ptr += offset2; @@ -294,7 +294,7 @@ static void CB2_MysteryEventMenu(void) gMain.state++; break; case 12: - sub_8072044(gStringVar4); + MenuPrintMessageDefaultCoords(gStringVar4); gMain.state++; break; case 13: @@ -329,7 +329,7 @@ static void CB2_MysteryEventMenu(void) CloseLink(); MenuZeroFillWindowRect(6, 5, 23, 8); GetEventLoadMessage(gStringVar4, 1); - sub_8072044(gStringVar4); + MenuPrintMessageDefaultCoords(gStringVar4); gMain.state = 13; } } diff --git a/src/naming_screen.c b/src/naming_screen.c index 6c107f022..3f8417e6d 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -1618,7 +1618,7 @@ static void DisplaySentToPCMessage(void) StringExpandPlaceholders(gStringVar4, gOtherText_SentToPC); BasicInitMenuWindow(&gWindowConfig_81E6E88); MenuDisplayMessageBox(); - sub_8072044(gStringVar4); + MenuPrintMessageDefaultCoords(gStringVar4); } static void sub_80B753C(void) diff --git a/src/overworld.c b/src/overworld.c index c3b503a2f..a108f14de 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -455,6 +455,7 @@ void copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused) void sub_8053538(u8 a1) { const struct HealLocation *warp = GetHealLocation(a1); + if (warp) warp1_set(warp->group, warp->map, -1, warp->x, warp->y); } diff --git a/src/secret_base.c b/src/secret_base.c index 16f7c4e2c..6f9a2d0b0 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -270,7 +270,7 @@ void sub_80BBAF0(void) bool8 sub_80BBB24(void) { - if (gMapHeader.mapType == 9 && VarGet(VAR_0x4097) == 0) + if (gMapHeader.mapType == MAP_TYPE_SECRET_BASE && VarGet(VAR_0x4097) == 0) return FALSE; return TRUE; } diff --git a/src/start_menu.c b/src/start_menu.c index 7e3af9886..6e44090df 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -505,7 +505,7 @@ static u8 RunSaveDialogCallback(void) return saveDialogCallback(); } -void InitSaveDialog(void) +void ScrSpecial_DoSaveDialog(void) { sub_807160C(); CreateTask(Task_SaveDialog, 0x50); @@ -515,7 +515,7 @@ static void DisplaySaveMessageWithCallback(const u8 *ptr, u8 (*func)(void)) { StringExpandPlaceholders(gStringVar4, ptr); MenuDisplayMessageBox(); - sub_8072044(gStringVar4); + MenuPrintMessageDefaultCoords(gStringVar4); savingComplete = TRUE; saveDialogCallback = func; } @@ -942,7 +942,6 @@ void sub_80BE97C(bool8 flag) void sub_80BE9D4(void) { - //TVShow *show; gUnknown_03005D38.var0 = sub_80BF74C(gSaveBlock1.tvShows); if (gUnknown_03005D38.var0 != -1 && sub_80BF1B4(TVSHOW_FISHING_ADVICE) != 1) { diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 519cd7893..5c06ebb14 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -3363,7 +3363,7 @@ bool8 StandardWildEncounter(u16 a, u16 b) return 0; } -void RockSmashWildEncounter(void) +void ScrSpecial_RockSmashWildEncounter(void) { u16 headerNum = GetCurrentMapWildMonHeader(); @@ -3433,7 +3433,7 @@ bool8 SweetScentWildEncounter(void) return FALSE; } -bool8 GetFishingWildMonListHeader(void) +bool8 DoesCurrentMapHaveFishingMons(void) { u16 headerNum = GetCurrentMapWildMonHeader(); |