pret / pokeplatinum

Decompilation of Pokémon Platinum
188 stars 62 forks source link

Document Task System #230

Closed Fexty12573 closed 3 months ago

Fexty12573 commented 3 months ago

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:

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.

cbt6 commented 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?

Fexty12573 commented 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?

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.

lhearachel commented 3 months ago

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: