[Scummvm-git-logs] scummvm master -> a53cc4bc96445ae8b59cd71a96a482a5ddff21ce
neuromancer
noreply at scummvm.org
Sun Jun 4 14:48:43 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a53cc4bc96 FREESCAPE: enable on screen controls in driller for all the scummvm platforms
Commit: a53cc4bc96445ae8b59cd71a96a482a5ddff21ce
https://github.com/scummvm/scummvm/commit/a53cc4bc96445ae8b59cd71a96a482a5ddff21ce
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-06-04T16:50:38+02:00
Commit Message:
FREESCAPE: enable on screen controls in driller for all the scummvm platforms
Changed paths:
engines/freescape/freescape.cpp
diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index ba2c019525c..d030cf33de7 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -466,37 +466,9 @@ void FreescapeEngine::processInput() {
g_system->warpMouse(mousePos.x, mousePos.y);
if (_shootMode) {
- {
- bool shouldWarp = false;
- Common::Point resolution = _gfx->nativeResolution();
- _crossairPosition.x = _screenW * mousePos.x / resolution.x;
- _crossairPosition.y = _screenH * mousePos.y / resolution.y;
-
- if (_crossairPosition.x < _viewArea.left) {
- _crossairPosition.x = _viewArea.left + 1;
- shouldWarp = true;
- }
-
- if (_crossairPosition.x > _viewArea.right) {
- _crossairPosition.x = _viewArea.right - 1;
- shouldWarp = true;
- }
- if (_crossairPosition.y < _viewArea.top) {
- _crossairPosition.y = _viewArea.top + 1;
- shouldWarp = true;
- }
-
- if (_crossairPosition.y > _viewArea.bottom) {
- _crossairPosition.y = _viewArea.bottom - 1;
- shouldWarp = true;
- }
-
- if (shouldWarp) {
- g_system->warpMouse(_crossairPosition.x, _crossairPosition.y);
- g_system->getEventManager()->purgeMouseEvents();
- g_system->getEventManager()->purgeKeyboardEvents();
- }
- }
+ Common::Point resolution = _gfx->nativeResolution();
+ _crossairPosition.x = _screenW * mousePos.x / resolution.x;
+ _crossairPosition.y = _screenH * mousePos.y / resolution.y;
break;
}
@@ -510,12 +482,10 @@ void FreescapeEngine::processInput() {
{
bool touchedScreenControls = false;
- #if defined(__ANDROID__) || defined(IPHONE)
Common::Point resolution = _gfx->nativeResolution();
mousePos.x = _screenW * mousePos.x / resolution.x;
mousePos.y = _screenH * mousePos.y / resolution.y;
touchedScreenControls = onScreenControls(mousePos);
- #endif
if (!touchedScreenControls && _viewArea.contains(_crossairPosition))
shoot();
More information about the Scummvm-git-logs
mailing list