aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/input.cpp
diff options
context:
space:
mode:
authorNipun Garg2019-06-28 23:36:43 +0530
committerEugene Sandulenko2019-09-03 17:17:04 +0200
commitf41e1999fb6397a8feeb7c105a40d77072ce1123 (patch)
treefa20a263034536409088687ee54c501634c4a30e /engines/hdb/input.cpp
parent037400ed1bae31704ea7421420ed0686a9af180d (diff)
downloadscummvm-rg350-f41e1999fb6397a8feeb7c105a40d77072ce1123.tar.gz
scummvm-rg350-f41e1999fb6397a8feeb7c105a40d77072ce1123.tar.bz2
scummvm-rg350-f41e1999fb6397a8feeb7c105a40d77072ce1123.zip
HDB: Add updateMouse() and call it in game loop
Diffstat (limited to 'engines/hdb/input.cpp')
-rw-r--r--engines/hdb/input.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/hdb/input.cpp b/engines/hdb/input.cpp
index c421b12a25..41dbc9d8cb 100644
--- a/engines/hdb/input.cpp
+++ b/engines/hdb/input.cpp
@@ -152,4 +152,28 @@ void Input::stylusMove(int x, int y) {
}
}
+void Input::updateMouse(int newX, int newY) {
+ _lastMouseX = _mouseX;
+ _lastMouseY = _mouseY;
+ _mouseX = newX;
+ _mouseY = newY;
+
+ if (_mouseX < 0)
+ _mouseX = 0;
+ else if (_mouseX >= kScreenWidth)
+ _mouseX = kScreenWidth - 1;
+
+ if (_mouseY < 0)
+ _mouseY = 0;
+ else if (_mouseY >= kScreenHeight)
+ _mouseY = kScreenHeight - 1;
+
+ // Turn Cursor back on?
+ if ((_lastMouseX != _mouseX || _lastMouseY != _mouseY) && !g_hdb->_drawMan->getPointer()) {
+ g_hdb->_drawMan->showPointer(true);
+ }
+
+ warning("STUB: updateMouse: Update Mouse buttons");
+}
+
} // End of Namespace