Closed Fexty12573 closed 3 months ago
All tasks also have a priority value. Tasks are executed in order from lowest to highest.
This caught my eye because intuitively I would have assumed the other way round (that tasks with higher priority values are executed first). Do you think it is worth documenting this in the codebase too?
All tasks also have a priority value. Tasks are executed in order from lowest to highest.
This caught my eye because intuitively I would have assumed the other way round (that tasks with higher priority values are executed first). Do you think it is worth documenting this in the codebase too?
If so I would probably put this in the file where SysTask_Start
and the like are, since that would likely be the first place people would be looking.
If so I would probably put this in the file where SysTask_Start and the like are, since that would likely be the first place people would be looking.
I also believe that this would be useful to add.
Also seems like the Camera PR introduced more conflicts to address. :sweat_smile:
Documents the Task System and
SysTaskManager
.TaskManager
is already taken so this was the next best thing I could come up with.There are 4 main task managers:
mainTaskMgr
: The main task manager with the largest task capacity (160). Executed before VBlank.vBlankTaskMgr
: Task submitted to this task manager get executed during VBlank. Up to 32 taskspostVBlankTaskMgr
: Tasks get executed after VBlank, essentially the last thing that happens in the main loop. Up to 32 tasks.unk_24
: Unsure what this one is for. It's executed right after the main one and can even execute twice per frame. Up to 4 tasks.Each task manager manages its own pool of tasks which can be freely added to or removed from. All tasks also have a priority value. Tasks are executed in order from lowest to highest. The order of the tasts is dictated by a doubly linked list held by the manager.