aboutsummaryrefslogtreecommitdiff
path: root/engines/dm/dm.cpp
diff options
context:
space:
mode:
authorBendegúz Nagy2016-06-30 15:48:23 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit6d2d839d2721917e2c512511da544a07a9382322 (patch)
tree3c4ba4a2a9d0d2d48fe3288d6877752e83e0ec85 /engines/dm/dm.cpp
parentcd7363f8de93001208f34d43bcb4f656b8514110 (diff)
downloadscummvm-rg350-6d2d839d2721917e2c512511da544a07a9382322.tar.gz
scummvm-rg350-6d2d839d2721917e2c512511da544a07a9382322.tar.bz2
scummvm-rg350-6d2d839d2721917e2c512511da544a07a9382322.zip
DM: Add creature masks/types, F0176_GROUP_GetCreatureOrdinalInCell
Diffstat (limited to 'engines/dm/dm.cpp')
-rw-r--r--engines/dm/dm.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index 1b2edceb81..924988d39d 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -56,6 +56,15 @@ namespace DM {
void turnDirRight(direction &dir) { dir = (direction)((dir + 1) & 3); }
void turnDirLeft(direction &dir) { dir = (direction)((dir - 1) & 3); }
direction returnOppositeDir(direction dir) { return (direction)((dir + 2) & 3); }
+
+uint16 returnPrevVal(uint16 val) {
+ return (direction)((val + 3) & 3);
+}
+
+uint16 returnNextVal(uint16 val) {
+ return (val + 1) & 0x3;
+}
+
bool isOrientedWestEast(direction dir) { return dir & 1; }
uint16 getFlag(uint16 val, uint16 mask) {
@@ -205,7 +214,7 @@ Common::Error DMEngine::run() {
_objectMan = new ObjectMan(this);
_inventoryMan = new InventoryMan(this);
_textMan = new TextMan(this);
- _movsens = new MovesensMan(this);
+ _movsens = new MovesensMan(this);
_groupMan = new GroupMan(this);
_displayMan->setUpScreens(320, 200);