mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-17 12:07:38 +01:00
Make variable name shorter
This commit is contained in:
parent
d3259ebe2c
commit
3b80f3caf1
10
src/task.c
10
src/task.c
@ -138,18 +138,18 @@ void TaskDummy(u8 taskId)
|
|||||||
|
|
||||||
void SetTaskFuncWithFollowupFunc(u8 taskId, TaskFunc func, TaskFunc followupFunc)
|
void SetTaskFuncWithFollowupFunc(u8 taskId, TaskFunc func, TaskFunc followupFunc)
|
||||||
{
|
{
|
||||||
u8 followupFuncDataIndex = NUM_TASK_DATA - 2; // Should be const.
|
u8 followupFuncIndex = NUM_TASK_DATA - 2; // Should be const.
|
||||||
|
|
||||||
gTasks[taskId].data[followupFuncDataIndex] = (s16)((u32)followupFunc);
|
gTasks[taskId].data[followupFuncIndex] = (s16)((u32)followupFunc);
|
||||||
gTasks[taskId].data[followupFuncDataIndex + 1] = (s16)((u32)followupFunc >> 16);
|
gTasks[taskId].data[followupFuncIndex + 1] = (s16)((u32)followupFunc >> 16);
|
||||||
gTasks[taskId].func = func;
|
gTasks[taskId].func = func;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwitchTaskToFollowupFunc(u8 taskId)
|
void SwitchTaskToFollowupFunc(u8 taskId)
|
||||||
{
|
{
|
||||||
u8 followupFuncDataIndex = NUM_TASK_DATA - 2; // Should be const.
|
u8 followupFuncIndex = NUM_TASK_DATA - 2; // Should be const.
|
||||||
|
|
||||||
gTasks[taskId].func = (TaskFunc)((u16)(gTasks[taskId].data[followupFuncDataIndex]) | (gTasks[taskId].data[followupFuncDataIndex + 1] << 16));
|
gTasks[taskId].func = (TaskFunc)((u16)(gTasks[taskId].data[followupFuncIndex]) | (gTasks[taskId].data[followupFuncIndex + 1] << 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 FuncIsActiveTask(TaskFunc func)
|
bool8 FuncIsActiveTask(TaskFunc func)
|
||||||
|
Loading…
Reference in New Issue
Block a user