aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/supernova/msn_def.h7
-rw-r--r--engines/supernova/supernova.cpp1
2 files changed, 8 insertions, 0 deletions
diff --git a/engines/supernova/msn_def.h b/engines/supernova/msn_def.h
index a0231aca2d..50c91aaf46 100644
--- a/engines/supernova/msn_def.h
+++ b/engines/supernova/msn_def.h
@@ -450,6 +450,7 @@ ObjectType &operator^=(ObjectType &a, ObjectType b);
struct Object {
static const char *const defaultDescription;
static const char *const takeMessage;
+ static const Object nullObject;
Object()
: _name("")
@@ -475,6 +476,12 @@ struct Object {
, _direction(direction)
{}
+ static void setObjectNull(Object *&obj) {
+ obj = const_cast<Object *>(&nullObject);
+ }
+ static bool isNullObject(Object *obj) {
+ return obj == &nullObject;
+ }
void setProperty(ObjectType type) {
_type |= type;
}
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp
index b11c66a831..26a6aa5ed8 100644
--- a/engines/supernova/supernova.cpp
+++ b/engines/supernova/supernova.cpp
@@ -67,6 +67,7 @@ const AudioInfo audioInfo[kAudioNumSamples] = {
const char *const Object::defaultDescription = "Es ist nichts Besonderes daran.";
const char *const Object::takeMessage = "Das mußt du erst nehmen.";
+const Object Object::nullObject = Object();
ObjectType operator|(ObjectType a, ObjectType b) {
return static_cast<ObjectType>(+a | +b);