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:
@@ -3401,7 +3401,7 @@ static void Task_DeclineMinBet(u8 taskId)
|
||||
{
|
||||
ClearStdWindowAndFrame(0, FALSE);
|
||||
HideCoinsWindow();
|
||||
ScriptContext2_Disable();
|
||||
UnlockPlayerFieldControls();
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
|
||||
@@ -3413,7 +3413,7 @@ static void Task_NotEnoughForMinBet(u8 taskId)
|
||||
gSpecialVar_0x8004 = 1;
|
||||
HideCoinsWindow();
|
||||
ClearStdWindowAndFrame(0, TRUE);
|
||||
ScriptContext2_Disable();
|
||||
UnlockPlayerFieldControls();
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
@@ -3475,7 +3475,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId)
|
||||
void PlayRoulette(void)
|
||||
{
|
||||
u8 taskId;
|
||||
ScriptContext2_Enable();
|
||||
LockPlayerFieldControls();
|
||||
ShowCoinsWindow(GetCoins(), 1, 1);
|
||||
taskId = CreateTask(Task_PrintRouletteEntryMsg, 0);
|
||||
gTasks[taskId].tCoins = GetCoins();
|
||||
|
||||
Reference in New Issue
Block a user