Sync script.c

This commit is contained in:
GriffinR
2022-08-22 20:27:23 -04:00
parent 56f8b1a47c
commit 72f76b19b3
52 changed files with 408 additions and 385 deletions
+6 -6
View File
@@ -154,7 +154,7 @@ static void sub_807EF7C(u8 taskId)
{
if (!FuncIsActiveTask(UpdateFlashLevelEffect))
{
EnableBothScriptContexts();
ScriptContext_Enable();
DestroyTask(taskId);
}
}
@@ -198,7 +198,7 @@ void AnimateFlash(u8 flashLevel)
value = TRUE;
sub_807EFC8(120, 80, sFlashLevelPixelRadii[curFlashLevel], sFlashLevelPixelRadii[flashLevel], value, 2);
sub_807EFA4();
ScriptContext2_Enable();
LockPlayerFieldControls();
}
void WriteFlashScanlineEffectBuffer(u8 flashLevel)
@@ -221,7 +221,7 @@ static void Task_EnableScriptAfterMusicFade(u8 taskId)
if (BGMusicStopped() == TRUE)
{
DestroyTask(taskId);
EnableBothScriptContexts();
ScriptContext_Enable();
}
}
@@ -435,14 +435,14 @@ static void Task_RushInjuredPokemonToCenter(u8 taskId)
if (FieldFadeTransitionBackgroundEffectIsFinished() == TRUE)
{
DestroyTask(taskId);
ScriptContext1_SetupScript(EventScript_AfterWhiteOutHeal);
ScriptContext_SetupScript(EventScript_AfterWhiteOutHeal);
}
break;
case 6:
if (FieldFadeTransitionBackgroundEffectIsFinished() == TRUE)
{
DestroyTask(taskId);
ScriptContext1_SetupScript(EventScript_AfterWhiteOutMomHeal);
ScriptContext_SetupScript(EventScript_AfterWhiteOutMomHeal);
}
break;
}
@@ -452,7 +452,7 @@ void FieldCB_RushInjuredPokemonToCenter(void)
{
u8 taskId;
ScriptContext2_Enable();
LockPlayerFieldControls();
palette_bg_faded_fill_black();
taskId = CreateTask(Task_RushInjuredPokemonToCenter, 10);
gTasks[taskId].data[0] = 0;