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:
+5
-5
@@ -83,7 +83,7 @@ bool8 SafariZoneTakeStep(void)
|
||||
sSafariZoneStepCounter--;
|
||||
if (sSafariZoneStepCounter == 0)
|
||||
{
|
||||
ScriptContext1_SetupScript(SafariZone_EventScript_TimesUp);
|
||||
ScriptContext_SetupScript(SafariZone_EventScript_TimesUp);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -91,7 +91,7 @@ bool8 SafariZoneTakeStep(void)
|
||||
|
||||
void SafariZoneRetirePrompt(void)
|
||||
{
|
||||
ScriptContext1_SetupScript(SafariZone_EventScript_RetirePrompt);
|
||||
ScriptContext_SetupScript(SafariZone_EventScript_RetirePrompt);
|
||||
}
|
||||
|
||||
void CB2_EndSafariBattle(void)
|
||||
@@ -105,15 +105,15 @@ void CB2_EndSafariBattle(void)
|
||||
}
|
||||
else if (gBattleOutcome == B_OUTCOME_NO_SAFARI_BALLS)
|
||||
{
|
||||
ScriptContext2_RunNewScript(SafariZone_EventScript_OutOfBallsMidBattle);
|
||||
RunScriptImmediately(SafariZone_EventScript_OutOfBallsMidBattle);
|
||||
WarpIntoMap();
|
||||
gFieldCallback = FieldCB_ReturnToFieldNoScriptCheckMusic;
|
||||
SetMainCallback2(CB2_LoadMap);
|
||||
}
|
||||
else if (gBattleOutcome == B_OUTCOME_CAUGHT)
|
||||
{
|
||||
ScriptContext1_SetupScript(SafariZone_EventScript_OutOfBalls);
|
||||
ScriptContext1_Stop();
|
||||
ScriptContext_SetupScript(SafariZone_EventScript_OutOfBalls);
|
||||
ScriptContext_Stop();
|
||||
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user