Skip to content

Commit

Permalink
DM: Fix pressure plate on level 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendegúz Nagy committed Aug 26, 2016
1 parent 665ea3b commit d7c7f11
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion engines/dm/TODOs/todo.txt
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions engines/dm/dm.cpp
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion engines/dm/dungeonman.h
Expand Up @@ -315,7 +315,7 @@ class Sensor {
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
Expand Down
4 changes: 2 additions & 2 deletions engines/dm/movesens.cpp
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit d7c7f11

Please sign in to comment.