aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2017-06-16 15:21:25 +0200
committerThierry Crozat2018-01-22 23:17:48 +0000
commita1462cae1f2dce52dd3e9c164cdab3ba8178aaa5 (patch)
tree5b2f8740e293b664db14391ee2d34eae18d26eb8
parent55c67005a638989fdc3e9cbe03d84ed0ff975051 (diff)
downloadscummvm-rg350-a1462cae1f2dce52dd3e9c164cdab3ba8178aaa5.tar.gz
scummvm-rg350-a1462cae1f2dce52dd3e9c164cdab3ba8178aaa5.tar.bz2
scummvm-rg350-a1462cae1f2dce52dd3e9c164cdab3ba8178aaa5.zip
SUPERNOVA: Adds static combine() to Object Class
-rw-r--r--engines/supernova/msn_def.h8
1 files changed, 8 insertions, 0 deletions
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;