20 (*gCurrentWorkerListPtr)[i] = NULL;
37 Worker* lastWorker = (*gCurrentWorkerListPtr)[i];
38 if (lastWorker == NULL) {
44 (*gCurrentWorkerListPtr)[i] = worker =
heap_malloc(
sizeof(*worker));
48 worker->
update = updateFunc;
49 if (updateFunc == NULL) {
52 worker->
draw = drawFunc;
53 if (drawFunc == NULL) {
68 Worker* lastWorker = (*gCurrentWorkerListPtr)[i];
69 if (lastWorker == NULL) {
75 (*gCurrentWorkerListPtr)[i] = worker =
heap_malloc(
sizeof(*worker));
79 worker->
update = updateFunc;
80 if (updateFunc == NULL) {
83 worker->
draw = drawFunc;
84 if (drawFunc == NULL) {
99 Worker* lastWorker = (*gCurrentWorkerListPtr)[i];
100 if (lastWorker == NULL) {
106 (*gCurrentWorkerListPtr)[i] = worker =
heap_malloc(
sizeof(*worker));
110 worker->
update = updateFunc;
111 if (updateFunc == NULL) {
114 worker->
draw = drawFunc;
115 if (drawFunc == NULL) {
129 Worker* worker = (*gCurrentWorkerListPtr)[i];
130 if (worker != NULL) {
131 worker->
flags &= ~WORKER_FLAG_SKIP_DRAW_UNTIL_UPDATE;
141 Worker* worker = (*gCurrentWorkerListPtr)[i];
154 Worker* worker = (*gCurrentWorkerListPtr)[i];
167 Worker* worker = (*gCurrentWorkerListPtr)[i];
178 idx &= ~BATTLE_ENTITY_ID_BIT;
181 (*gCurrentWorkerListPtr)[idx] = NULL;
#define ASSERT(condition)
@ WORKER_FLAG_SKIP_DRAW_UNTIL_UPDATE
void * heap_malloc(s32 size)
#define BATTLE_ENTITY_ID_BIT
GameStatus * gGameStatusPtr
Worker * get_worker(s32 idx)
void render_workers_frontUI(void)
s32 create_worker_backUI(void(*updateFunc)(void), void(*drawFunc)(void))
void worker_delegate_do_nothing(void)
void render_workers_backUI(void)
void render_workers_world(void)
void clear_worker_list(void)
BSS WorkerList gWorldWorkerList
s32 create_worker_world(void(*updateFunc)(void), void(*drawFunc)(void))
BSS WorkerList * gCurrentWorkerListPtr
void free_worker(s32 idx)
s32 create_worker_frontUI(void(*updateFunc)(void), void(*drawFunc)(void))
void update_workers(void)
void init_worker_list(void)
BSS WorkerList gBattleWorkerList