aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2007-03-18 18:45:36 +0000
committerMax Horn2007-03-18 18:45:36 +0000
commit94739cdbca5d0fe6b600ec014df7f8a71b94a5f4 (patch)
tree12396372585a9934e327251abbf36385b0bd83af
parentf1497d5aa981526fd804ae637989a219548185a5 (diff)
downloadscummvm-rg350-94739cdbca5d0fe6b600ec014df7f8a71b94a5f4.tar.gz
scummvm-rg350-94739cdbca5d0fe6b600ec014df7f8a71b94a5f4.tar.bz2
scummvm-rg350-94739cdbca5d0fe6b600ec014df7f8a71b94a5f4.zip
SAGA: Make use of EventManager::getMousePos
svn-id: r26223
-rw-r--r--engines/saga/input.cpp16
-rw-r--r--engines/saga/saga.h5
2 files changed, 8 insertions, 13 deletions
diff --git a/engines/saga/input.cpp b/engines/saga/input.cpp
index bfe445ced1..3f9495ce8c 100644
--- a/engines/saga/input.cpp
+++ b/engines/saga/input.cpp
@@ -40,8 +40,6 @@ namespace Saga {
int SagaEngine::processInput() {
Common::Event event;
-// Point imousePt;
-
Common::EventManager *eventMan = _system->getEventManager();
while (eventMan->pollEvent(event)) {
switch (event.type) {
@@ -129,22 +127,19 @@ int SagaEngine::processInput() {
break;
case Common::EVENT_LBUTTONDOWN:
_leftMouseButtonPressed = true;
- _mousePos = event.mouse;
- _interface->update(_mousePos, UPDATE_LEFTBUTTONCLICK);
+ _interface->update(event.mouse, UPDATE_LEFTBUTTONCLICK);
break;
case Common::EVENT_RBUTTONDOWN:
_rightMouseButtonPressed = true;
- _mousePos = event.mouse;
- _interface->update(_mousePos, UPDATE_RIGHTBUTTONCLICK);
+ _interface->update(event.mouse, UPDATE_RIGHTBUTTONCLICK);
break;
case Common::EVENT_WHEELUP:
- _interface->update(_mousePos, UPDATE_WHEELUP);
+ _interface->update(event.mouse, UPDATE_WHEELUP);
break;
case Common::EVENT_WHEELDOWN:
- _interface->update(_mousePos, UPDATE_WHEELDOWN);
+ _interface->update(event.mouse, UPDATE_WHEELDOWN);
break;
case Common::EVENT_MOUSEMOVE:
- _mousePos = event.mouse;
break;
case Common::EVENT_QUIT:
shutDown();
@@ -157,6 +152,9 @@ int SagaEngine::processInput() {
return SUCCESS;
}
+Point SagaEngine::mousePos() const {
+ return _system->getEventManager()->getMousePos();
+}
} // End of namespace Saga
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 42ec768580..832d5292bc 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -331,9 +331,7 @@ public:
const char *getObjectName(uint16 objectId);
public:
int processInput(void);
- const Point &mousePos() const {
- return _mousePos;
- }
+ Point mousePos() const;
const bool leftMouseButtonPressed() const {
return _leftMouseButtonPressed;
@@ -354,7 +352,6 @@ public:
bool _saveMarks[MAX_SAVES];
SaveGameHeader _saveHeader;
- Point _mousePos;
bool _leftMouseButtonPressed;
bool _rightMouseButtonPressed;