mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-19 20:18:34 +01:00
Document flash.inc
This commit is contained in:
parent
4fd848e689
commit
c0aaa01424
@ -1,4 +1,4 @@
|
|||||||
EventScript_2926F8:: @ 82926F8
|
EventScript_FldEffFlash:: @ 82926F8
|
||||||
animateflash 1
|
animateflash 1
|
||||||
setflashradius 1
|
setflashradius 1
|
||||||
end
|
end
|
||||||
|
@ -376,7 +376,7 @@ extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252C88[];
|
|||||||
//field effects
|
//field effects
|
||||||
extern const u8 EventScript_FldEffStrength[];
|
extern const u8 EventScript_FldEffStrength[];
|
||||||
extern const u8 EventScript_FailSweetScent[];
|
extern const u8 EventScript_FailSweetScent[];
|
||||||
extern const u8 EventScript_2926F8[];
|
extern const u8 EventScript_FldEffFlash[];
|
||||||
extern const u8 EventScript_FldEffRockSmash[];
|
extern const u8 EventScript_FldEffRockSmash[];
|
||||||
|
|
||||||
//player pc
|
//player pc
|
||||||
|
@ -26,8 +26,8 @@ struct FlashStruct
|
|||||||
};
|
};
|
||||||
|
|
||||||
// static functions
|
// static functions
|
||||||
static void hm2_flash(void);
|
static void FieldCallback_Flash(void);
|
||||||
static void sub_81371B4(void);
|
static void FldEff_UseFlash(void);
|
||||||
static bool8 sub_8137304(void);
|
static bool8 sub_8137304(void);
|
||||||
static void sub_81373F0(void);
|
static void sub_81373F0(void);
|
||||||
static void sub_8137404(u8 taskId);
|
static void sub_8137404(u8 taskId);
|
||||||
@ -86,26 +86,26 @@ bool8 SetUpFieldMove_Flash(void)
|
|||||||
else if (gMapHeader.cave == TRUE && !FlagGet(FLAG_SYS_USE_FLASH))
|
else if (gMapHeader.cave == TRUE && !FlagGet(FLAG_SYS_USE_FLASH))
|
||||||
{
|
{
|
||||||
gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu;
|
gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu;
|
||||||
gPostMenuFieldCallback = hm2_flash;
|
gPostMenuFieldCallback = FieldCallback_Flash;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hm2_flash(void)
|
static void FieldCallback_Flash(void)
|
||||||
{
|
{
|
||||||
u8 taskId = oei_task_add();
|
u8 taskId = oei_task_add();
|
||||||
gFieldEffectArguments[0] = GetCursorSelectionMonId();
|
gFieldEffectArguments[0] = GetCursorSelectionMonId();
|
||||||
gTasks[taskId].data[8] = (uintptr_t)sub_81371B4 >> 16;
|
gTasks[taskId].data[8] = (uintptr_t)FldEff_UseFlash >> 16;
|
||||||
gTasks[taskId].data[9] = (uintptr_t)sub_81371B4;
|
gTasks[taskId].data[9] = (uintptr_t)FldEff_UseFlash;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81371B4(void)
|
static void FldEff_UseFlash(void)
|
||||||
{
|
{
|
||||||
PlaySE(SE_W115);
|
PlaySE(SE_W115);
|
||||||
FlagSet(FLAG_SYS_USE_FLASH);
|
FlagSet(FLAG_SYS_USE_FLASH);
|
||||||
ScriptContext1_SetupScript(EventScript_2926F8);
|
ScriptContext1_SetupScript(EventScript_FldEffFlash);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81371D4(void)
|
static void sub_81371D4(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user