aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBendegúz Nagy2016-06-23 17:32:55 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commitd40e328e519cafe25cd1f5c668b3dd90c993d865 (patch)
tree23c846eb172a85dce919717613d4c770e884e660 /engines
parent18106aa967a3b0ff9a481c512f4ee91d5fd0eb09 (diff)
downloadscummvm-rg350-d40e328e519cafe25cd1f5c668b3dd90c993d865.tar.gz
scummvm-rg350-d40e328e519cafe25cd1f5c668b3dd90c993d865.tar.bz2
scummvm-rg350-d40e328e519cafe25cd1f5c668b3dd90c993d865.zip
DM: Add F0372_COMMAND_ProcessType80_ClickInDungeonView_TouchFrontWall
Diffstat (limited to 'engines')
-rw-r--r--engines/dm/eventman.cpp19
-rw-r--r--engines/dm/eventman.h1
2 files changed, 18 insertions, 2 deletions
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index fd7f907a0f..50fba849b8 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -30,6 +30,7 @@
#include "eventman.h"
#include "dungeonman.h"
+#include "movesens.h"
@@ -402,8 +403,8 @@ void EventManager::processCommandQueue() {
if ((cmd._type >= kCommandMoveForward) && (cmd._type <= kCommandMoveLeft)) {
commandMoveParty(cmd._type);
return;
- }
-
+ }
+
if (cmd._type == kCommandClickInDungeonView) {
warning("DUMMY CODE, all of this");
DungeonMan &dunMan = *_vm->_dungeonMan;
@@ -495,4 +496,18 @@ 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 += _dirIntoStepCountEast[currMap._partyDir];
+ mapY += _dirIntoStepCountNorth[currMap._partyDir];
+ if ((mapX >= 0)
+ && (mapX < currMap._width)
+ && (mapY >= 0)
+ && (mapY < currMap._height)) {
+ _vm->_stopWaitingForPlayerInput = _vm->_movsens->sensorIsTriggeredByClickOnWall(mapX, mapY, returnOppositeDir(currMap._partyDir));
+ }
+}
}; // end of namespace DM
diff --git a/engines/dm/eventman.h b/engines/dm/eventman.h
index bbf0b66164..e0e78f9465 100644
--- a/engines/dm/eventman.h
+++ b/engines/dm/eventman.h
@@ -244,6 +244,7 @@ public:
void processCommandQueue(); // @ F0380_COMMAND_ProcessQueue_CPSC
void commandSetLeader(ChampionIndex index); // @ F0368_COMMAND_SetLeader
+ void commandProcessType80ClickInDungeonViewTouchFrontWall(); // @ F0372_COMMAND_ProcessType80_ClickInDungeonView_TouchFrontWall
};
}