aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/cursor.cpp
diff options
context:
space:
mode:
authorDavid Corrales2007-06-23 18:51:33 +0000
committerDavid Corrales2007-06-23 18:51:33 +0000
commitcacd7a28fd51d960947de88abbf30c487e66529d (patch)
treef3baa59853bfb307e452b86b9d93c4737b1fa6ab /engines/agos/cursor.cpp
parent0ac96302fe9c04df79cb01a77d19535b45fe2db0 (diff)
parent90c2210dae8c91fa8babc6b05564e15c9d445d18 (diff)
downloadscummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.tar.gz
scummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.tar.bz2
scummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.zip
Merged the FSNode branch with trunk r27031:27680
svn-id: r27681
Diffstat (limited to 'engines/agos/cursor.cpp')
-rw-r--r--engines/agos/cursor.cpp74
1 files changed, 58 insertions, 16 deletions
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp
index c43e243bf3..35bb8ea216 100644
--- a/engines/agos/cursor.cpp
+++ b/engines/agos/cursor.cpp
@@ -380,7 +380,7 @@ void AGOSEngine_PuzzlePack::handleMouseMoved() {
drawMousePointer();
}
-void AGOSEngine::handleMouseMoved() {
+void AGOSEngine_Simon1::handleMouseMoved() {
uint x;
if (_mouseHideCount) {
@@ -399,13 +399,6 @@ void AGOSEngine::handleMouseMoved() {
resetVerbs();
}
- if (_leftButton == 0) {
- if (_dragMode != 0) {
- _dragEnd = 1;
- }
- _dragCount = 0;
- }
-
if (getGameType() == GType_FF) {
if (getBitFlag(99)) { // Oracle
if (_mouse.x >= 10 && _mouse.x <= 635 && _mouse.y >= 5 && _mouse.y <= 475) {
@@ -449,7 +442,50 @@ void AGOSEngine::handleMouseMoved() {
get_out2:;
_vgaVar9 = 0;
}
- } else if (getGameType() == GType_WW) {
+ }
+
+ if (_mouse != _mouseOld)
+ _needHitAreaRecalc++;
+
+ if (_leftButtonOld == 0 && _leftButtonCount != 0) {
+ boxController(_mouse.x, _mouse.y, 3);
+ }
+ _leftButtonOld = _leftButton;
+
+ x = 0;
+ if (_lastHitArea3 == 0 && _leftButtonDown != 0) {
+ _leftButtonDown = 0;
+ x = 1;
+ } else {
+ if (_litBoxFlag == 0 && _needHitAreaRecalc == 0)
+ goto get_out;
+ }
+
+ boxController(_mouse.x, _mouse.y, x);
+ _lastHitArea3 = _lastHitArea;
+ if (x == 1 && _lastHitArea == NULL)
+ _lastHitArea3 = (HitArea *) -1;
+
+get_out:
+ _mouseOld = _mouse;
+ drawMousePointer();
+
+ _needHitAreaRecalc = 0;
+ _litBoxFlag = 0;
+}
+
+void AGOSEngine::handleMouseMoved() {
+ uint x;
+
+ if (_mouseHideCount) {
+ CursorMan.showMouse(false);
+ return;
+ }
+
+ CursorMan.showMouse(true);
+ _mouse = _eventMan->getMousePos();
+
+ if (getGameType() == GType_WW) {
if (_variableArray[51] != 0 && _mouseCursor != _variableArray[51]) {
_mouseCursor = _variableArray[51];
_needHitAreaRecalc++;
@@ -466,10 +502,20 @@ void AGOSEngine::handleMouseMoved() {
}
}
+ if (_leftClick == true) {
+ _leftClick = false;
+ if (_dragMode != 0) {
+ _dragEnd = 1;
+ } else {
+ _oneClick = true;
+ }
+ _dragCount = 0;
+ }
+
if (_mouse != _mouseOld)
_needHitAreaRecalc++;
- if (_leftButtonOld == 0 && _leftButtonCount != 0) {
+ if (_leftButtonOld == 0 && _leftButton != 0) {
_lastClickRem = 0;
boxController(_mouse.x, _mouse.y, 3);
}
@@ -493,8 +539,8 @@ void AGOSEngine::handleMouseMoved() {
}
x = 0;
- if (_lastHitArea3 == 0 && _leftButtonDown != 0) {
- _leftButtonDown = 0;
+ if (_oneClick == true) {
+ _oneClick = false;
x = 1;
} else {
if (_litBoxFlag == 0 && _needHitAreaRecalc == 0)
@@ -504,11 +550,7 @@ void AGOSEngine::handleMouseMoved() {
boxstuff:
boxController(_mouse.x, _mouse.y, x);
_lastHitArea3 = _lastHitArea;
- if (x == 1 && _lastHitArea == NULL)
- _lastHitArea3 = (HitArea *) -1;
-
get_out:
-
_mouseOld = _mouse;
drawMousePointer();