Label some ReturnToField funcs

This commit is contained in:
GriffinR 2021-01-01 17:02:03 -05:00
parent c711a2f73b
commit 88e951bfe3
5 changed files with 16 additions and 16 deletions

View file

@ -18,8 +18,8 @@ void FieldCB_WarpExitFadeFromBlack(void);
void FieldCB_WarpExitFadeFromWhite(void); void FieldCB_WarpExitFadeFromWhite(void);
bool8 FieldCB_ReturnToFieldOpenStartMenu(void); bool8 FieldCB_ReturnToFieldOpenStartMenu(void);
void ReturnToFieldOpenStartMenu(void); void ReturnToFieldOpenStartMenu(void);
void sub_80AF6D4(void); void FieldCB_ReturnToFieldNoScript(void);
void sub_80AF6F0(void); void FieldCB_ReturnToFieldNoScriptCheckMusic(void);
void DoWarp(void); void DoWarp(void);
void DoDiveWarp(void); void DoDiveWarp(void);
void DoSootopolisLegendWarp(void); void DoSootopolisLegendWarp(void);

View file

@ -607,7 +607,7 @@ static void CB2_EndWildBattle(void)
else else
{ {
SetMainCallback2(CB2_ReturnToField); SetMainCallback2(CB2_ReturnToField);
gFieldCallback = sub_80AF6F0; gFieldCallback = FieldCB_ReturnToFieldNoScriptCheckMusic;
} }
} }

View file

@ -446,7 +446,7 @@ bool8 FieldCB_ReturnToFieldOpenStartMenu(void)
return FALSE; return FALSE;
} }
static void task_mpl_807E3C8(u8 taskId) static void Task_ReturnToFieldNoScript(u8 taskId)
{ {
if (WaitForWeatherFadeIn() == 1) if (WaitForWeatherFadeIn() == 1)
{ {
@ -456,19 +456,19 @@ static void task_mpl_807E3C8(u8 taskId)
} }
} }
void sub_80AF6D4(void) void FieldCB_ReturnToFieldNoScript(void)
{ {
ScriptContext2_Enable(); ScriptContext2_Enable();
FadeInFromBlack(); FadeInFromBlack();
CreateTask(task_mpl_807E3C8, 10); CreateTask(Task_ReturnToFieldNoScript, 10);
} }
void sub_80AF6F0(void) void FieldCB_ReturnToFieldNoScriptCheckMusic(void)
{ {
ScriptContext2_Enable(); ScriptContext2_Enable();
Overworld_PlaySpecialMapMusic(); Overworld_PlaySpecialMapMusic();
FadeInFromBlack(); FadeInFromBlack();
CreateTask(task_mpl_807E3C8, 10); CreateTask(Task_ReturnToFieldNoScript, 10);
} }
static bool32 PaletteFadeActive(void) static bool32 PaletteFadeActive(void)

View file

@ -53,7 +53,7 @@ static bool8 ItemfinderCheckForHiddenItems(const struct MapEvents *, u8);
static u8 GetDirectionToHiddenItem(s16 distanceX, s16 distanceY); static u8 GetDirectionToHiddenItem(s16 distanceX, s16 distanceY);
static void PlayerFaceHiddenItem(u8 a); static void PlayerFaceHiddenItem(u8 a);
static void CheckForHiddenItemsInMapConnection(u8 taskId); 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_Bike(u8 taskId);
static void ItemUseOnFieldCB_Rod(u8); static void ItemUseOnFieldCB_Rod(u8);
static void ItemUseOnFieldCB_Itemfinder(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_UseRepel(u8 taskId);
static void Task_CloseCantUseKeyItemMessage(u8 taskId); static void Task_CloseCantUseKeyItemMessage(u8 taskId);
static void SetDistanceOfClosestHiddenItem(u8 taskId, s16 x, s16 y); static void SetDistanceOfClosestHiddenItem(u8 taskId, s16 x, s16 y);
static void CB2_OpenPokeblockCaseOnField(void); static void CB2_OpenPokeblockFromBag(void);
// EWRAM variables // EWRAM variables
EWRAM_DATA static void(*sItemUseOnFieldCB)(u8 taskId) = NULL; EWRAM_DATA static void(*sItemUseOnFieldCB)(u8 taskId) = NULL;
@ -615,23 +615,23 @@ void ItemUseOutOfBattle_PokeblockCase(u8 taskId)
} }
else if (gTasks[taskId].tUsingRegisteredKeyItem != TRUE) else if (gTasks[taskId].tUsingRegisteredKeyItem != TRUE)
{ {
gBagMenu->exitCallback = CB2_OpenPokeblockCaseOnField; gBagMenu->exitCallback = CB2_OpenPokeblockFromBag;
Task_FadeAndCloseBagMenu(taskId); Task_FadeAndCloseBagMenu(taskId);
} }
else else
{ {
gFieldCallback = sub_80AF6D4; gFieldCallback = FieldCB_ReturnToFieldNoScript;
FadeScreen(FADE_TO_BLACK, 0); 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); OpenPokeblockCase(PBLOCK_CASE_FIELD, CB2_ReturnToBagMenuPocket);
} }
static void sub_80FDC00(u8 taskId) static void Task_OpenRegisteredPokeblockCase(u8 taskId)
{ {
if (!gPaletteFade.active) if (!gPaletteFade.active)
{ {

View file

@ -107,7 +107,7 @@ void CB2_EndSafariBattle(void)
{ {
ScriptContext2_RunNewScript(SafariZone_EventScript_OutOfBallsMidBattle); ScriptContext2_RunNewScript(SafariZone_EventScript_OutOfBallsMidBattle);
WarpIntoMap(); WarpIntoMap();
gFieldCallback = sub_80AF6F0; gFieldCallback = FieldCB_ReturnToFieldNoScriptCheckMusic;
SetMainCallback2(CB2_LoadMap); SetMainCallback2(CB2_LoadMap);
} }
else if (gBattleOutcome == B_OUTCOME_CAUGHT) else if (gBattleOutcome == B_OUTCOME_CAUGHT)