diff options
Diffstat (limited to 'src/core/zone.h')
-rw-r--r-- | src/core/zone.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/core/zone.h b/src/core/zone.h index 644620d..22440c4 100644 --- a/src/core/zone.h +++ b/src/core/zone.h @@ -76,6 +76,8 @@ public: } /* ---- Zone class ----------------------------------------- */ + + enum Flags { Hidden = 1 }; /** * @brief create a new zone @@ -103,6 +105,18 @@ public: inline unsigned int id() const { return zone_id; } + + /// zone flags + inline const unsigned int flags() const { + return zone_flags; + } + + /** + * @brief returns true if a specified flag is set + * */ + inline const bool has_flag(const Flags flag) const { + return ((zone_flags & (unsigned int) flag) == (unsigned int) flag); + } /// ambient light color inline math::Color const & ambient_color() { @@ -144,6 +158,20 @@ public: Entity *search_entity(const std::string & label); /* ---- mutators ------------------------------------------- */ + + /** + * @brief set flag + * */ + inline void set_flag(Flags flag) { + zone_flags |= (unsigned int) flag; + } + + /** + * @brief unset flag + * */ + inline void unset_flag(Flags flag) { + zone_flags &= ~((unsigned int) flag); + } /** * @brief set the skybox name @@ -244,6 +272,7 @@ public: private: unsigned int zone_id; + unsigned int zone_flags; std::string zone_sky; math::Color zone_ambient_color; |