add start menu funcs, credit deokishisu
This commit is contained in:
parent
dfce7f1548
commit
7bb8115099
4 changed files with 21 additions and 0 deletions
|
@ -691,6 +691,7 @@ EventScript_BackupMrBrineyLocation:: @ 8271E95
|
|||
.include "data/scripts/set_gym_trainers.inc"
|
||||
|
||||
EventScript_CancelMessageBox::
|
||||
special DoPicboxCancel
|
||||
release
|
||||
end
|
||||
|
||||
|
|
|
@ -535,3 +535,4 @@ gSpecials:: @ 81DBA64
|
|||
def_special RemoveRecordsWindow
|
||||
def_special CloseDeptStoreElevatorWindow
|
||||
def_special TrySetBattleTowerLinkType
|
||||
def_special DoPicboxCancel
|
||||
|
|
|
@ -1103,6 +1103,16 @@ static const u8 *GetSignpostScriptAtMapPosition(struct MapPosition *position)
|
|||
return EventScript_TestSignpostMsg;
|
||||
}
|
||||
|
||||
static void Task_OpenStartMenu(u8 taskId)
|
||||
{
|
||||
if (!ArePlayerFieldControlsLocked())
|
||||
{
|
||||
PlaySE(SE_WIN_OPEN);
|
||||
ShowStartMenu();
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
void FieldInput_HandleCancelSignpost(struct FieldInput *input)
|
||||
{
|
||||
if (ScriptContext1_IsScriptSetUp() == TRUE)
|
||||
|
@ -1123,6 +1133,8 @@ void FieldInput_HandleCancelSignpost(struct FieldInput *input)
|
|||
{
|
||||
ScriptContext1_SetupScript(EventScript_CancelMessageBox);
|
||||
ScriptContext2_Enable();
|
||||
if (!FuncIsActiveTask(Task_OpenStartMenu))
|
||||
CreateTask(Task_OpenStartMenu, 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4376,3 +4376,10 @@ u8 Script_TryGainNewFanFromCounter(void)
|
|||
{
|
||||
return TryGainNewFanFromCounter(gSpecialVar_0x8004);
|
||||
}
|
||||
|
||||
void DoPicboxCancel(void)
|
||||
{
|
||||
u8 t = EOS;
|
||||
AddTextPrinterParameterized(0, FONT_NORMAL, &t, 0, 1, 0, NULL);
|
||||
ScriptMenu_HidePokemonPic();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue