summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2020-03-31 08:49:47 -0400
committerPikalaxALT <PikalaxALT@gmail.com>2020-03-31 08:49:47 -0400
commitaf3253561005bccb62ef41a08810d4dd1a5b4ded (patch)
tree3eaec499311f0dda67f49e3440c0e2dac6f18acc
parent4134baf3eb64cc6c17ade48ed27507f9f84a96c5 (diff)
Name all specials
-rw-r--r--data/event_scripts.s6
-rw-r--r--data/maps/BirthIsland_Exterior/scripts.inc2
-rw-r--r--data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc2
-rw-r--r--data/maps/CeruleanCave_B1F/scripts.inc2
-rw-r--r--data/maps/CeruleanCity_House4/scripts.inc2
-rw-r--r--data/maps/FiveIsland_MemorialPillar/scripts.inc2
-rw-r--r--data/maps/FiveIsland_ResortGorgeous_House/scripts.inc2
-rw-r--r--data/maps/FiveIsland_WaterLabyrinth/scripts.inc2
-rw-r--r--data/maps/FourIsland/scripts.inc2
-rw-r--r--data/maps/MtEmber_Summit/scripts.inc2
-rw-r--r--data/maps/MtMoon_B2F/scripts.inc4
-rw-r--r--data/maps/NavelRock_Base/scripts.inc2
-rw-r--r--data/maps/NavelRock_Summit/scripts.inc2
-rw-r--r--data/maps/OneIsland_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/PalletTown/scripts.inc2
-rw-r--r--data/maps/PalletTown_GarysHouse/scripts.inc2
-rw-r--r--data/maps/PalletTown_ProfessorOaksLab/scripts.inc4
-rw-r--r--data/maps/PewterCity/scripts.inc2
-rw-r--r--data/maps/PokemonTower_6F/scripts.inc2
-rw-r--r--data/maps/PowerPlant/scripts.inc6
-rw-r--r--data/maps/Route12/scripts.inc2
-rw-r--r--data/maps/Route12_FishingHouse/scripts.inc2
-rw-r--r--data/maps/Route16/scripts.inc2
-rw-r--r--data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc2
-rw-r--r--data/maps/SeafoamIslands_B4F/scripts.inc4
-rw-r--r--data/maps/SixIsland_WaterPath_House1/scripts.inc2
-rw-r--r--data/maps/ThreeIsland_BerryForest/scripts.inc2
-rw-r--r--data/maps/TwoIsland_House/scripts.inc2
-rw-r--r--data/maps/VermilionCity/scripts.inc2
-rw-r--r--data/maps/VermilionCity_Gym/scripts.inc2
-rw-r--r--data/maps/ViridianCity/scripts.inc4
-rw-r--r--data/scripts/cable_club.inc16
-rw-r--r--data/scripts/move_tutors.inc4
-rw-r--r--data/scripts/pokedex_rating.inc2
-rw-r--r--data/scripts/questionnaire.inc2
-rw-r--r--data/scripts/seagallop.inc2
-rw-r--r--data/scripts/trainer_card.inc2
-rw-r--r--data/specials.inc20
-rw-r--r--include/event_scripts.h2
-rw-r--r--include/field_player_avatar.h2
-rw-r--r--include/link.h4
-rw-r--r--include/quest_log.h2
-rw-r--r--include/save_location.h4
-rw-r--r--include/script.h2
-rw-r--r--include/vs_seeker.h6
-rw-r--r--src/battle_setup.c10
-rw-r--r--src/cable_club.c6
-rw-r--r--src/event_object_lock.c4
-rw-r--r--src/field_control_avatar.c8
-rw-r--r--src/field_player_avatar.c4
-rw-r--r--src/field_specials.c4
-rw-r--r--src/item_menu.c2
-rw-r--r--src/overworld.c2
-rw-r--r--src/quest_log.c110
-rw-r--r--src/save_location.c6
-rw-r--r--src/script.c16
-rw-r--r--src/start_menu.c2
-rw-r--r--src/vs_seeker.c77
58 files changed, 198 insertions, 201 deletions
diff --git a/data/event_scripts.s b/data/event_scripts.s
index 0a54d8e1a..ec9409782 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -1223,10 +1223,10 @@ EventScript_DoInGameTrade:: @ 81A8CD9
faceplayer
return
-gUnknown_81A8CED:: @ 81A8CED
- special sub_810C3A4
+EventScript_VsSeekerChargingDone:: @ 81A8CED
+ special VsSeekerFreezeObjectsAfterChargeComplete
waitstate
- special sub_810C444
+ special VsSeekerResetObjectMovementAfterChargeComplete
releaseall
end
diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc
index 2f26f58ab..01417f0d1 100644
--- a/data/maps/BirthIsland_Exterior/scripts.inc
+++ b/data/maps/BirthIsland_Exterior/scripts.inc
@@ -43,7 +43,7 @@ BirthIsland_Exterior_EventScript_Triangle:: @ 8165271
lock
faceplayer
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
special DoDeoxysTriangleInteraction
waitstate
switch VAR_RESULT
diff --git a/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc b/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc
index fb7cac74d..fe0d13a8a 100644
--- a/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc
+++ b/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc
@@ -3,7 +3,7 @@ CeladonCity_DepartmentStore_Roof_MapScripts:: @ 816BCCC
CeladonCity_DepartmentStore_Roof_EventScript_ThirstyGirl:: @ 816BCCD
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
call CeladonCity_DepartmentStore_Roof_EventScript_CheckPlayerHasDrinks
diff --git a/data/maps/CeruleanCave_B1F/scripts.inc b/data/maps/CeruleanCave_B1F/scripts.inc
index e040978fc..ee0cd370e 100644
--- a/data/maps/CeruleanCave_B1F/scripts.inc
+++ b/data/maps/CeruleanCave_B1F/scripts.inc
@@ -24,7 +24,7 @@ CeruleanCave_B1F_EventScript_ShowMewtwo:: @ 81624F1
CeruleanCave_B1F_EventScript_Mewtwo:: @ 81624F5
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
waitse
diff --git a/data/maps/CeruleanCity_House4/scripts.inc b/data/maps/CeruleanCity_House4/scripts.inc
index b27579cee..5d63feb07 100644
--- a/data/maps/CeruleanCity_House4/scripts.inc
+++ b/data/maps/CeruleanCity_House4/scripts.inc
@@ -3,7 +3,7 @@ CeruleanCity_House4_MapScripts:: @ 816ACEE
CeruleanCity_House4_EventScript_WonderNewsBerryMan:: @ 816ACEF
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
specialvar VAR_0x8004, GetMENewsJisanItemAndState
copyvar VAR_0x8008, VAR_RESULT
diff --git a/data/maps/FiveIsland_MemorialPillar/scripts.inc b/data/maps/FiveIsland_MemorialPillar/scripts.inc
index 7fd2a810d..19115df34 100644
--- a/data/maps/FiveIsland_MemorialPillar/scripts.inc
+++ b/data/maps/FiveIsland_MemorialPillar/scripts.inc
@@ -33,7 +33,7 @@ FiveIsland_MemorialPillar_EventScript_ReturnedForTM42:: @ 8168A22
FiveIsland_MemorialPillar_EventScript_Memorial:: @ 8168A48
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lockall
goto_if_set FLAG_GOT_TM42_AT_MEMORIAL_PILLAR, FiveIsland_MemorialPillar_EventScript_MemorialLemonadeAlreadyPlaced
goto_if_set FLAG_NO_ROOM_FOR_TM42_AT_MEMORIAL_PILLAR, FiveIsland_MemorialPillar_EventScript_MemorialLemonadeAlreadyPlaced
diff --git a/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc b/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc
index 4a5662865..0d70919dd 100644
--- a/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc
+++ b/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc
@@ -8,7 +8,7 @@ FiveIsland_ResortGorgeous_House_MapScripts:: @ 8171EBD
FiveIsland_ResortGorgeous_House_EventScript_Selphy:: @ 8171EBE
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
goto_if_set SHOWN_REQUESTED_MON, FiveIsland_ResortGorgeous_House_EventScript_JustFulfilledRequest
diff --git a/data/maps/FiveIsland_WaterLabyrinth/scripts.inc b/data/maps/FiveIsland_WaterLabyrinth/scripts.inc
index 956652eb7..875cb284e 100644
--- a/data/maps/FiveIsland_WaterLabyrinth/scripts.inc
+++ b/data/maps/FiveIsland_WaterLabyrinth/scripts.inc
@@ -3,7 +3,7 @@ FiveIsland_WaterLabyrinth_MapScripts:: @ 816884D
FiveIsland_WaterLabyrinth_EventScript_EggGentleman:: @ 816884E
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
goto_if_set FLAG_GOT_TOGEPI_EGG, FiveIsland_WaterLabyrinth_EventScript_PostEggComment
diff --git a/data/maps/FourIsland/scripts.inc b/data/maps/FourIsland/scripts.inc
index f8de01374..17f509515 100644
--- a/data/maps/FourIsland/scripts.inc
+++ b/data/maps/FourIsland/scripts.inc
@@ -73,7 +73,7 @@ FourIsland_Movement_PlayerWatchRivalExit:: @ 8167D52
FourIsland_EventScript_DaycareMan:: @ 8167D55
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
special GetDaycareMonNicknames
diff --git a/data/maps/MtEmber_Summit/scripts.inc b/data/maps/MtEmber_Summit/scripts.inc
index fef05c1ce..815a86ddc 100644
--- a/data/maps/MtEmber_Summit/scripts.inc
+++ b/data/maps/MtEmber_Summit/scripts.inc
@@ -24,7 +24,7 @@ MtEmber_Summit_EventScript_ShowMoltres:: @ 8163B2F
MtEmber_Summit_EventScript_Moltres:: @ 8163B33
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
setwildbattle SPECIES_MOLTRES, 50, ITEM_NONE
diff --git a/data/maps/MtMoon_B2F/scripts.inc b/data/maps/MtMoon_B2F/scripts.inc
index 515242568..46a308ce9 100644
--- a/data/maps/MtMoon_B2F/scripts.inc
+++ b/data/maps/MtMoon_B2F/scripts.inc
@@ -63,7 +63,7 @@ MtMoon_B2F_EventScript_DomeFossil:: @ 816071B
removeobject LOCALID_DOME_FOSSIL
giveitem_msg MtMoon_B2F_Text_ObtainedDomeFossil, ITEM_DOME_FOSSIL, 1, MUS_FAN5
closemessage
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
delay 10
applymovement LOCALID_MIGUEL, MtMoon_B2F_Movement_MiguelToHelixFossil
waitmovement 0
@@ -95,7 +95,7 @@ MtMoon_B2F_EventScript_HelixFossil:: @ 816077F
removeobject LOCALID_HELIX_FOSSIL
giveitem_msg MtMoon_B2F_Text_ObtainedHelixFossil, ITEM_HELIX_FOSSIL, 1, MUS_FAN5
closemessage
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
delay 10
applymovement LOCALID_MIGUEL, MtMoon_B2F_Movement_MiguelToDomeFossil
waitmovement 0
diff --git a/data/maps/NavelRock_Base/scripts.inc b/data/maps/NavelRock_Base/scripts.inc
index 707ad84f7..a47454024 100644
--- a/data/maps/NavelRock_Base/scripts.inc
+++ b/data/maps/NavelRock_Base/scripts.inc
@@ -30,7 +30,7 @@ NavelRock_Base_EventScript_TryRemoveLugia:: @ 8165120
NavelRock_Base_EventScript_Lugia:: @ 8165134
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
waitse
diff --git a/data/maps/NavelRock_Summit/scripts.inc b/data/maps/NavelRock_Summit/scripts.inc
index b2983cf47..93e1fcdb1 100644
--- a/data/maps/NavelRock_Summit/scripts.inc
+++ b/data/maps/NavelRock_Summit/scripts.inc
@@ -33,7 +33,7 @@ NavelRock_Summit_EventScript_TryRemoveHoOh:: @ 8164FE7
NavelRock_Summit_EventScript_HoOh:: @ 8164FFB
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lockall
setvar VAR_TEMP_1, 1
special SpawnCameraObject
diff --git a/data/maps/OneIsland_PokemonCenter_1F/scripts.inc b/data/maps/OneIsland_PokemonCenter_1F/scripts.inc
index 67c48c033..524c99272 100644
--- a/data/maps/OneIsland_PokemonCenter_1F/scripts.inc
+++ b/data/maps/OneIsland_PokemonCenter_1F/scripts.inc
@@ -289,7 +289,7 @@ OneIsland_PokemonCenter_1F_EventScript_GiveCelioSapphire:: @ 8170FA5
applymovement LOCALID_CELIO, Movement_FacePlayer
waitmovement 0
msgbox OneIsland_PokemonCenter_1F_Text_ManagedToLinkWithHoennThankYou
- special sub_810B82C
+ special SetPostgameFlags
setflag FLAG_SYS_CAN_LINK_WITH_RS
setflag FLAG_HIDE_CERULEAN_CAVE_GUARD
setflag FLAG_HIDE_LORELEI_IN_HER_HOUSE
diff --git a/data/maps/PalletTown/scripts.inc b/data/maps/PalletTown/scripts.inc
index 1b98d4cb4..62e9d8a01 100644
--- a/data/maps/PalletTown/scripts.inc
+++ b/data/maps/PalletTown/scripts.inc
@@ -451,7 +451,7 @@ PalletTown_EventScript_SignLadyShowSign:: @ 8165894
setvar VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1
setvar SIGN_LADY_READY, FALSE
special SetWalkingIntoSignVars
- special sub_80699BC
+ special DisableMsgBoxWalkaway
signmsg
msgbox PalletTown_Text_PressStartToOpenMenuCopy
normalmsg
diff --git a/data/maps/PalletTown_GarysHouse/scripts.inc b/data/maps/PalletTown_GarysHouse/scripts.inc
index be4e8dd09..a595182fe 100644
--- a/data/maps/PalletTown_GarysHouse/scripts.inc
+++ b/data/maps/PalletTown_GarysHouse/scripts.inc
@@ -50,7 +50,7 @@ PalletTown_GarysHouse_EventScript_HeardBattledRival:: @ 8168DAF
PalletTown_GarysHouse_EventScript_GroomMon:: @ 8168DB9
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
compare VAR_MASSAGE_COOLDOWN_STEP_COUNTER, 500
goto_if_lt PalletTown_GarysHouse_EventScript_RateMonFriendship
msgbox PalletTown_GarysHouse_Text_LikeMeToGroomMon, MSGBOX_YESNO
diff --git a/data/maps/PalletTown_ProfessorOaksLab/scripts.inc b/data/maps/PalletTown_ProfessorOaksLab/scripts.inc
index facebea6b..fecfd0b48 100644
--- a/data/maps/PalletTown_ProfessorOaksLab/scripts.inc
+++ b/data/maps/PalletTown_ProfessorOaksLab/scripts.inc
@@ -723,7 +723,7 @@ PalletTown_ProfessorOaksLab_EventScript_ReceiveDexScene:: @ 816961E
waitfanfare
call EventScript_RestorePrevTextColor
setflag FLAG_SYS_POKEDEX_GET
- special sub_810B810
+ special SetUnlockedPokedexFlags
setvar VAR_MAP_SCENE_POKEMON_CENTER_TEALA, 1
msgbox PalletTown_ProfessorOaksLab_Text_OakCatchMonsForDataTakeThese
giveitem_msg PalletTown_ProfessorOaksLab_Text_ReceivedFivePokeBalls, ITEM_POKE_BALL, 5
@@ -1000,7 +1000,7 @@ PalletTown_ProfessorOaksLab_EventScript_DontStartNationalDexScene:: @ 81699F9
PalletTown_ProfessorOaksLab_EventScript_CheckIfPlayerNeedsBalls:: @ 81699FB
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
goto_if_set FLAG_OAK_SKIP_22_RIVAL_CHECK, PalletTown_ProfessorOaksLab_EventScript_MonsAroundWorldWait
goto_if_set FLAG_GOT_POKEBALLS_FROM_OAK_AFTER_22_RIVAL, PalletTown_ProfessorOaksLab_EventScript_PlayerAlreadyGotBalls
checkitem ITEM_POKE_BALL, 1
diff --git a/data/maps/PewterCity/scripts.inc b/data/maps/PewterCity/scripts.inc
index c50fcdb2d..5bb795169 100644
--- a/data/maps/PewterCity/scripts.inc
+++ b/data/maps/PewterCity/scripts.inc
@@ -724,7 +724,7 @@ PewterCity_EventScript_AideGiveRunningShoes:: @ 81662DE
waitmessage
waitfanfare
msgbox PewterCity_Text_SwitchedShoesWithRunningShoes
- special sub_80699BC
+ special DisableMsgBoxWalkaway
signmsg
msgbox PewterCity_Text_ExplainRunningShoes
normalmsg
diff --git a/data/maps/PokemonTower_6F/scripts.inc b/data/maps/PokemonTower_6F/scripts.inc
index d5236139c..bb20b6ac3 100644
--- a/data/maps/PokemonTower_6F/scripts.inc
+++ b/data/maps/PokemonTower_6F/scripts.inc
@@ -9,7 +9,7 @@ PokemonTower_6F_EventScript_MarowakGhost:: @ 81634B8
setwildbattle SPECIES_MAROWAK, 30, ITEM_NONE
special StartMarowakBattle
waitstate
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
compare VAR_RESULT, FALSE @ Set by CB2_EndMarowakBattle
goto_if_eq PokemonTower_6F_EventScript_DefeatedMarowakGhost
applymovement OBJ_EVENT_ID_PLAYER, PokemonTower_6F_Movement_ForcePlayerUp
diff --git a/data/maps/PowerPlant/scripts.inc b/data/maps/PowerPlant/scripts.inc
index 3877d5f57..59ba7c6cc 100644
--- a/data/maps/PowerPlant/scripts.inc
+++ b/data/maps/PowerPlant/scripts.inc
@@ -35,7 +35,7 @@ PowerPlant_EventScript_ShowElectrode2:: @ 81637B4
PowerPlant_EventScript_Zapdos:: @ 81637B8
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
setwildbattle SPECIES_ZAPDOS, 50, ITEM_NONE
@@ -84,7 +84,7 @@ PowerPlant_EventScript_Electrode1:: @ 816382F
setflag FLAG_SYS_SPECIAL_WILD_BATTLE
dowildbattle
clearflag FLAG_SYS_SPECIAL_WILD_BATTLE
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_WON
goto_if_eq PowerPlant_EventScript_FoughtElectrode1
@@ -113,7 +113,7 @@ PowerPlant_EventScript_Electrode2:: @ 816388D
setflag FLAG_SYS_SPECIAL_WILD_BATTLE
dowildbattle
clearflag FLAG_SYS_SPECIAL_WILD_BATTLE
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_WON
goto_if_eq PowerPlant_EventScript_FoughtElectrode2
diff --git a/data/maps/Route12/scripts.inc b/data/maps/Route12/scripts.inc
index 9ace7b7b0..af0ab05a4 100644
--- a/data/maps/Route12/scripts.inc
+++ b/data/maps/Route12/scripts.inc
@@ -15,7 +15,7 @@ Route12_EventScript_Snorlax:: @ 8168014
faceplayer
goto_if_unset FLAG_GOT_POKE_FLUTE, Route12_EventScript_SnorlaxNoPokeFlute
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
msgbox Text_WantToUsePokeFlute, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq Route12_EventScript_DontUsePokeFlute
diff --git a/data/maps/Route12_FishingHouse/scripts.inc b/data/maps/Route12_FishingHouse/scripts.inc
index 70c8bf48f..646987ddb 100644
--- a/data/maps/Route12_FishingHouse/scripts.inc
+++ b/data/maps/Route12_FishingHouse/scripts.inc
@@ -31,7 +31,7 @@ Route12_FishingHouse_EventScript_NoRoomForSuperRod:: @ 816FF75
Route12_FishingHouse_EventScript_CheckMagikarpRecord:: @ 816FF7F
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
setvar VAR_0x8004, SPECIES_MAGIKARP
specialvar VAR_RESULT, DoesPlayerPartyContainSpecies
compare VAR_RESULT, FALSE
diff --git a/data/maps/Route16/scripts.inc b/data/maps/Route16/scripts.inc
index 62d47983f..2096b6a2a 100644
--- a/data/maps/Route16/scripts.inc
+++ b/data/maps/Route16/scripts.inc
@@ -34,7 +34,7 @@ Route16_EventScript_Snorlax:: @ 8168121
faceplayer
goto_if_unset FLAG_GOT_POKE_FLUTE, Route16_EventScript_SnorlaxNoPokeFlute
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
msgbox Text_WantToUsePokeFlute, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq Route16_EventScript_DontUsePokeFlute
diff --git a/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc b/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc
index a8e74c94b..3659a1cc6 100644
--- a/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc
+++ b/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc
@@ -19,7 +19,7 @@ SaffronCity_CopycatsHouse_2F_EventScript_Doll:: @ 816EB70
SaffronCity_CopycatsHouse_2F_EventScript_Copycat:: @ 816EB7B
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
checkitem ITEM_POKE_DOLL, 1
diff --git a/data/maps/SeafoamIslands_B4F/scripts.inc b/data/maps/SeafoamIslands_B4F/scripts.inc
index 3e63ff0ed..47accfa73 100644
--- a/data/maps/SeafoamIslands_B4F/scripts.inc
+++ b/data/maps/SeafoamIslands_B4F/scripts.inc
@@ -100,7 +100,7 @@ SeafoamIslands_B4F_EventScript_EnterByFalling:: @ 8163121
call_if_lt SeafoamIslands_B4F_EventScript_RideCurrentFar
compare VAR_0x8008, 9
call_if_ge SeafoamIslands_B4F_EventScript_RideCurrentClose
- special sub_805D1A8
+ special SeafoamIslandsB4F_CurrentDumpsPlayerOnLand
setvar VAR_TEMP_1, 0
releaseall
end
@@ -159,7 +159,7 @@ SeafoamIslands_B4F_Movement_WalkUp:: @ 81631AA
SeafoamIslands_B4F_EventScript_Articuno:: @ 81631AC
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
setwildbattle SPECIES_ARTICUNO, 50, ITEM_NONE
diff --git a/data/maps/SixIsland_WaterPath_House1/scripts.inc b/data/maps/SixIsland_WaterPath_House1/scripts.inc
index 9f9b33c7f..ce1520ce0 100644
--- a/data/maps/SixIsland_WaterPath_House1/scripts.inc
+++ b/data/maps/SixIsland_WaterPath_House1/scripts.inc
@@ -5,7 +5,7 @@ SixIsland_WaterPath_House1_EventScript_Beauty:: @ 817206D
lock
faceplayer
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
setvar VAR_0x8004, SPECIES_HERACROSS
specialvar VAR_RESULT, DoesPlayerPartyContainSpecies
compare VAR_RESULT, FALSE
diff --git a/data/maps/ThreeIsland_BerryForest/scripts.inc b/data/maps/ThreeIsland_BerryForest/scripts.inc
index dab6cb795..faa340706 100644
--- a/data/maps/ThreeIsland_BerryForest/scripts.inc
+++ b/data/maps/ThreeIsland_BerryForest/scripts.inc
@@ -23,7 +23,7 @@ ThreeIsland_BerryForest_EventScript_Lostelle:: @ 8163C83
waitmoncry
setwildbattle SPECIES_HYPNO, 30, ITEM_NONE
dowildbattle
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
applymovement 1, Movement_FacePlayer
waitmovement 0
msgbox ThreeIsland_BerryForest_Text_ThankYouHaveThis
diff --git a/data/maps/TwoIsland_House/scripts.inc b/data/maps/TwoIsland_House/scripts.inc
index 20b0a2710..297a82295 100644
--- a/data/maps/TwoIsland_House/scripts.inc
+++ b/data/maps/TwoIsland_House/scripts.inc
@@ -8,7 +8,7 @@ TwoIsland_House_MapScripts:: @ 8171618
TwoIsland_House_EventScript_MoveManiac:: @ 8171619
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
clearflag HAS_BIG_MUSHROOM
diff --git a/data/maps/VermilionCity/scripts.inc b/data/maps/VermilionCity/scripts.inc
index 0485cd89e..07abeefd0 100644
--- a/data/maps/VermilionCity/scripts.inc
+++ b/data/maps/VermilionCity/scripts.inc
@@ -86,7 +86,7 @@ VermilionCity_EventScript_CheckSeagallopPresent:: @ 8166996
VermilionCity_EventScript_ChooseSeagallopDestRainbowPass:: @ 81669BB
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
call VermilionCity_EventScript_CheckHasMysticTicket
compare VAR_RESULT, TRUE
goto_if_eq VermilionCity_EventScript_HasMysticTicket
diff --git a/data/maps/VermilionCity_Gym/scripts.inc b/data/maps/VermilionCity_Gym/scripts.inc
index 232453543..b7e07a106 100644
--- a/data/maps/VermilionCity_Gym/scripts.inc
+++ b/data/maps/VermilionCity_Gym/scripts.inc
@@ -142,7 +142,7 @@ VermilionCity_Gym_EventScript_TrashCan15:: @ 816B837
VermilionCity_Gym_EventScript_TrashCan:: @ 816B843
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
copyvar SWITCH1_ID, VAR_TEMP_0
copyvar SWITCH2_ID, VAR_TEMP_1
goto_if_set FLAG_FOUND_BOTH_VERMILION_GYM_SWITCHES, VermilionCity_Gym_EventScript_LocksAlreadyOpen
diff --git a/data/maps/ViridianCity/scripts.inc b/data/maps/ViridianCity/scripts.inc
index 5309c0493..5eef02b91 100644
--- a/data/maps/ViridianCity/scripts.inc
+++ b/data/maps/ViridianCity/scripts.inc
@@ -146,7 +146,7 @@ ViridianCity_EventScript_WatchToLearnBasics:: @ 8165A5B
ViridianCity_EventScript_TutorialUnused:: @ 8165A65
msgbox ViridianCity_Text_ThatWasEducationalTakeThis
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
special StartOldManTutorialBattle
waitstate
release
@@ -239,7 +239,7 @@ ViridianCity_EventScript_DoTutorialBattle:: @ 8165B4C
msgbox ViridianCity_Text_ShowYouHowToCatchMons
closemessage
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
special StartOldManTutorialBattle
waitstate
lock
diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc
index 1053c1028..8bb85bc9f 100644
--- a/data/scripts/cable_club.inc
+++ b/data/scripts/cable_club.inc
@@ -15,7 +15,7 @@ EventScript_HideMysteryGiftMan:: @ 81BB1CE
CableClub_EventScript_MysteryGiftMan:: @ 81BB1D2
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
execram
@ Unused
@@ -111,7 +111,7 @@ CableClub_EventScript_ExitMinigameRoom:: @ 81BB2FD
CableClub_EventScript_CloseLinkAndExitLinkRoom:: @ 81BB315
special CloseLink
special HelpSystem_Enable
- special sub_811390C
+ special QuestLog_StartRecordingInputsAfterDeferredEvent
setvar VAR_CABLE_CLUB_STATE, 0
textcolor 1
compare VAR_0x8007, 0
@@ -137,7 +137,7 @@ CableClub_EventScript_ExitTradeCenter:: @ 81BB34F
CableClub_EventScript_PlayerExitTradeCenter:: @ 81BB367
special CloseLink
special HelpSystem_Enable
- special sub_811390C
+ special QuestLog_StartRecordingInputsAfterDeferredEvent
setvar VAR_CABLE_CLUB_STATE, 0
textcolor 1
compare VAR_0x8007, 0
@@ -161,7 +161,7 @@ CableClub_EventScript_ExitUnionRoom:: @ 81BB39C
CableClub_EventScript_PlayerExitUnionRoom:: @ 81BB3B4
special HelpSystem_Enable
- special sub_811390C
+ special QuestLog_StartRecordingInputsAfterDeferredEvent
setvar VAR_CABLE_CLUB_STATE, 0
textcolor 1
compare VAR_0x8007, 0
@@ -775,7 +775,7 @@ CableClub_EventScript_DoLinkRoomExit:: @ 81BB9FC
CableClub_EventScript_UnionRoomAttendant:: @ 81BBA04
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements
@@ -885,7 +885,7 @@ CableClub_EventScript_DontAskAboutLinking:: @ 81BBB92
CableClub_EventScript_DirectCornerAttendant:: @ 81BBB9C
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements
@@ -1195,7 +1195,7 @@ CableClub_OnResume:: @ 81BC05C
JoyfulGameCorner_EventScript_InfoMan2:: @ 81BC060
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
message Text_DescribeWhichGame
@@ -1225,7 +1225,7 @@ CableClub_EventScript_MinigameInfoExit:: @ 81BC0C4
JoyfulGameCorner_EventScript_MinigameAttendant:: @ 81BC0CE
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
message Text_WelcomeCanYouWait
diff --git a/data/scripts/move_tutors.inc b/data/scripts/move_tutors.inc
index 46d4a7c52..ceea4f7bb 100644
--- a/data/scripts/move_tutors.inc
+++ b/data/scripts/move_tutors.inc
@@ -448,7 +448,7 @@ EventScript_BodySlamTaught:: @ 81C4DE2
TwoIsland_CapeBrink_House_EventScript_StarterTutor:: @ 81C4DEC
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
lock
faceplayer
goto_if_set FLAG_LEARNED_ALL_MOVES_AT_CAPE_BRINK, CapeBrinkTutor_EventScript_TaughtAllMoves
@@ -556,7 +556,7 @@ EventScript_ChooseMoveTutorMon:: @ 81C4F30
EventScript_CanOnlyBeLearnedOnce:: @ 81C4F37
textcolor 3
- special sub_80699BC
+ special DisableMsgBoxWalkaway
signmsg
msgbox Text_MoveCanOnlyBeLearnedOnce, MSGBOX_YESNO
normalmsg
diff --git a/data/scripts/pokedex_rating.inc b/data/scripts/pokedex_rating.inc
index 79f4ad84c..5cea3a753 100644
--- a/data/scripts/pokedex_rating.inc
+++ b/data/scripts/pokedex_rating.inc
@@ -1,6 +1,6 @@
PokedexRating_EventScript_RateInPerson:: @ 81A737B
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
call_if_set FLAG_OAK_SAW_DEX_COMPLETION, PokedexRating_EventScript_DexCompleteIntro
call_if_unset FLAG_OAK_SAW_DEX_COMPLETION, PokedexRating_EventScript_NormalIntro
call PokedexRating_EventScript_Rate
diff --git a/data/scripts/questionnaire.inc b/data/scripts/questionnaire.inc
index c7636ce22..75508be5c 100644
--- a/data/scripts/questionnaire.inc
+++ b/data/scripts/questionnaire.inc
@@ -29,7 +29,7 @@ EventScript_EnableMysteryGift:: @ 81A774D
msgbox Text_YouKnowThoseWords
setflag FLAG_SYS_MYSTERY_GIFT_ENABLED
textcolor 3
- special sub_80699BC
+ special DisableMsgBoxWalkaway
signmsg
msgbox Text_YouCanAccessMysteryGift
normalmsg
diff --git a/data/scripts/seagallop.inc b/data/scripts/seagallop.inc
index 51fd0c675..ca3b2bc6b 100644
--- a/data/scripts/seagallop.inc
+++ b/data/scripts/seagallop.inc
@@ -111,7 +111,7 @@ EventScript_SetSail:: @ 81A90DA
closemessage
delay 20
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
fadescreen FADE_TO_BLACK
special DoSeagallopFerryScene
waitstate
diff --git a/data/scripts/trainer_card.inc b/data/scripts/trainer_card.inc
index 993db55bc..0f2171d7c 100644
--- a/data/scripts/trainer_card.inc
+++ b/data/scripts/trainer_card.inc
@@ -92,7 +92,7 @@ FourIsland_House2_EventScript_StickerManAskForBrag:: @ 81B2994
applymovement 1, Movement_FacePlayer
waitmovement 0
goto_if_questlog EventScript_ReleaseEnd
- special sub_8112364
+ special QuestLog_OnInteractionWithSpecialNpc
compare VAR_0x8008, 0
goto_if_eq FourIsland_House2_EventScript_NothingToBragAbout
message FourIsland_House2_Text_BragAboutWhatToday
diff --git a/data/specials.inc b/data/specials.inc
index ab7309c32..c06019606 100644
--- a/data/specials.inc
+++ b/data/specials.inc
@@ -100,7 +100,7 @@ gSpecials:: @ 815FD60
def_special NullFieldSpecial
def_special NullFieldSpecial
def_special NullFieldSpecial
- def_special sub_8081128
+ def_special TryContestLinkup
def_special Field_AskSaveTheGame
def_special DoWateringBerryTreeAnim
def_special ShowEasyChatScreen
@@ -349,14 +349,14 @@ gSpecials:: @ 815FD60
def_special Dummy_TryEnableBravoTrainerBattleTower
def_special DoesPartyHaveEnigmaBerry
def_special NullFieldSpecial
- def_special sub_810B82C
+ def_special SetPostgameFlags
def_special StartMarowakBattle
def_special ForcePlayerOntoBike
def_special ListMenu
def_special ReturnToListMenu
def_special DoPicboxCancel
def_special SetVermilionTrashCans
- def_special sub_805D1A8
+ def_special SeafoamIslandsB4F_CurrentDumpsPlayerOnLand
def_special SampleResortGorgeousMonAndReward
def_special CheckAddCoins
def_special GetDaycarePokemonCount
@@ -364,7 +364,7 @@ gSpecials:: @ 815FD60
def_special ForcePlayerToStartSurfing
def_special GetStarterSpecies
def_special SetSeenMon
- def_special sub_810C444
+ def_special VsSeekerResetObjectMovementAfterChargeComplete
def_special ShouldShowBoxWasFullMessage
def_special ChangeBoxPokemonNickname
def_special UpdateTrainerCardPhotoIcons
@@ -377,8 +377,8 @@ gSpecials:: @ 815FD60
def_special ShowWirelessCommunicationScreen
def_special EnableNationalPokedex
def_special SetWalkingIntoSignVars
- def_special sub_80699BC
- def_special sub_810C3A4
+ def_special DisableMsgBoxWalkaway
+ def_special VsSeekerFreezeObjectsAfterChargeComplete
def_special SetFlavorTextFlagFromSpecialVars
def_special UpdatePickStateFromSpecialVar8005
def_special OverworldWhiteOutGetMoneyLoss
@@ -393,14 +393,14 @@ gSpecials:: @ 815FD60
def_special BackupHelpContext
def_special RestoreHelpContext
def_special ValidateReceivedWonderCard
- def_special sub_810B810
+ def_special SetUnlockedPokedexFlags
def_special InitUnionRoom
def_special BufferUnionRoomPlayerName
- def_special sub_811390C
+ def_special QuestLog_StartRecordingInputsAfterDeferredEvent
def_special GetMartClerkObjectId
def_special BattleCardAction
def_special GetQuestLogState
- def_special sub_8112364
+ def_special QuestLog_OnInteractionWithSpecialNpc
def_special GetMENewsJisanItemAndState
def_special GetPCBoxToSendMon
def_special OpenMuseumFossilPic
@@ -418,7 +418,7 @@ gSpecials:: @ 815FD60
def_special DaisyMassageServices
def_special HelpSystem_Disable
def_special HelpSystem_Enable
- def_special sub_810B82C
+ def_special SetPostgameFlags
def_special CheckHasAtLeastOneBerry
def_special DisplayBerryPowderVendorMenu
def_special RemoveBerryPowderVendorMenu
diff --git a/include/event_scripts.h b/include/event_scripts.h
index a1bb5e35d..0f076ed28 100644
--- a/include/event_scripts.h
+++ b/include/event_scripts.h
@@ -1254,7 +1254,7 @@ extern const u8 EventScript_CurrentTooFast[];
extern const u8 EventScript_UseSurf[];
extern const u8 EventScript_Waterfall[];
extern const u8 EventScript_CantUseWaterfall[];
-extern const u8 gUnknown_81A8CED[];
+extern const u8 EventScript_VsSeekerChargingDone[];
extern const u8 EventScript_FieldPoison[];
extern const u8 EventScript_EggHatch[];
extern const u8 EventScript_1C1361[];
diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h
index 79e6c2aef..df9084eab 100644
--- a/include/field_player_avatar.h
+++ b/include/field_player_avatar.h
@@ -15,7 +15,7 @@ void MovePlayerNotOnBike(u8 direction, u16 heldKeys);
void MovementType_Player(struct Sprite * sprite);
void sub_805C270(void);
-void sub_805C780(void);
+void StopPlayerAvatar(void);
void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr);
u8 GetPlayerAvatarGraphicsIdByStateId(u8);
void SetPlayerAvatarStateMask(u8 mask);
diff --git a/include/link.h b/include/link.h
index d6f35f66d..899f0cb03 100644
--- a/include/link.h
+++ b/include/link.h
@@ -79,8 +79,8 @@
#define LINKTYPE_BATTLE_TOWER 0x2288
#define LINKTYPE_0x3311 0x3311
#define LINKTYPE_0x3322 0x3322
-#define LINKTYPE_0x4411 0x4411
-#define LINKTYPE_0x6601 0x6601
+#define LINKTYPE_BERRY_BLENDER_SETUP 0x4411
+#define LINKTYPE_CONTEST_GMODE 0x6601
#define MASTER_HANDSHAKE 0x8FFF
#define SLAVE_HANDSHAKE 0xB9A0
diff --git a/include/quest_log.h b/include/quest_log.h
index 56542fa2a..4aca7f569 100644
--- a/include/quest_log.h
+++ b/include/quest_log.h
@@ -28,7 +28,7 @@ void ResetQuestLog(void);
void ResetTrainerFanClub(void);
void TrySetUpQuestLogScenes_ElseContinueFromSave(u8 taskId);
void sub_8112450(void);
-void sub_8112364(void);
+void QuestLog_OnInteractionWithSpecialNpc(void);
u8 sub_8112CAC(void);
void sub_81138F8(void);
void sub_811231C(void);
diff --git a/include/save_location.h b/include/save_location.h
index c8e362231..2d2cb1974 100644
--- a/include/save_location.h
+++ b/include/save_location.h
@@ -10,7 +10,7 @@
void TrySetMapSaveWarpStatus(void);
bool32 IsCurMapPokeCenter(void);
-void sub_810B810(void);
-void sub_810B82C(void);
+void SetUnlockedPokedexFlags(void);
+void SetPostgameFlags(void);
#endif // GUARD_SAVE_LOCATION_H
diff --git a/include/script.h b/include/script.h
index a37909137..ba1de4f1c 100644
--- a/include/script.h
+++ b/include/script.h
@@ -78,7 +78,7 @@ u8 GetRegisteredQuestLogInput(void);
void ResetFacingNpcOrSignPostVars(void);
bool8 CanWalkAwayToCancelMsgBox(void);
void SetWalkingIntoSignVars(void);
-bool8 sub_80699D4(void);
+bool8 IsMsgBoxWalkawayDisabled(void);
extern const u8 *gRAMScriptPtr;
extern u8 gWalkAwayFromSignInhibitTimer;
diff --git a/include/vs_seeker.h b/include/vs_seeker.h
index 8c3b86194..6668cc6b4 100644
--- a/include/vs_seeker.h
+++ b/include/vs_seeker.h
@@ -3,18 +3,14 @@
#include "global.h"
-void sub_810C604(void);
-void sub_810C640(void);
-
void Task_VsSeeker_0(u8 taskId);
void sub_810CB90(void);
void sub_810CDE8(void);
int GetRematchTrainerId(u16 a0);
bool8 sub_810CF04(u8 a0);
-u8 sub_810CF54();
void sub_810D0D0(void);
void sub_810CB90(void);
-bool8 sub_810C4EC(void);
+bool8 UpdateVsSeekerStepCounter(void);
void TryUpdateRandomTrainerRematches(u16 mapGroup, u16 mapNum);
#endif //GUARD_VS_SEEKER_H
diff --git a/src/battle_setup.c b/src/battle_setup.c
index df8a3ac45..ee923d6c7 100644
--- a/src/battle_setup.c
+++ b/src/battle_setup.c
@@ -235,7 +235,7 @@ static void DoStandardWildBattle(void)
{
ScriptContext2_Enable();
FreezeObjectEvents();
- sub_805C780();
+ StopPlayerAvatar();
gMain.savedCallback = CB2_EndWildBattle;
gBattleTypeFlags = 0;
CreateBattleStartTask(GetWildBattleTransition(), 0);
@@ -247,7 +247,7 @@ void StartRoamerBattle(void)
{
ScriptContext2_Enable();
FreezeObjectEvents();
- sub_805C780();
+ StopPlayerAvatar();
gMain.savedCallback = CB2_EndWildBattle;
gBattleTypeFlags = BATTLE_TYPE_ROAMER;
CreateBattleStartTask(GetWildBattleTransition(), MUS_VS_DEN);
@@ -259,7 +259,7 @@ static void DoSafariBattle(void)
{
ScriptContext2_Enable();
FreezeObjectEvents();
- sub_805C780();
+ StopPlayerAvatar();
gMain.savedCallback = CB2_EndSafariBattle;
gBattleTypeFlags = BATTLE_TYPE_SAFARI;
CreateBattleStartTask(GetWildBattleTransition(), 0);
@@ -269,7 +269,7 @@ static void DoGhostBattle(void)
{
ScriptContext2_Enable();
FreezeObjectEvents();
- sub_805C780();
+ StopPlayerAvatar();
gMain.savedCallback = CB2_EndWildBattle;
gBattleTypeFlags = BATTLE_TYPE_GHOST;
CreateBattleStartTask(GetWildBattleTransition(), 0);
@@ -399,7 +399,7 @@ static void sub_807FB08(void)
{
ScriptContext2_Enable();
FreezeObjectEvents();
- sub_805C780();
+ StopPlayerAvatar();
gMain.savedCallback = sub_807FAF8;
SavePlayerParty();
InitPokedudePartyAndOpponent();
diff --git a/src/cable_club.c b/src/cable_club.c
index e75f1abf8..52856e3a3 100644
--- a/src/cable_club.c
+++ b/src/cable_club.c
@@ -402,7 +402,7 @@ static void Task_Linkup_6a(u8 taskId)
if (gSpecialVar_Result == 1)
{
// Dumb trick required to match
- if (gLinkType == LINKTYPE_0x4411)
+ if (gLinkType == LINKTYPE_BERRY_BLENDER_SETUP)
*UnusedVarNeededToMatch += 0;
DestroyLinkPlayerCountDisplayWindow(gTasks[taskId].data[5]);
EnableBothScriptContexts();
@@ -493,9 +493,9 @@ void TryRecordMixLinkup(void)
CreateLinkupTask(2, 4);
}
-void sub_8081128(void)
+void TryContestLinkup(void)
{
- gLinkType = LINKTYPE_0x6601;
+ gLinkType = LINKTYPE_CONTEST_GMODE;
gBattleTypeFlags = 0;
CreateLinkupTask(4, 4);
}
diff --git a/src/event_object_lock.c b/src/event_object_lock.c
index a72845ac7..aa9a99895 100644
--- a/src/event_object_lock.c
+++ b/src/event_object_lock.c
@@ -28,7 +28,7 @@ bool8 sub_8069590(void)
return FALSE;
else
{
- sub_805C780();
+ StopPlayerAvatar();
return TRUE;
}
}
@@ -65,7 +65,7 @@ bool8 sub_8069648(void)
return FALSE;
else
{
- sub_805C780();
+ StopPlayerAvatar();
return TRUE;
}
}
diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c
index ee413df2d..286f7519a 100644
--- a/src/field_control_avatar.c
+++ b/src/field_control_avatar.c
@@ -308,7 +308,7 @@ void FieldInput_HandleCancelSignpost(struct FieldInput * input)
{
if (input->dpadDirection != 0 && GetPlayerFacingDirection() != input->dpadDirection)
{
- if (sub_80699D4() == TRUE)
+ if (IsMsgBoxWalkawayDisabled() == TRUE)
return;
if (input->dpadDirection == DIR_NORTH)
RegisterQuestLogInput(QL_INPUT_UP);
@@ -657,9 +657,9 @@ static bool8 TryStartStepCountScript(u16 metatileBehavior)
if (!(gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_FISHING) && !MetatileBehavior_IsForcedMovementTile(metatileBehavior))
{
- if (sub_810C4EC() == TRUE)
+ if (UpdateVsSeekerStepCounter() == TRUE)
{
- ScriptContext1_SetupScript(gUnknown_81A8CED);
+ ScriptContext1_SetupScript(EventScript_VsSeekerChargingDone);
return TRUE;
}
else if (UpdatePoisonStepCounter() == TRUE)
@@ -1086,7 +1086,7 @@ void sub_806DE70(u16 x, u16 y)
{
if (events[i].x + 7 == x && events[i].y + 7 == y)
{
- sub_8112364();
+ QuestLog_OnInteractionWithSpecialNpc();
ScriptContext1_SetupScript(events[i].script);
ScriptContext2_Enable();
}
diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c
index 8e25633a9..7e3ba59fe 100644
--- a/src/field_player_avatar.c
+++ b/src/field_player_avatar.c
@@ -1114,7 +1114,7 @@ void sub_805C774(void)
ForcedMovement_None();
}
-void sub_805C780(void)
+void StopPlayerAvatar(void)
{
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
@@ -1596,7 +1596,7 @@ void CreateStopSurfingTask_NoMusicChange(u8 direction)
Task_StopSurfingInit(taskId);
}
-void sub_805D1A8(void)
+void SeafoamIslandsB4F_CurrentDumpsPlayerOnLand(void)
{
if (gUnknown_3005E88 != 1 && gUnknown_3005E88 != 3)
{
diff --git a/src/field_specials.c b/src/field_specials.c
index 657c80a40..4089f68e8 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -95,7 +95,7 @@ static u8 *const sStringVarPtrs[] = {
void ShowDiploma(void)
{
- sub_8112364();
+ QuestLog_OnInteractionWithSpecialNpc();
SetMainCallback2(CB2_ShowDiploma);
ScriptContext2_Enable();
}
@@ -187,7 +187,7 @@ u8 GetLeadMonFriendship(void)
void ShowTownMap(void)
{
- sub_8112364();
+ QuestLog_OnInteractionWithSpecialNpc();
sub_80BFF50(1, CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
diff --git a/src/item_menu.c b/src/item_menu.c
index d9af16a51..ebad0640d 100644
--- a/src/item_menu.c
+++ b/src/item_menu.c
@@ -2036,7 +2036,7 @@ bool8 UseRegisteredKeyItemOnField(void)
ScriptContext2_Enable();
FreezeObjectEvents();
sub_805C270();
- sub_805C780();
+ StopPlayerAvatar();
gSpecialVar_ItemId = gSaveBlock1Ptr->registeredItem;
taskId = CreateTask(ItemId_GetFieldFunc(gSaveBlock1Ptr->registeredItem), 8);
gTasks[taskId].data[3] = 1;
diff --git a/src/overworld.c b/src/overworld.c
index b77f4fc99..a4a6213e6 100644
--- a/src/overworld.c
+++ b/src/overworld.c
@@ -1555,7 +1555,7 @@ void CB2_WhiteOut(void)
gFieldCallback = FieldCB_RushInjuredPokemonToCenter;
val = 0;
do_load_map_stuff_loop(&val);
- sub_8112364();
+ QuestLog_OnInteractionWithSpecialNpc();
SetFieldVBlankCallback();
SetMainCallback1(CB1_Overworld);
SetMainCallback2(CB2_Overworld);
diff --git a/src/quest_log.c b/src/quest_log.c
index 7de7463a4..a41459dc9 100644
--- a/src/quest_log.c
+++ b/src/quest_log.c
@@ -106,7 +106,7 @@ EWRAM_DATA u8 gQuestLogState = 0;
static EWRAM_DATA u16 gUnknown_203ADFC = 0;
static EWRAM_DATA u8 sQuestLogHeaderWindowIds[3] = {0};
static EWRAM_DATA u16 *gUnknown_203AE04 = NULL;
-static EWRAM_DATA u16 *gUnknown_203AE08 = NULL;
+static EWRAM_DATA u16 *sEventRecordingPointer = NULL;
static EWRAM_DATA u16 *gUnknown_203AE0C[32] = {NULL};
static EWRAM_DATA void (* sQuestLogCB)(void) = NULL;
static EWRAM_DATA u16 *gUnknown_203AE90 = NULL;
@@ -129,7 +129,7 @@ static void sub_8110A00(void);
static void sub_8110A3C(void);
static void SetPlayerInitialCoordsAtScene(u8);
static void SetNPCInitialCoordsAtScene(u8);
-static void sub_8110E3C(void);
+static void TryRecordEvent39_GoToNextScene(void);
static void BackUpTrainerRematchesToVars(void);
static void BackUpMapLayoutToVar(void);
static void SetGameStateAtScene(u8);
@@ -182,7 +182,7 @@ static bool8 sub_81137E4(u16, const u16 *);
static u16 *sub_8113828(u16, const u16 *);
static bool8 TrySetLinkQuestLogEvent(u16, const u16 *);
static bool8 TrySetTrainerBattleQuestLogEvent(u16, const u16 *);
-static void sub_8113A1C(u16);
+static void TryRecordEvent41_IncCursor(u16);
static void sub_811381C(void);
static bool8 IsQuestLogEventWithSpecialEncounterSpecies(u16, const u16 *);
static u16 *QuestLog_SkipCommand(u16 *, u16 **);
@@ -192,9 +192,9 @@ static bool8 sub_8113B44(const u16 *);
static void sub_8113B88(void);
static void sub_8113B94(u16);
static void sub_8113BD8(void);
-static u16 *sub_8113BF4(u16 *);
+static u16 *TryRecordEvent39_NoParams(u16 *);
static u16 *sub_8113C20(u16 *, struct QuestLogEntry *);
-static u16 *sub_8113C5C(u16 *, u16);
+static u16 *TryRecordEvent41(u16 *, u16);
static u16 *sub_8113C8C(u16 *, struct QuestLogEntry *);
static u16 *sub_8113CC8(u16 *, struct QuestLogEntry *);
static u16 *sub_8113D08(u16 *, struct QuestLogEntry *);
@@ -300,8 +300,8 @@ void sub_8110840(void * oldPointer)
gUnknown_203AE04 = (void *)gUnknown_203AE04 + offset;
if (gQuestLogState != 0)
{
- if (gUnknown_203AE08)
- gUnknown_203AE08 = (void *)gUnknown_203AE08 + offset;
+ if (sEventRecordingPointer)
+ sEventRecordingPointer = (void *)sEventRecordingPointer + offset;
if (gQuestLogState == QL_STATE_2)
{
int r3;
@@ -318,7 +318,7 @@ void ResetQuestLog(void)
sCurrentSceneNum = 0;
gQuestLogState = 0;
sQuestLogCB = NULL;
- gUnknown_203AE08 = NULL;
+ sEventRecordingPointer = NULL;
gUnknown_203AE04 = NULL;
sub_8113BD8();
sub_81138F8();
@@ -351,12 +351,12 @@ bool8 sub_8110944(const void * a0, size_t cmdSize)
return TRUE;
}
-bool8 sub_8110988(u16 *a0, size_t a1)
+static bool8 WillCommandOfSizeFitInSav1Record(u16 *cursor, size_t size)
{
- void * r2 = gSaveBlock1Ptr->questLog[sCurrentSceneNum].unk_568;
- void * r0 = gSaveBlock1Ptr->questLog[sCurrentSceneNum].end;
- r0 -= a1;
- if ((void *)a0 < r2 || (void *)a0 > r0)
+ void * start = gSaveBlock1Ptr->questLog[sCurrentSceneNum].unk_568;
+ void * end = gSaveBlock1Ptr->questLog[sCurrentSceneNum].end;
+ end -= size;
+ if ((void *)cursor < start || (void *)cursor > end)
return FALSE;
return TRUE;
}
@@ -375,7 +375,7 @@ static void sub_8110A00(void)
if (TryRecordQuestLogEntrySequence(sQuestLogSceneRecordBuffer) != 1)
{
gUnknown_3005E88 = 0;
- sub_8110E3C();
+ TryRecordEvent39_GoToNextScene();
gQuestLogState = 0;
sQuestLogCB = NULL;
}
@@ -416,7 +416,7 @@ static void StartRecordingQuestLogEntry(u16 eventId)
DestroySav1QuestLogEntry(sCurrentSceneNum);
sub_8113B88();
- gUnknown_203AE08 = gSaveBlock1Ptr->questLog[sCurrentSceneNum].unk_568;
+ sEventRecordingPointer = gSaveBlock1Ptr->questLog[sCurrentSceneNum].unk_568;
if (IS_LINK_QL_EVENT(eventId) || eventId == QL_EVENT_DEPARTED)
gSaveBlock1Ptr->questLog[sCurrentSceneNum].unk_000 = 2;
else
@@ -509,9 +509,9 @@ static void BackUpMapLayoutToVar(void)
VarSet(VAR_QLBAK_MAP_LAYOUT, gSaveBlock1Ptr->mapLayoutId);
}
-static void sub_8110E3C(void)
+static void TryRecordEvent39_GoToNextScene(void)
{
- sub_8113BF4(gUnknown_203AE08);
+ TryRecordEvent39_NoParams(sEventRecordingPointer);
if (++sCurrentSceneNum >= QUEST_LOG_SCENE_COUNT)
sCurrentSceneNum = 0;
}
@@ -522,19 +522,19 @@ static bool8 TryRecordQuestLogEntrySequence(struct QuestLogEntry * entry)
for (i = gUnknown_203ADFC; i < sQuestLogCursor; i++)
{
- if (gUnknown_203AE08 == NULL)
+ if (sEventRecordingPointer == NULL)
return FALSE;
switch (entry[i].unk_6)
{
case 0:
case 1:
- gUnknown_203AE08 = sub_8113D48(gUnknown_203AE08, &entry[i]);
+ sEventRecordingPointer = sub_8113D48(sEventRecordingPointer, &entry[i]);
break;
default:
- gUnknown_203AE08 = sub_8113CC8(gUnknown_203AE08, &entry[i]);
+ sEventRecordingPointer = sub_8113CC8(sEventRecordingPointer, &entry[i]);
break;
}
- if (gUnknown_203AE08 == NULL)
+ if (sEventRecordingPointer == NULL)
{
gUnknown_3005E88 = 0;
return FALSE;
@@ -543,7 +543,7 @@ static bool8 TryRecordQuestLogEntrySequence(struct QuestLogEntry * entry)
if (gUnknown_3005E88 == 0)
{
- gUnknown_203AE08 = sub_8113BF4(gUnknown_203AE08);
+ sEventRecordingPointer = TryRecordEvent39_NoParams(sEventRecordingPointer);
return FALSE;
}
gUnknown_203ADFC = sQuestLogCursor;
@@ -966,7 +966,7 @@ bool8 QuestLog_SchedulePlaybackCB(void (*callback)(void))
switch (gQuestLogState)
{
case 1:
- sub_8112364();
+ QuestLog_OnInteractionWithSpecialNpc();
break;
case 2:
gUnknown_3005E88 = 3;
@@ -1228,7 +1228,7 @@ static void sub_8111F8C(u8 taskId)
{
FreezeObjectEvents();
sub_805C270();
- sub_805C780();
+ StopPlayerAvatar();
ScriptContext2_Enable();
task->func = Task_QuestLogScene_SavedGame;
}
@@ -1364,28 +1364,28 @@ void sub_811231C(void)
if (gQuestLogState == QL_STATE_1)
{
TryRecordQuestLogEntrySequence(sQuestLogSceneRecordBuffer);
- sub_8110E3C();
+ TryRecordEvent39_GoToNextScene();
gQuestLogState = 0;
sQuestLogCB = NULL;
gUnknown_203AE04 = NULL;
- gUnknown_203AE08 = NULL;
+ sEventRecordingPointer = NULL;
gUnknown_3005E88 = 0;
}
}
-void sub_8112364(void)
+void QuestLog_OnInteractionWithSpecialNpc(void)
{
if (gUnknown_3005E88 && gQuestLogState == QL_STATE_1)
{
TryRecordQuestLogEntrySequence(sQuestLogSceneRecordBuffer);
- sub_8113A1C(1);
- sub_8110E3C();
+ TryRecordEvent41_IncCursor(1);
+ TryRecordEvent39_GoToNextScene();
gUnknown_3005E88 = 0;
gQuestLogState = 0;
sQuestLogCB = NULL;
}
gUnknown_203AE04 = NULL;
- gUnknown_203AE08 = NULL;
+ sEventRecordingPointer = NULL;
}
void sub_81123BC(void)
@@ -1414,7 +1414,7 @@ void sub_8112450(void)
{
if (MenuHelpers_LinkSomething() != TRUE)
{
- sub_8112364();
+ QuestLog_OnInteractionWithSpecialNpc();
sub_81123BC();
}
}
@@ -2442,7 +2442,7 @@ void SetQuestLogEvent(u16 eventId, const u16 *eventData)
{
if (gUnknown_203AE04 == NULL)
{
- gUnknown_203AE04 = gUnknown_203AE08;
+ gUnknown_203AE04 = sEventRecordingPointer;
r1 = sQuestLogStorageCBs[eventId](gUnknown_203AE04, eventData);
}
else
@@ -2454,7 +2454,7 @@ void SetQuestLogEvent(u16 eventId, const u16 *eventData)
else
{
gUnknown_203AE04 = NULL;
- r1 = sQuestLogStorageCBs[eventId](gUnknown_203AE08, eventData);
+ r1 = sQuestLogStorageCBs[eventId](sEventRecordingPointer, eventData);
}
if (r1 == NULL)
@@ -2465,7 +2465,7 @@ void SetQuestLogEvent(u16 eventId, const u16 *eventData)
return;
}
- gUnknown_203AE08 = r1;
+ sEventRecordingPointer = r1;
if (gUnknown_203B048 == 0)
return;
sub_811231C();
@@ -2517,7 +2517,7 @@ bool8 sub_8113748(void)
return TRUE;
if (gQuestLogState == QL_STATE_1)
- sub_8112364();
+ QuestLog_OnInteractionWithSpecialNpc();
return FALSE;
}
@@ -2583,11 +2583,11 @@ static u16 *sub_8113828(u16 eventId, const u16 *eventData)
sub_8113B94(eventId);
if (eventId == QL_EVENT_DEFEATED_WILD_MON)
- gUnknown_203AE04 = gUnknown_203AE08;
+ gUnknown_203AE04 = sEventRecordingPointer;
else
gUnknown_203AE04 = NULL;
- return sQuestLogStorageCBs[eventId](gUnknown_203AE08, eventData);
+ return sQuestLogStorageCBs[eventId](sEventRecordingPointer, eventData);
}
static bool8 TrySetLinkQuestLogEvent(u16 eventId, const u16 *eventData)
@@ -2613,15 +2613,15 @@ void sub_81138F8(void)
gUnknown_203B024 = (struct UnkStruct_203B024){};
}
-void sub_811390C(void)
+void QuestLog_StartRecordingInputsAfterDeferredEvent(void)
{
if (gUnknown_203B024.unk_00 != QL_EVENT_0)
{
u16 *resp;
gUnknown_203B04A = 0;
StartRecordingQuestLogEntry(gUnknown_203B024.unk_00);
- resp = sQuestLogStorageCBs[gUnknown_203B024.unk_00](gUnknown_203AE08, gUnknown_203B024.unk_04);
- gUnknown_203AE08 = resp;
+ resp = sQuestLogStorageCBs[gUnknown_203B024.unk_00](sEventRecordingPointer, gUnknown_203B024.unk_04);
+ sEventRecordingPointer = resp;
sub_81138F8();
}
}
@@ -2654,17 +2654,17 @@ void sub_81139BC(void)
StartRecordingQuestLogEntry(gUnknown_203B024.unk_00);
}
sub_8113B94(gUnknown_203B024.unk_00);
- resp = sQuestLogStorageCBs[gUnknown_203B024.unk_00](gUnknown_203AE08, gUnknown_203B024.unk_04);
- gUnknown_203AE08 = resp;
- sub_8113A1C(1);
+ resp = sQuestLogStorageCBs[gUnknown_203B024.unk_00](sEventRecordingPointer, gUnknown_203B024.unk_04);
+ sEventRecordingPointer = resp;
+ TryRecordEvent41_IncCursor(1);
sub_81138F8();
sub_811231C();
}
}
-static void sub_8113A1C(u16 a0)
+static void TryRecordEvent41_IncCursor(u16 a0)
{
- gUnknown_203AE08 = sub_8113C5C(gUnknown_203AE08, a0);
+ sEventRecordingPointer = TryRecordEvent41(sEventRecordingPointer, a0);
sQuestLogCursor++;
}
@@ -2853,9 +2853,9 @@ static void sub_8113BD8(void)
gUnknown_203B04B = FALSE;
}
-static u16 *sub_8113BF4(u16 *a0)
+static u16 *TryRecordEvent39_NoParams(u16 *a0)
{
- if (!sub_8110988(a0, sQuestLogEventCmdSizes[QL_EVENT_39]))
+ if (!WillCommandOfSizeFitInSav1Record(a0, sQuestLogEventCmdSizes[QL_EVENT_39]))
return NULL;
a0[0] = QL_EVENT_39;
return a0 + 1;
@@ -2863,7 +2863,7 @@ static u16 *sub_8113BF4(u16 *a0)
static u16 *sub_8113C20(u16 *a0, struct QuestLogEntry * a1)
{
- if (!sub_8110988(a0, sQuestLogEventCmdSizes[QL_EVENT_39]))
+ if (!WillCommandOfSizeFitInSav1Record(a0, sQuestLogEventCmdSizes[QL_EVENT_39]))
return NULL;
a1->unk_6 = 0xFF;
a1->unk_4 = 0;
@@ -2874,9 +2874,9 @@ static u16 *sub_8113C20(u16 *a0, struct QuestLogEntry * a1)
return a0 + 1;
}
-static u16 *sub_8113C5C(u16 *a0, u16 a1)
+static u16 *TryRecordEvent41(u16 *a0, u16 a1)
{
- if (!sub_8110988(a0, sQuestLogEventCmdSizes[QL_EVENT_41]))
+ if (!WillCommandOfSizeFitInSav1Record(a0, sQuestLogEventCmdSizes[QL_EVENT_41]))
return NULL;
a0[0] = QL_EVENT_41;
a0[1] = a1;
@@ -2885,7 +2885,7 @@ static u16 *sub_8113C5C(u16 *a0, u16 a1)
static u16 *sub_8113C8C(u16 *a0, struct QuestLogEntry * a1)
{
- if (!sub_8110988(a0, sQuestLogEventCmdSizes[QL_EVENT_41]))
+ if (!WillCommandOfSizeFitInSav1Record(a0, sQuestLogEventCmdSizes[QL_EVENT_41]))
return NULL;
a1->unk_6 = 0xFE;
a1->unk_4 = a0[1];
@@ -2900,7 +2900,7 @@ static u16 *sub_8113CC8(u16 *a0, struct QuestLogEntry * a1)
{
u8 *r6 = (u8 *)a0 + 4;
- if (!sub_8110988(a0, sQuestLogEventCmdSizes[QL_EVENT_0]))
+ if (!WillCommandOfSizeFitInSav1Record(a0, sQuestLogEventCmdSizes[QL_EVENT_0]))
return NULL;
a0[0] = 0;
a0[1] = a1->unk_4;
@@ -2915,7 +2915,7 @@ static u16 *sub_8113D08(u16 *a0, struct QuestLogEntry * a1)
{
u8 *r6 = (u8 *)a0 + 4;
- if (!sub_8110988(a0, sQuestLogEventCmdSizes[QL_EVENT_0]))
+ if (!WillCommandOfSizeFitInSav1Record(a0, sQuestLogEventCmdSizes[QL_EVENT_0]))
return NULL;
a1->unk_6 = 2;
a1->unk_4 = a0[1];
@@ -2931,7 +2931,7 @@ static u16 *sub_8113D48(u16 *a0, struct QuestLogEntry * a1)
u16 *r4 = a0;
u8 *r6 = (u8 *)a0 + 4;
- if (!sub_8110988(r4, sQuestLogEventCmdSizes[QL_EVENT_2]))
+ if (!WillCommandOfSizeFitInSav1Record(r4, sQuestLogEventCmdSizes[QL_EVENT_2]))
return NULL;
if (a1->unk_6 == 0)
r4[0] = 2;
@@ -2950,7 +2950,7 @@ static u16 *sub_8113D94(u16 *a0, struct QuestLogEntry * a1)
u16 *r5 = a0;
u8 *r6 = (u8 *)a0 + 4;
- if (!sub_8110988(r5, sQuestLogEventCmdSizes[QL_EVENT_2]))
+ if (!WillCommandOfSizeFitInSav1Record(r5, sQuestLogEventCmdSizes[QL_EVENT_2]))
return NULL;
if (r5[0] == 2)
a1->unk_6 = 0;
diff --git a/src/save_location.c b/src/save_location.c
index 561fd2ff2..1fef9e8cf 100644
--- a/src/save_location.c
+++ b/src/save_location.c
@@ -93,16 +93,16 @@ void TrySetMapSaveWarpStatus(void)
sub_810B7CC();
}
-void sub_810B810(void)
+void SetUnlockedPokedexFlags(void)
{
gSaveBlock2Ptr->field_A8 |= 0x1;
gSaveBlock2Ptr->field_A8 |= 0x10;
gSaveBlock2Ptr->field_A8 |= 0x20;
}
-void sub_810B82C(void)
+void SetPostgameFlags(void)
{
- gSaveBlock2Ptr->specialSaveWarpFlags |= 0x80;
+ gSaveBlock2Ptr->specialSaveWarpFlags |= CHAMPION_SAVEWARP;
gSaveBlock2Ptr->field_A8 |= 0x2;
gSaveBlock2Ptr->field_A8 |= 0x4;
gSaveBlock2Ptr->field_A8 |= 0x8;
diff --git a/src/script.c b/src/script.c
index 13c571bac..097f6d3f3 100644
--- a/src/script.c
+++ b/src/script.c
@@ -28,7 +28,7 @@ static struct ScriptContext sScriptContext1;
static u32 sUnusedVariable2;
static struct ScriptContext sScriptContext2;
static bool8 sScriptContext2Enabled;
-static u8 gUnknown_3000F9D;
+static u8 sMsgBoxWalkawayDisabled;
static u8 sMsgBoxIsCancelable;
static u8 sQuestLogInput;
static u8 sQuestLogInputIsDpad;
@@ -235,19 +235,19 @@ u8 GetRegisteredQuestLogInput(void)
return sQuestLogInput;
}
-void sub_80699BC(void)
+void DisableMsgBoxWalkaway(void)
{
- gUnknown_3000F9D = TRUE;
+ sMsgBoxWalkawayDisabled = TRUE;
}
-void sub_80699C8(void)
+void EnableMsgBoxWalkaway(void)
{
- gUnknown_3000F9D = FALSE;
+ sMsgBoxWalkawayDisabled = FALSE;
}
-bool8 sub_80699D4(void)
+bool8 IsMsgBoxWalkawayDisabled(void)
{
- return gUnknown_3000F9D;
+ return sMsgBoxWalkawayDisabled;
}
void SetWalkingIntoSignVars(void)
@@ -330,7 +330,7 @@ bool8 ScriptContext2_RunScript(void)
void ScriptContext1_SetupScript(const u8 *ptr)
{
ClearMsgBoxCancelableState();
- sub_80699C8();
+ EnableMsgBoxWalkaway();
ClearQuestLogInputIsDpadFlag();
InitScriptContext(&sScriptContext1, gScriptCmdTable, gScriptCmdTableEnd);
SetupBytecodeScript(&sScriptContext1, ptr);
diff --git a/src/start_menu.c b/src/start_menu.c
index 867e469e0..90238123f 100644
--- a/src/start_menu.c
+++ b/src/start_menu.c
@@ -395,7 +395,7 @@ void ShowStartMenu(void)
{
FreezeObjectEvents();
sub_805C270();
- sub_805C780();
+ StopPlayerAvatar();
}
OpenStartMenuWithFollowupFunc(Task_StartMenuHandleInput);
ScriptContext2_Enable();
diff --git a/src/vs_seeker.c b/src/vs_seeker.c
index 7054a13ed..849c599e8 100644
--- a/src/vs_seeker.c
+++ b/src/vs_seeker.c
@@ -80,7 +80,9 @@ extern u8 gSelectedObjectEvent;
// static declarations
static EWRAM_DATA struct VsSeekerStruct *sVsSeeker = NULL;
-static void sub_810C3B8(u8 taskId);
+static void VsSeekerResetInBagStepCounter(void);
+static void VsSeekerResetChargingStepCounter(void);
+static void Task_ResetObjectsRematchWantedState(u8 taskId);
static void sub_810C594(void);
static void Task_VsSeeker_1(u8 taskId);
static void Task_VsSeeker_2(u8 taskId);
@@ -103,6 +105,7 @@ static u8 GetRematchableTrainerLocalId(void);
static void StartTrainerObjectMovementScript(struct VsSeekerTrainerInfo *, const u8 *);
static u8 GetCurVsSeekerResponse(s32, u16);
static void StartAllRespondantIdleMovements(void);
+static u8 GetRandomFaceDirectionMovementType();
// rodata
static const VsSeekerData sVsSeekerData[] = {
@@ -581,16 +584,14 @@ static const u8 gUnknown_8453F67[] = {
MOVEMENT_TYPE_FACE_RIGHT
};
-
// text
-
-void sub_810C3A4(void)
+void VsSeekerFreezeObjectsAfterChargeComplete(void)
{
- CreateTask(sub_810C3B8, 80);
+ CreateTask(Task_ResetObjectsRematchWantedState, 80);
}
-static void sub_810C3B8(u8 taskId)
+static void Task_ResetObjectsRematchWantedState(u8 taskId)
{
struct Task * task = &gTasks[taskId];
u8 i;
@@ -618,36 +619,36 @@ static void sub_810C3B8(u8 taskId)
if (task->data[0] != 0)
{
DestroyTask(taskId);
- sub_805C780();
+ StopPlayerAvatar();
EnableBothScriptContexts();
}
}
-void sub_810C444(void)
+void VsSeekerResetObjectMovementAfterChargeComplete(void)
{
struct ObjectEventTemplate * templates = gSaveBlock1Ptr->objectEventTemplates;
u8 i;
- u8 r6;
- u8 sp0;
+ u8 movementType;
+ u8 objEventId;
struct ObjectEvent * objectEvent;
for (i = 0; i < gMapHeader.events->objectEventCount; i++)
{
if ((templates[i].trainerType == 1 || templates[i].trainerType == 3) && (templates[i].movementType == MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_DOWN || templates[i].movementType == MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_UP || templates[i].movementType == MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_LEFT))
{
- r6 = sub_810CF54();
- TryGetObjectEventIdByLocalIdAndMap(templates[i].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &sp0);
- objectEvent = &gObjectEvents[sp0];
- if (sub_810CF04(sp0) == TRUE)
+ movementType = GetRandomFaceDirectionMovementType();
+ TryGetObjectEventIdByLocalIdAndMap(templates[i].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objEventId);
+ objectEvent = &gObjectEvents[objEventId];
+ if (sub_810CF04(objEventId) == TRUE)
{
- SetTrainerMovementType(objectEvent, r6);
+ SetTrainerMovementType(objectEvent, movementType);
}
- templates[i].movementType = r6;
+ templates[i].movementType = movementType;
}
}
}
-bool8 sub_810C4EC(void)
+bool8 UpdateVsSeekerStepCounter(void)
{
if (CheckBagHasItem(ITEM_VS_SEEKER, 1) == TRUE)
{
@@ -672,7 +673,7 @@ bool8 sub_810C4EC(void)
if (x == 100)
{
FlagClear(FLAG_SYS_VS_SEEKER_CHARGING);
- sub_810C640();
+ VsSeekerResetChargingStepCounter();
sub_810D0D0();
return TRUE;
}
@@ -684,7 +685,7 @@ bool8 sub_810C4EC(void)
void TryUpdateRandomTrainerRematches(u16 mapGroup, u16 mapNum)
{
FlagClear(FLAG_SYS_VS_SEEKER_CHARGING);
- sub_810C640();
+ VsSeekerResetChargingStepCounter();
sub_810D0D0();
sub_810C594();
}
@@ -698,34 +699,34 @@ static void sub_810C594(void)
struct ObjectEvent * objectEvent = &gObjectEvents[i];
if (objectEvent->movementType == MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_DOWN || objectEvent->movementType == MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_UP || objectEvent->movementType == MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_LEFT)
{
- u8 r3 = sub_810CF54();
+ u8 movementType = GetRandomFaceDirectionMovementType();
if (objectEvent->active && gSprites[objectEvent->spriteId].data[0] == i)
{
gSprites[objectEvent->spriteId].pos2.x = 0;
gSprites[objectEvent->spriteId].pos2.y = 0;
- SetTrainerMovementType(objectEvent, r3);
+ SetTrainerMovementType(objectEvent, movementType);
}
}
}
}
-void sub_810C604(void)
+static void VsSeekerResetInBagStepCounter(void)
{
gSaveBlock1Ptr->trainerRematchStepCounter &= 0xFF00;
}
-void sub_810C620(void)
+static void VsSeekerSetStepCounterInBagFull(void)
{
gSaveBlock1Ptr->trainerRematchStepCounter &= 0xFF00;
gSaveBlock1Ptr->trainerRematchStepCounter |= 100;
}
-void sub_810C640(void)
+static void VsSeekerResetChargingStepCounter(void)
{
gSaveBlock1Ptr->trainerRematchStepCounter &= 0x00FF;
}
-void sub_810C654(void)
+static void VsSeekerSetStepCounterFullyCharged(void)
{
gSaveBlock1Ptr->trainerRematchStepCounter &= 0x00FF;
gSaveBlock1Ptr->trainerRematchStepCounter |= (100 << 8);
@@ -785,7 +786,7 @@ static void Task_VsSeeker_2(u8 taskId)
{
data[1] = 0;
data[2] = 0;
- sub_810C604();
+ VsSeekerResetInBagStepCounter();
sVsSeeker->responseCode = GetVsSeekerResponseInArea(sVsSeekerData);
ScriptMovement_StartObjectMovementScript(0xFF, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gUnknown_8453F5C);
gTasks[taskId].func = Task_VsSeeker_3;
@@ -934,7 +935,7 @@ static u8 GetVsSeekerResponseInArea(const VsSeekerData * a0)
{
PlaySE(SE_PIN);
FlagSet(FLAG_SYS_VS_SEEKER_CHARGING);
- sub_810C640();
+ VsSeekerResetChargingStepCounter();
return VSSEEKER_RESPONSE_FOUND_REMATCHES;
}
if (sVsSeeker->trainerHasNotYetBeenFought)
@@ -944,7 +945,7 @@ static u8 GetVsSeekerResponseInArea(const VsSeekerData * a0)
void sub_810CB90(void)
{
- u8 sp0 = 0;
+ u8 objEventId = 0;
struct ObjectEventTemplate *r4 = gSaveBlock1Ptr->objectEventTemplates;
s32 r9 = sub_810CE10(sVsSeekerData, gTrainerBattleOpponent_A);
@@ -958,12 +959,12 @@ void sub_810CB90(void)
{
struct ObjectEvent *r4_2;
- TryGetObjectEventIdByLocalIdAndMap(r4[r8].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &sp0);
- r4_2 = &gObjectEvents[sp0];
- sub_810CF54(&r4[r8]); // You are using this function incorrectly. Please consult the manual.
+ TryGetObjectEventIdByLocalIdAndMap(r4[r8].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objEventId);
+ r4_2 = &gObjectEvents[objEventId];
+ GetRandomFaceDirectionMovementType(&r4[r8]); // You are using this function incorrectly. Please consult the manual.
OverrideMovementTypeForObjectEvent(r4_2, gUnknown_8453F67[r4_2->facingDirection]);
gSaveBlock1Ptr->trainerRematches[r4[r8].localId] = 0;
- if (gSelectedObjectEvent == sp0)
+ if (gSelectedObjectEvent == objEventId)
r4_2->movementType = gUnknown_8453F67[r4_2->facingDirection];
else
r4_2->movementType = MOVEMENT_TYPE_FACE_DOWN;
@@ -1113,22 +1114,22 @@ bool8 sub_810CF04(u8 a0)
return FALSE;
}
-u8 sub_810CF54()
+static u8 GetRandomFaceDirectionMovementType()
{
u16 r1 = Random() % 4;
switch (r1)
{
case 0:
- return 7;
+ return MOVEMENT_TYPE_FACE_UP;
case 1:
- return 8;
+ return MOVEMENT_TYPE_FACE_DOWN;
case 2:
- return 9;
+ return MOVEMENT_TYPE_FACE_LEFT;
case 3:
- return 10;
+ return MOVEMENT_TYPE_FACE_RIGHT;
default:
- return 8;
+ return MOVEMENT_TYPE_FACE_DOWN;
}
}