aboutsummaryrefslogtreecommitdiff
path: root/engines/dm/dm.h
diff options
context:
space:
mode:
authorBendegúz Nagy2016-08-10 18:30:33 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit50453e02bf1dce8535888cc54babf9335af16077 (patch)
tree8f71069bbd7224c701949c60c507f07b83e20560 /engines/dm/dm.h
parent6279c566152203fd761cae9b7333f27320730261 (diff)
downloadscummvm-rg350-50453e02bf1dce8535888cc54babf9335af16077.tar.gz
scummvm-rg350-50453e02bf1dce8535888cc54babf9335af16077.tar.bz2
scummvm-rg350-50453e02bf1dce8535888cc54babf9335af16077.zip
DM: Add gimme debug command spawning items
Diffstat (limited to 'engines/dm/dm.h')
-rw-r--r--engines/dm/dm.h5
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; }