From b44d93d068e3309dd5c994c64fd06c4d25aa24f1 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 18 Mar 2007 18:55:11 +0000 Subject: QUEEN: Make use of EventManager::getMousePos svn-id: r26224 --- engines/queen/command.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'engines/queen/command.cpp') 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); -- cgit v1.2.3