aboutsummaryrefslogtreecommitdiff
path: root/engines/dm
diff options
context:
space:
mode:
authorStrangerke2016-09-04 23:58:51 +0200
committerStrangerke2016-09-04 23:58:51 +0200
commit6e404ec0bc98eddf51749f94f9a9ffa7884b9119 (patch)
treebfe8084333e75aa7d4a60b1821a9695b22967c81 /engines/dm
parentd6b2ea67b03a8bf635fb109c375d6de7e726399d (diff)
downloadscummvm-rg350-6e404ec0bc98eddf51749f94f9a9ffa7884b9119.tar.gz
scummvm-rg350-6e404ec0bc98eddf51749f94f9a9ffa7884b9119.tar.bz2
scummvm-rg350-6e404ec0bc98eddf51749f94f9a9ffa7884b9119.zip
DM: Small refactoring in processThingAdditionOrRemoval
Diffstat (limited to 'engines/dm')
-rw-r--r--engines/dm/movesens.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/dm/movesens.cpp b/engines/dm/movesens.cpp
index d27ef86790..2cc176078e 100644
--- a/engines/dm/movesens.cpp
+++ b/engines/dm/movesens.cpp
@@ -709,7 +709,7 @@ Thing MovesensMan::getTeleporterRotatedProjectileThing(Teleporter *teleporter, T
void MovesensMan::processThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing thing, bool partySquare, bool addThing) {
int16 thingType;
- int16 objectType;
+ IconIndice objectType;
if (thing != Thing::_party) {
thingType = thing.getType();
objectType = _vm->_objectMan->getObjectType(thing);
@@ -721,9 +721,9 @@ void MovesensMan::processThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing
if ((!addThing) && (thingType != kM1_PartyThingType))
_vm->_dungeonMan->unlinkThingFromList(thing, Thing(0), mapX, mapY);
- uint16 curSquare = _vm->_dungeonMan->_currMapData[mapX][mapY];
+ Square curSquare = Square(_vm->_dungeonMan->_currMapData[mapX][mapY]);
int16 sensorTriggeredCell;
- if (Square(curSquare).getType() == k0_WallElemType)
+ if (curSquare.getType() == k0_WallElemType)
sensorTriggeredCell = thing.getCell();
else
sensorTriggeredCell = kM1_CellAny; // this will wrap around
@@ -797,7 +797,7 @@ void MovesensMan::processThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing
goto T0276079;
break;
case k5_SensorFloorPartyOnStairs:
- if ((thingType != kM1_PartyThingType) || (Square(curSquare).getType() != k3_StairsElemType))
+ if ((thingType != kM1_PartyThingType) || (curSquare.getType() != k3_StairsElemType))
goto T0276079;
break;
case k6_SensorFloorGroupGenerator: