aboutsummaryrefslogtreecommitdiff
path: root/engines/dm
diff options
context:
space:
mode:
authorBendegúz Nagy2016-07-27 18:17:56 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit572d3bf82206e8db5fb2e113cb5bbce211514f33 (patch)
tree30013bf4b36622681eaf4ea6015696b6cc18f865 /engines/dm
parent2cd9c90e17b1ac5b22dce45bbb44fcdd05ea9d17 (diff)
downloadscummvm-rg350-572d3bf82206e8db5fb2e113cb5bbce211514f33.tar.gz
scummvm-rg350-572d3bf82206e8db5fb2e113cb5bbce211514f33.tar.bz2
scummvm-rg350-572d3bf82206e8db5fb2e113cb5bbce211514f33.zip
DM: Fix torch, lever bug and fix several Sensor methods
Diffstat (limited to 'engines/dm')
-rw-r--r--engines/dm/TODOs/todo.txt2
-rw-r--r--engines/dm/dungeonman.h12
2 files changed, 7 insertions, 7 deletions
diff --git a/engines/dm/TODOs/todo.txt b/engines/dm/TODOs/todo.txt
index 1ef449d1c5..cefa603bf2 100644
--- a/engines/dm/TODOs/todo.txt
+++ b/engines/dm/TODOs/todo.txt
@@ -4,7 +4,7 @@ Bugs:
Portraits, alcoves etc. look broken from afar
Arrow and hand display is messed up
Items are displayed in the wrong cells
- Levers look the same after pulling them
+
Logic:
When object are put on the right side of the current square, they disappear
diff --git a/engines/dm/dungeonman.h b/engines/dm/dungeonman.h
index 6fed1848a9..bbd1499959 100644
--- a/engines/dm/dungeonman.h
+++ b/engines/dm/dungeonman.h
@@ -319,7 +319,7 @@ public:
uint16 getData() { return (_datAndType >> 7) & 0x1FF; } // @ M40_DATA
static uint16 getDataMask1(uint16 data) { return (data >> 7) & 0xF; } // @ M42_MASK1
static uint16 getDataMask2(uint16 data) { return (data >> 11) & 0xF; } // @ M43_MASK2
- void setData(int16 dat) { _datAndType = (_datAndType & 0x7F) | (dat << 7); } // @ M41_SET_DATA
+ void setData(uint16 dat) { _datAndType = dat; } // @ M41_SET_DATA
void setTypeDisabled() { _datAndType &= 0xFF80; } // @ M44_SET_TYPE_DISABLED
@@ -335,11 +335,11 @@ public:
uint16 getTargetMapY() { return (_action >> 11); }
uint16 getTargetMapX() { return (_action >> 6) & 0x1F; }
Direction getTargetCell() { return (Direction)((_action >> 4) & 3); }
- uint16 M47_kineticEnergy() { return (_action & 0xFF); }// @ M47_KINETIC_ENERGY
- uint16 M48_stepEnergy() { return (_action >> 8) & 0xFF; }// @ M48_STEP_ENERGY
- uint16 M49_localEffect() { return _action; } // @ M49_LOCAL_EFFECT
- uint16 M45_healthMultiplier() { return (_action & 0xF); } // @ M45_HEALTH_MULTIPLIER
- uint16 M46_ticks() { return (_action >> 4) & 0xFFF; } // @ M46_TICKS
+ uint16 M45_healthMultiplier() { return ((_action >> 4) & 0xF); } // @ M45_HEALTH_MULTIPLIER
+ uint16 M46_ticks() { return ((_action >> 4) >> 4) & 0xFFF; } // @ M46_TICKS
+ uint16 M47_kineticEnergy() { return ((_action >> 4) & 0xFF); }// @ M47_KINETIC_ENERGY
+ uint16 M48_stepEnergy() { return ((_action >> 4) >> 8) & 0xFF; }// @ M48_STEP_ENERGY
+ uint16 M49_localEffect() { return (_action >> 4); } // @ M49_LOCAL_EFFECT
void setDatAndTypeWithOr(uint16 val) { _datAndType |= val; }