Ported task.c and others from pokeruby

This commit is contained in:
Diegoisawesome committed 2016-10-31 09:43:17 -05:00
1 parent 6874afafe5
commit 4df1937738
30 files changed
+3274 -2216

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
#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();
u8 CreateTask(TaskFunc func, u8 priority);
void DestroyTask(u8 taskId);
void RunTasks();
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();
#endif // GUARD_TASK_H