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:
@@ -2044,7 +2044,7 @@ bool8 UseRegisteredKeyItemOnField(void)
|
||||
{
|
||||
if (CheckBagHasItem(gSaveBlock1Ptr->registeredItem, 1) == TRUE)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
LockPlayerFieldControls();
|
||||
FreezeObjectEvents();
|
||||
PlayerFreeze();
|
||||
StopPlayerAvatar();
|
||||
@@ -2058,7 +2058,7 @@ bool8 UseRegisteredKeyItemOnField(void)
|
||||
gSaveBlock1Ptr->registeredItem = ITEM_NONE;
|
||||
}
|
||||
}
|
||||
ScriptContext1_SetupScript(EventScript_SelectWithoutRegisteredItem);
|
||||
ScriptContext_SetupScript(EventScript_SelectWithoutRegisteredItem);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2373,7 +2373,7 @@ static void ItemMenu_Show(u8 taskId)
|
||||
|
||||
static void CB2_ApprenticeExitBagMenu(void)
|
||||
{
|
||||
gFieldCallback = Apprentice_EnableBothScriptContexts;
|
||||
gFieldCallback = Apprentice_ScriptContext_Enable;
|
||||
SetMainCallback2(CB2_ReturnToField);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user