From 88e951bfe39066d9109e714968410a5277c3cfac Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 1 Jan 2021 17:02:03 -0500 Subject: [PATCH] Label some ReturnToField funcs --- include/field_screen_effect.h | 4 ++-- src/battle_setup.c | 2 +- src/field_screen_effect.c | 10 +++++----- src/item_use.c | 14 +++++++------- src/safari_zone.c | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h index deb80f3dd9..4e4725041a 100644 --- a/include/field_screen_effect.h +++ b/include/field_screen_effect.h @@ -18,8 +18,8 @@ void FieldCB_WarpExitFadeFromBlack(void); void FieldCB_WarpExitFadeFromWhite(void); bool8 FieldCB_ReturnToFieldOpenStartMenu(void); void ReturnToFieldOpenStartMenu(void); -void sub_80AF6D4(void); -void sub_80AF6F0(void); +void FieldCB_ReturnToFieldNoScript(void); +void FieldCB_ReturnToFieldNoScriptCheckMusic(void); void DoWarp(void); void DoDiveWarp(void); void DoSootopolisLegendWarp(void); diff --git a/src/battle_setup.c b/src/battle_setup.c index 40b5993f06..0a5e7e8b44 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -607,7 +607,7 @@ static void CB2_EndWildBattle(void) else { SetMainCallback2(CB2_ReturnToField); - gFieldCallback = sub_80AF6F0; + gFieldCallback = FieldCB_ReturnToFieldNoScriptCheckMusic; } } diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index 4676776d1c..db82d667ce 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -446,7 +446,7 @@ bool8 FieldCB_ReturnToFieldOpenStartMenu(void) return FALSE; } -static void task_mpl_807E3C8(u8 taskId) +static void Task_ReturnToFieldNoScript(u8 taskId) { if (WaitForWeatherFadeIn() == 1) { @@ -456,19 +456,19 @@ static void task_mpl_807E3C8(u8 taskId) } } -void sub_80AF6D4(void) +void FieldCB_ReturnToFieldNoScript(void) { ScriptContext2_Enable(); FadeInFromBlack(); - CreateTask(task_mpl_807E3C8, 10); + CreateTask(Task_ReturnToFieldNoScript, 10); } -void sub_80AF6F0(void) +void FieldCB_ReturnToFieldNoScriptCheckMusic(void) { ScriptContext2_Enable(); Overworld_PlaySpecialMapMusic(); FadeInFromBlack(); - CreateTask(task_mpl_807E3C8, 10); + CreateTask(Task_ReturnToFieldNoScript, 10); } static bool32 PaletteFadeActive(void) diff --git a/src/item_use.c b/src/item_use.c index 9ab755a5e3..df6a35bc98 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -53,7 +53,7 @@ static bool8 ItemfinderCheckForHiddenItems(const struct MapEvents *, u8); static u8 GetDirectionToHiddenItem(s16 distanceX, s16 distanceY); static void PlayerFaceHiddenItem(u8 a); static void CheckForHiddenItemsInMapConnection(u8 taskId); -static void sub_80FDC00(u8 taskId); +static void Task_OpenRegisteredPokeblockCase(u8 taskId); static void ItemUseOnFieldCB_Bike(u8 taskId); static void ItemUseOnFieldCB_Rod(u8); static void ItemUseOnFieldCB_Itemfinder(u8); @@ -69,7 +69,7 @@ static void Task_StartUseRepel(u8 taskId); static void Task_UseRepel(u8 taskId); static void Task_CloseCantUseKeyItemMessage(u8 taskId); static void SetDistanceOfClosestHiddenItem(u8 taskId, s16 x, s16 y); -static void CB2_OpenPokeblockCaseOnField(void); +static void CB2_OpenPokeblockFromBag(void); // EWRAM variables EWRAM_DATA static void(*sItemUseOnFieldCB)(u8 taskId) = NULL; @@ -615,23 +615,23 @@ void ItemUseOutOfBattle_PokeblockCase(u8 taskId) } else if (gTasks[taskId].tUsingRegisteredKeyItem != TRUE) { - gBagMenu->exitCallback = CB2_OpenPokeblockCaseOnField; + gBagMenu->exitCallback = CB2_OpenPokeblockFromBag; Task_FadeAndCloseBagMenu(taskId); } else { - gFieldCallback = sub_80AF6D4; + gFieldCallback = FieldCB_ReturnToFieldNoScript; FadeScreen(FADE_TO_BLACK, 0); - gTasks[taskId].func = sub_80FDC00; + gTasks[taskId].func = Task_OpenRegisteredPokeblockCase; } } -static void CB2_OpenPokeblockCaseOnField(void) +static void CB2_OpenPokeblockFromBag(void) { OpenPokeblockCase(PBLOCK_CASE_FIELD, CB2_ReturnToBagMenuPocket); } -static void sub_80FDC00(u8 taskId) +static void Task_OpenRegisteredPokeblockCase(u8 taskId) { if (!gPaletteFade.active) { diff --git a/src/safari_zone.c b/src/safari_zone.c index e8827e1246..3b86bc4640 100644 --- a/src/safari_zone.c +++ b/src/safari_zone.c @@ -107,7 +107,7 @@ void CB2_EndSafariBattle(void) { ScriptContext2_RunNewScript(SafariZone_EventScript_OutOfBallsMidBattle); WarpIntoMap(); - gFieldCallback = sub_80AF6F0; + gFieldCallback = FieldCB_ReturnToFieldNoScriptCheckMusic; SetMainCallback2(CB2_LoadMap); } else if (gBattleOutcome == B_OUTCOME_CAUGHT)