Label a few flash effect functions
This commit is contained in:
parent
d74f739e05
commit
8cad412ae2
1 changed files with 12 additions and 11 deletions
|
@ -914,7 +914,7 @@ static void UpdateOrbFlashEffect(u8 taskId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_80AFF90(u8 taskId)
|
static void Task_WaitForFlashUpdate(u8 taskId)
|
||||||
{
|
{
|
||||||
if (!FuncIsActiveTask(UpdateFlashLevelEffect))
|
if (!FuncIsActiveTask(UpdateFlashLevelEffect))
|
||||||
{
|
{
|
||||||
|
@ -923,13 +923,13 @@ static void sub_80AFF90(u8 taskId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_80AFFB8(void)
|
static void StartWaitForFlashUpdate(void)
|
||||||
{
|
{
|
||||||
if (!FuncIsActiveTask(sub_80AFF90))
|
if (!FuncIsActiveTask(Task_WaitForFlashUpdate))
|
||||||
CreateTask(sub_80AFF90, 80);
|
CreateTask(Task_WaitForFlashUpdate, 80);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 sub_80AFFDC(s32 centerX, s32 centerY, s32 initialFlashRadius, s32 destFlashRadius, s32 clearScanlineEffect, u8 delta)
|
static u8 StartUpdateFlashLevelEffect(s32 centerX, s32 centerY, s32 initialFlashRadius, s32 destFlashRadius, s32 clearScanlineEffect, u8 delta)
|
||||||
{
|
{
|
||||||
u8 taskId = CreateTask(UpdateFlashLevelEffect, 80);
|
u8 taskId = CreateTask(UpdateFlashLevelEffect, 80);
|
||||||
s16 *data = gTasks[taskId].data;
|
s16 *data = gTasks[taskId].data;
|
||||||
|
@ -948,7 +948,7 @@ static u8 sub_80AFFDC(s32 centerX, s32 centerY, s32 initialFlashRadius, s32 dest
|
||||||
return taskId;
|
return taskId;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 sub_80B003C(s32 centerX, s32 centerY, s32 initialFlashRadius, s32 destFlashRadius, s32 clearScanlineEffect, u8 delta)
|
static u8 StartUpdateOrbFlashEffect(s32 centerX, s32 centerY, s32 initialFlashRadius, s32 destFlashRadius, s32 clearScanlineEffect, u8 delta)
|
||||||
{
|
{
|
||||||
u8 taskId = CreateTask(UpdateOrbFlashEffect, 80);
|
u8 taskId = CreateTask(UpdateOrbFlashEffect, 80);
|
||||||
s16 *data = gTasks[taskId].data;
|
s16 *data = gTasks[taskId].data;
|
||||||
|
@ -972,14 +972,15 @@ static u8 sub_80B003C(s32 centerX, s32 centerY, s32 initialFlashRadius, s32 dest
|
||||||
#undef tFlashRadiusDelta
|
#undef tFlashRadiusDelta
|
||||||
#undef tClearScanlineEffect
|
#undef tClearScanlineEffect
|
||||||
|
|
||||||
|
// A higher flashLevel value is a smaller flash radius (more darkness). 0 is full brightness
|
||||||
void AnimateFlash(u8 flashLevel)
|
void AnimateFlash(u8 flashLevel)
|
||||||
{
|
{
|
||||||
u8 curFlashLevel = Overworld_GetFlashLevel();
|
u8 curFlashLevel = Overworld_GetFlashLevel();
|
||||||
u8 value = 0;
|
bool8 fullBrightness = FALSE;
|
||||||
if (!flashLevel)
|
if (!flashLevel)
|
||||||
value = 1;
|
fullBrightness = TRUE;
|
||||||
sub_80AFFDC(DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sFlashLevelPixelRadii[curFlashLevel], sFlashLevelPixelRadii[flashLevel], value, 1);
|
StartUpdateFlashLevelEffect(DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sFlashLevelPixelRadii[curFlashLevel], sFlashLevelPixelRadii[flashLevel], fullBrightness, 1);
|
||||||
sub_80AFFB8();
|
StartWaitForFlashUpdate();
|
||||||
ScriptContext2_Enable();
|
ScriptContext2_Enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1148,7 +1149,7 @@ static void Task_OrbEffect(u8 taskId)
|
||||||
case 1:
|
case 1:
|
||||||
sub_8199DF0(0, PIXEL_FILL(1), 0, 1);
|
sub_8199DF0(0, PIXEL_FILL(1), 0, 1);
|
||||||
LoadOrbEffectPalette(tBlueOrb);
|
LoadOrbEffectPalette(tBlueOrb);
|
||||||
sub_80B003C(tCenterX, tCenterY, 1, 160, 1, 2);
|
StartUpdateOrbFlashEffect(tCenterX, tCenterY, 1, 160, 1, 2);
|
||||||
tState = 2;
|
tState = 2;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
Loading…
Reference in a new issue