diff options
author | Thierry Crozat | 2017-11-06 23:54:32 +0000 |
---|---|---|
committer | Thierry Crozat | 2018-01-23 02:15:38 +0000 |
commit | 909818c7301998738f04014fa0cbbf44d7a830c8 (patch) | |
tree | f54ca22b10d10eaf94411e7522c5f6973f0e2284 /engines/supernova/msn_def.h | |
parent | ba4e20b80a416132794238b9cb518a67fc9eb57e (diff) | |
download | scummvm-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.h | 5 |
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; |