Renaming Script Contexts
- Determined how the various script contexts were used and renamed accordingly. - ScriptContext2_Enable/Disable => Lock/UnlockPlayerFieldControls - The sole purpose of the flag is to make sure the player can't move around in the overworld. It has nothing to do with script contexts. - ScriptContext1 => ScriptContext - It is the global script context used to set up scripts which run over many frames. - ScriptContext2_RunNewScript => RunScriptImmediately - ScriptContext2's sole purpose was to run scripts immediately and in a separate context, usually while the global context is waiting for things like map loads or screen changes.
This commit is contained in:
@@ -132,9 +132,9 @@ void BufferApprenticeChallengeText(u8 saveApprenticeId)
|
||||
StringExpandPlaceholders(gStringVar4, challengeText);
|
||||
}
|
||||
|
||||
void Apprentice_EnableBothScriptContexts(void)
|
||||
void Apprentice_ScriptContext_Enable(void)
|
||||
{
|
||||
EnableBothScriptContexts();
|
||||
ScriptContext_Enable();
|
||||
}
|
||||
|
||||
void ResetApprenticeStruct(struct Apprentice *apprentice)
|
||||
@@ -679,7 +679,7 @@ static void Task_ChooseAnswer(u8 taskId)
|
||||
|
||||
RemoveAndHideWindow(tWindowId);
|
||||
DestroyTask(taskId);
|
||||
EnableBothScriptContexts();
|
||||
ScriptContext_Enable();
|
||||
}
|
||||
|
||||
static u8 CreateAndShowWindow(u8 left, u8 top, u8 width, u8 height)
|
||||
@@ -815,9 +815,9 @@ static void Task_WaitForPrintingMessage(u8 taskId)
|
||||
{
|
||||
DestroyTask(taskId);
|
||||
if (gSpecialVar_0x8005)
|
||||
ExecuteFuncAfterButtonPress(EnableBothScriptContexts);
|
||||
ExecuteFuncAfterButtonPress(ScriptContext_Enable);
|
||||
else
|
||||
EnableBothScriptContexts();
|
||||
ScriptContext_Enable();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -895,7 +895,7 @@ static void PrintApprenticeMessage(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
EnableBothScriptContexts();
|
||||
ScriptContext_Enable();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -906,7 +906,7 @@ static void PrintApprenticeMessage(void)
|
||||
|
||||
static void Script_PrintApprenticeMessage(void)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
LockPlayerFieldControls();
|
||||
FreezeObjectEvents();
|
||||
PlayerFreeze();
|
||||
StopPlayerAvatar();
|
||||
|
||||
Reference in New Issue
Block a user