aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova/msn_def.h
diff options
context:
space:
mode:
authorThierry Crozat2017-11-06 23:54:32 +0000
committerThierry Crozat2018-01-23 02:15:38 +0000
commit909818c7301998738f04014fa0cbbf44d7a830c8 (patch)
treef54ca22b10d10eaf94411e7522c5f6973f0e2284 /engines/supernova/msn_def.h
parentba4e20b80a416132794238b9cb518a67fc9eb57e (diff)
downloadscummvm-rg350-909818c7301998738f04014fa0cbbf44d7a830c8.tar.gz
scummvm-rg350-909818c7301998738f04014fa0cbbf44d7a830c8.tar.bz2
scummvm-rg350-909818c7301998738f04014fa0cbbf44d7a830c8.zip
SUPERNOVA: Fix combining ObjectType enum values
It was storing the result of bitwise operation on the ObjectType enum values in a ObjectType variable. But that was incorrect as the result was not a value from the enum. Also removing a property was actually adding the property if it was not present in the value initially.
Diffstat (limited to 'engines/supernova/msn_def.h')
-rw-r--r--engines/supernova/msn_def.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/supernova/msn_def.h b/engines/supernova/msn_def.h
index 0cca058bba..eda835eb75 100644
--- a/engines/supernova/msn_def.h
+++ b/engines/supernova/msn_def.h
@@ -330,6 +330,7 @@ enum ObjectType {
OCCUPIED = 2048,
CAUGHT = 4096
};
+typedef uint16 ObjectTypes;
enum Action {
ACTION_WALK,
@@ -613,7 +614,7 @@ struct Object {
}
void disableProperty(ObjectType type) {
- _type ^= type;
+ _type &= ~type;
}
bool hasProperty(ObjectType type) const {
@@ -632,7 +633,7 @@ struct Object {
StringID _name;
StringID _description;
ObjectID _id;
- ObjectType _type;
+ ObjectTypes _type;
byte _click;
byte _click2;
byte _section;