aboutsummaryrefslogtreecommitdiff
path: root/engines/queen/command.cpp
diff options
context:
space:
mode:
authorMax Horn2007-03-18 18:55:11 +0000
committerMax Horn2007-03-18 18:55:11 +0000
commitb44d93d068e3309dd5c994c64fd06c4d25aa24f1 (patch)
tree5f8886d036ecc75652df28cc38605d5525df04d7 /engines/queen/command.cpp
parent94739cdbca5d0fe6b600ec014df7f8a71b94a5f4 (diff)
downloadscummvm-rg350-b44d93d068e3309dd5c994c64fd06c4d25aa24f1.tar.gz
scummvm-rg350-b44d93d068e3309dd5c994c64fd06c4d25aa24f1.tar.bz2
scummvm-rg350-b44d93d068e3309dd5c994c64fd06c4d25aa24f1.zip
QUEEN: Make use of EventManager::getMousePos
svn-id: r26224
Diffstat (limited to 'engines/queen/command.cpp')
-rw-r--r--engines/queen/command.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/engines/queen/command.cpp b/engines/queen/command.cpp
index 42e8634270..9a4896c68b 100644
--- a/engines/queen/command.cpp
+++ b/engines/queen/command.cpp
@@ -21,6 +21,8 @@
*/
#include "common/stdafx.h"
+#include "common/events.h"
+#include "common/system.h"
#include "queen/command.h"
#include "queen/display.h"
@@ -269,10 +271,9 @@ void Command::executeCurrentAction() {
void Command::updatePlayer() {
if (_vm->logic()->joeWalk() != JWM_MOVE) {
- int16 cx = _vm->input()->mousePosX();
- int16 cy = _vm->input()->mousePosY();
- lookForCurrentObject(cx, cy);
- lookForCurrentIcon(cx, cy);
+ Common::Point mouse = g_system->getEventManager()->getMousePos();
+ lookForCurrentObject(mouse.x, mouse.y);
+ lookForCurrentIcon(mouse.x, mouse.y);
}
if (_vm->input()->keyVerb() != VERB_NONE) {
@@ -530,8 +531,9 @@ int16 Command::makeJoeWalkTo(int16 x, int16 y, int16 objNum, Verb v, bool mustWa
}
void Command::grabCurrentSelection() {
- _selPosX = _vm->input()->mousePosX();
- _selPosY = _vm->input()->mousePosY();
+ Common::Point mouse = g_system->getEventManager()->getMousePos();
+ _selPosX = mouse.x;
+ _selPosY = mouse.y;
uint16 zone = _vm->grid()->findObjectUnderCursor(_selPosX, _selPosY);
_state.noun = _vm->grid()->findObjectNumber(zone);