aboutsummaryrefslogtreecommitdiff
path: root/engines/dm
diff options
context:
space:
mode:
authorBendegúz Nagy2016-07-14 19:44:58 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commitd7c7f110c1f63ec91c0837e09e9a614b6eee3cb2 (patch)
tree21439416938959682feca12f9be524809ec02fb5 /engines/dm
parent665ea3beff7be4d9240ff89b671d8e77038a0990 (diff)
downloadscummvm-rg350-d7c7f110c1f63ec91c0837e09e9a614b6eee3cb2.tar.gz
scummvm-rg350-d7c7f110c1f63ec91c0837e09e9a614b6eee3cb2.tar.bz2
scummvm-rg350-d7c7f110c1f63ec91c0837e09e9a614b6eee3cb2.zip
DM: Fix pressure plate on level 0
Diffstat (limited to 'engines/dm')
-rw-r--r--engines/dm/TODOs/todo.txt2
-rw-r--r--engines/dm/dm.cpp6
-rw-r--r--engines/dm/dungeonman.h2
-rw-r--r--engines/dm/movesens.cpp4
4 files changed, 7 insertions, 7 deletions
diff --git a/engines/dm/TODOs/todo.txt b/engines/dm/TODOs/todo.txt
index 229ed8cb55..71b8aa191b 100644
--- a/engines/dm/TODOs/todo.txt
+++ b/engines/dm/TODOs/todo.txt
@@ -7,7 +7,7 @@ Bugs:
Logic:
When object are put on the right side of the current square, they disappear
Drawing door ornaments segfaults when going back to the start
- Stepping onto the plate next doesn't open the grated gate on the 0th level
+ Placing one of the play icons from the top right corner into one of the champions' hands will crash the engine
Possible bugs:
- k1_LeftMouseButton and k2_RightMouseButton have values 1 and 2 respectively, contrary to the original in the original: MASK0x0001_MOUSE_RIGHT_BUTTON, MASK0x0002_MOUSE_LEFT_BUTTON
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index b3018bafe5..526b60e5f1 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -322,9 +322,9 @@ Common::Error DMEngine::run() {
void DMEngine::f2_gameloop() {
warning(false, "DUMMY CODE: SETTING PARTY POS AND DIRECTION");
- _dungeonMan->_g306_partyMapX = 10;
- _dungeonMan->_g307_partyMapY = 4;
- _dungeonMan->_g308_partyDir = kDirNorth;
+ _dungeonMan->_g306_partyMapX = 9;
+ _dungeonMan->_g307_partyMapY = 9;
+ _dungeonMan->_g308_partyDir = kDirWest;
_g318_waitForInputMaxVerticalBlankCount = 10;
while (true) {
diff --git a/engines/dm/dungeonman.h b/engines/dm/dungeonman.h
index a9bc369efe..1a91d5d61e 100644
--- a/engines/dm/dungeonman.h
+++ b/engines/dm/dungeonman.h
@@ -315,7 +315,7 @@ public:
Thing getNextThing() { return _nextThing; }
void setNextThing(Thing thing) { _nextThing = thing; }
SensorType getType() { return (SensorType)(_datAndType & 0x7F); } // @ M39_TYPE
- uint16 getData() { return _datAndType >> 7; } // @ M40_DATA
+ 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
diff --git a/engines/dm/movesens.cpp b/engines/dm/movesens.cpp
index 34e83ca262..65742e6dbb 100644
--- a/engines/dm/movesens.cpp
+++ b/engines/dm/movesens.cpp
@@ -748,7 +748,7 @@ void MovesensMan::f276_sensorProcessThingAdditionOrRemoval(uint16 mapX, uint16 m
int16 L0767_i_ThingType;
bool L0768_B_TriggerSensor;
Sensor* L0769_ps_Sensor;
- uint16 L0770_ui_SensorTriggeredCell;
+ int16 L0770_ui_SensorTriggeredCell;
uint16 L0771_ui_ThingType;
bool L0772_B_SquareContainsObject;
bool L0773_B_SquareContainsGroup;
@@ -773,7 +773,7 @@ void MovesensMan::f276_sensorProcessThingAdditionOrRemoval(uint16 mapX, uint16 m
if (Square(L0777_ui_Square = _vm->_dungeonMan->_g271_currMapData[mapX][mapY]).getType() == k0_ElementTypeWall) {
L0770_ui_SensorTriggeredCell = thing.getCell();
} else {
- L0770_ui_SensorTriggeredCell = (uint16)kM1_CellAny; // this will wrap around
+ L0770_ui_SensorTriggeredCell = kM1_CellAny; // this will wrap around
}
L0772_B_SquareContainsObject = L0773_B_SquareContainsGroup = L0775_B_SquareContainsThingOfSameType = L0776_B_SquareContainsThingOfDifferentType = false;
L0766_T_Thing = _vm->_dungeonMan->f161_getSquareFirstThing(mapX, mapY);