aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1/sword1.cpp
diff options
context:
space:
mode:
authorMax Horn2007-11-28 15:00:41 +0000
committerMax Horn2007-11-28 15:00:41 +0000
commita556368c9942cfb8e43727ac06d73afefad6ccdc (patch)
tree3eee96d0e07d0376d2f032072a9f0f6bc68edad8 /engines/sword1/sword1.cpp
parent81c7b9a78689d5e22fdaf7760b5b9d3ee20b014a (diff)
downloadscummvm-rg350-a556368c9942cfb8e43727ac06d73afefad6ccdc.tar.gz
scummvm-rg350-a556368c9942cfb8e43727ac06d73afefad6ccdc.tar.bz2
scummvm-rg350-a556368c9942cfb8e43727ac06d73afefad6ccdc.zip
Update mouse coordinates onn *all* mouse events, i.e. also after click events
svn-id: r29657
Diffstat (limited to 'engines/sword1/sword1.cpp')
-rw-r--r--engines/sword1/sword1.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 625f484ed5..04328c0571 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -679,7 +679,7 @@ uint8 SwordEngine::mainLoop(void) {
_screen->updateScreen();
delay((1000 / FRAME_RATE) - (_system->getMillis() - frameTime));
- _mouse->engine( _mouseX, _mouseY, _mouseState);
+ _mouse->engine(_mouseCoord.x, _mouseCoord.y, _mouseState);
if (_systemVars.forceRestart)
retCode = CONTROL_RESTART_GAME;
@@ -725,28 +725,23 @@ void SwordEngine::delay(int32 amount) { //copied and mutilated from sky.cpp
_keyPressed = event.kbd;
break;
case Common::EVENT_MOUSEMOVE:
- _mouseX = event.mouse.x;
- _mouseY = event.mouse.y;
+ _mouseCoord = event.mouse;
break;
case Common::EVENT_LBUTTONDOWN:
_mouseState |= BS1L_BUTTON_DOWN;
-#if defined(_WIN32_WCE) || defined(PALMOS_MODE)
- _mouseX = event.mouse.x;
- _mouseY = event.mouse.y;
-#endif
+ _mouseCoord = event.mouse;
break;
case Common::EVENT_RBUTTONDOWN:
_mouseState |= BS1R_BUTTON_DOWN;
-#if defined(_WIN32_WCE) || defined(PALMOS_MODE)
- _mouseX = event.mouse.x;
- _mouseY = event.mouse.y;
-#endif
+ _mouseCoord = event.mouse;
break;
case Common::EVENT_LBUTTONUP:
_mouseState |= BS1L_BUTTON_UP;
+ _mouseCoord = event.mouse;
break;
case Common::EVENT_RBUTTONUP:
_mouseState |= BS1R_BUTTON_UP;
+ _mouseCoord = event.mouse;
break;
case Common::EVENT_QUIT:
_systemVars.engineQuit = true;