From a1462cae1f2dce52dd3e9c164cdab3ba8178aaa5 Mon Sep 17 00:00:00 2001 From: Joseph-Eugene Winzer Date: Fri, 16 Jun 2017 15:21:25 +0200 Subject: SUPERNOVA: Adds static combine() to Object Class --- engines/supernova/msn_def.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engines/supernova/msn_def.h b/engines/supernova/msn_def.h index 6fc55a544f..cc236b12b9 100644 --- a/engines/supernova/msn_def.h +++ b/engines/supernova/msn_def.h @@ -429,6 +429,14 @@ struct Object { return _type & type; } + static bool combine(Object &obj1, Object &obj2, ObjectID id1, ObjectID id2) { + if (obj1.hasProperty(COMBINABLE)) + return (((obj1._id == id1) && (obj2._id == id2)) || + ((obj1._id == id2) && (obj2._id == id1))); + else + return false; + } + const char *_name; const char *_description; ObjectID _id; -- cgit v1.2.3