diff options
Diffstat (limited to 'engines/dm/dm.h')
-rw-r--r-- | engines/dm/dm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/dm/dm.h b/engines/dm/dm.h index 08fb3c52e4..25fabc78fe 100644 --- a/engines/dm/dm.h +++ b/engines/dm/dm.h @@ -116,6 +116,11 @@ public: byte getCell() const { return _data >> 14; } ThingType getType() const { return (ThingType)((_data >> 10) & 0xF); } uint16 getIndex() const { return _data & 0x3FF; } + + void setCell(uint16 cell) { _data = (_data & ~(0x3 << 14)) | ((cell & 0x3) << 14); } + void setType(uint16 type) { _data = (_data & ~(0xF << 10)) | ((type & 0xF) << 10); } + void setIndex(uint16 index) { _data = (_data & ~0x3FF) | (index & 0x3FF); } + uint16 getTypeAndIndex() { return _data & 0x3FFF; } uint16 toUint16() const { return _data; } // I don't like 'em cast operators bool operator==(const Thing &rhs) const { return _data == rhs._data; } |