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:
@@ -1579,8 +1579,8 @@ static void Task_PCMainMenu(u8 taskId)
|
||||
case MENU_B_PRESSED:
|
||||
case OPTION_EXIT:
|
||||
ClearStdWindowAndFrame(task->tWindowId, TRUE);
|
||||
ScriptContext2_Disable();
|
||||
EnableBothScriptContexts();
|
||||
UnlockPlayerFieldControls();
|
||||
ScriptContext_Enable();
|
||||
RemoveWindow(task->tWindowId);
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
@@ -1655,7 +1655,7 @@ void ShowPokemonStorageSystemPC(void)
|
||||
u8 taskId = CreateTask(Task_PCMainMenu, 80);
|
||||
gTasks[taskId].tState = 0;
|
||||
gTasks[taskId].tSelectedOption = 0;
|
||||
ScriptContext2_Enable();
|
||||
LockPlayerFieldControls();
|
||||
}
|
||||
|
||||
static void FieldTask_ReturnToPcMenu(void)
|
||||
|
||||
Reference in New Issue
Block a user