mirror of
https://github.com/pret/pokeruby.git
synced 2024-11-30 16:32:17 +00:00
4258e60771
* Declare more non-static functions in header files * Use `(void)` for functions without arguments. * Move global-included data to seperate headers * Don't import types or global in header * Fix fieldmap imports * Revert in-code changes * Add missing newlines
30 lines
619 B
C
30 lines
619 B
C
#ifndef GUARD_TASK_H
|
|
#define GUARD_TASK_H
|
|
|
|
typedef void (*TaskFunc)(u8 taskId);
|
|
|
|
struct Task
|
|
{
|
|
TaskFunc func;
|
|
bool8 isActive;
|
|
u8 prev;
|
|
u8 next;
|
|
u8 priority;
|
|
s16 data[16];
|
|
};
|
|
|
|
extern struct Task gTasks[];
|
|
|
|
void ResetTasks(void);
|
|
u8 CreateTask(TaskFunc func, u8 priority);
|
|
void DestroyTask(u8 taskId);
|
|
void RunTasks(void);
|
|
void TaskDummy(u8 taskId);
|
|
void SetTaskFuncWithFollowupFunc(u8 taskId, TaskFunc func, TaskFunc followupFunc);
|
|
void SwitchTaskToFollowupFunc(u8 taskId);
|
|
bool8 FuncIsActiveTask(TaskFunc func);
|
|
u8 FindTaskIdByFunc(TaskFunc func);
|
|
u8 GetTaskCount(void);
|
|
|
|
#endif // GUARD_TASK_H
|