From 0523e8a94a62d318d811131a74f8fe435c2492da Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Thu, 16 Feb 2023 15:46:06 -0400 Subject: TObject: Add `toggle_flags()` --- context.h | 4 ++++ include/pso/TObject.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/context.h b/context.h index 16b224c..4896f3a 100644 --- a/context.h +++ b/context.h @@ -271,6 +271,10 @@ private: m_flags_u16 &= ~static_cast(flags); } + void toggle_flags(object_flags flags) { + m_flags ^= flags; + } + u32 get_flags(object_flags flags) { return m_flags & flags; }; diff --git a/include/pso/TObject.h b/include/pso/TObject.h index f399d7b..e9af709 100644 --- a/include/pso/TObject.h +++ b/include/pso/TObject.h @@ -101,6 +101,10 @@ private: m_flags_u16 &= ~static_cast(flags); } + void toggle_flags(object_flags flags) { + m_flags ^= flags; + } + u32 get_flags(object_flags flags) { return m_flags & flags; }; -- cgit v1.2.3-13-gbd6f