From f2e51c3cfe0a6c1ae2794d5eee54dba4da0ba201 Mon Sep 17 00:00:00 2001 From: Joseph-Eugene Winzer Date: Fri, 16 Jun 2017 10:25:41 +0200 Subject: SUPERNOVA: Adds hasProperty() for Objects and bit ops --- engines/supernova/msn_def.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engines/supernova/msn_def.h') diff --git a/engines/supernova/msn_def.h b/engines/supernova/msn_def.h index 1bd81ddc0f..d19dd1ed6a 100644 --- a/engines/supernova/msn_def.h +++ b/engines/supernova/msn_def.h @@ -371,8 +371,10 @@ enum ObjectID { }; ObjectType operator|(ObjectType a, ObjectType b); +ObjectType operator&(ObjectType a, ObjectType b); ObjectType operator^(ObjectType a, ObjectType b); ObjectType &operator|=(ObjectType &a, ObjectType b); +ObjectType &operator&=(ObjectType &a, ObjectType b); ObjectType &operator^=(ObjectType &a, ObjectType b); struct Object { @@ -410,6 +412,10 @@ struct Object { _type ^= type; } + bool hasProperty(ObjectType type) const { + return _type & type; + } + const char *_name; const char *_description; ObjectID _id; -- cgit v1.2.3