diff options
Diffstat (limited to 'include/pso')
-rw-r--r-- | include/pso/TMainTask.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/pso/TMainTask.h b/include/pso/TMainTask.h index 8e7243a..34c2d6c 100644 --- a/include/pso/TMainTask.h +++ b/include/pso/TMainTask.h @@ -5,6 +5,20 @@ #include "pso/macros.h" #include "pso/TObject.h" +#define SET_OR_CLEAR_CHILD_FLAGS(flags, old_flags, flag_bit) \ + if (flags != old_flags) { \ + TMainTask *child; \ + u32 bit = 1; \ + FOREACH_NODE_NODECL_MULTI_ITER(TMainTask, main_task.down, child, bit <<= 1) { \ + if (main_task_flags & bit) { \ + child->set_flag_##flag_bit(); \ + } else { \ + child->clear_flag_##flag_bit(); \ + } \ + } \ + old_flags = flags; \ + } + class TMainTask : public TObject { public: u32 task_flags; |