aboutsummaryrefslogtreecommitdiff
path: root/engines/dm
diff options
context:
space:
mode:
authorStrangerke2016-06-27 20:29:22 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit7ecd3333d7821aa69fa3df4ebbffb33228f43171 (patch)
tree7ad2311b9de5c565de46ff52ce336be7725a339a /engines/dm
parent398b309a0373c647ad9cd9c553ad626784d2b459 (diff)
downloadscummvm-rg350-7ecd3333d7821aa69fa3df4ebbffb33228f43171.tar.gz
scummvm-rg350-7ecd3333d7821aa69fa3df4ebbffb33228f43171.tar.bz2
scummvm-rg350-7ecd3333d7821aa69fa3df4ebbffb33228f43171.zip
DM: Fix and simplify commandProcessType80ClickInDungeonViewTouchFrontWall()
Diffstat (limited to 'engines/dm')
-rw-r--r--engines/dm/eventman.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index 4e5a59cb91..6d39a12ef8 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -508,14 +508,9 @@ void EventManager::commandSetLeader(ChampionIndex champIndex) {
void EventManager::commandProcessType80ClickInDungeonViewTouchFrontWall() {
DungeonMan &dunMan = *_vm->_dungeonMan;
CurrMapData &currMap = dunMan._currMap;
- uint16 mapX = currMap._partyPosX;
- uint16 mapY = currMap._partyPosY;
- mapX += gDirIntoStepCountEast[currMap._partyDir];
- mapY += gDirIntoStepCountNorth[currMap._partyDir];
- if ((mapX >= 0)
- && (mapX < currMap._width)
- && (mapY >= 0)
- && (mapY < currMap._height)) {
+ int16 mapX = currMap._partyPosX + gDirIntoStepCountEast[currMap._partyDir];
+ int16 mapY = currMap._partyPosY + gDirIntoStepCountNorth[currMap._partyDir];
+ if ((mapX >= 0) && (mapX < currMap._width) && (mapY >= 0) && (mapY < currMap._height)) {
_vm->_stopWaitingForPlayerInput = _vm->_movsens->sensorIsTriggeredByClickOnWall(mapX, mapY, returnOppositeDir(currMap._partyDir));
}
}
@@ -528,7 +523,6 @@ void EventManager::commandProcessType80ClickInDungeonView(int16 posX, int16 posY
int16 mapX;
int16 mapY;
-
if (dunMan._squareAheadElement == kElementTypeDoorFront) {
if (champMan._leaderIndex == kChampionNone) {
return;