[Scummvm-cvs-logs] SF.net SVN: scummvm:[44633] scummvm/trunk/engines/draci

spalek at users.sourceforge.net spalek at users.sourceforge.net
Sun Oct 4 22:08:17 CEST 2009


Revision: 44633
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44633&view=rev
Author:   spalek
Date:     2009-10-04 20:08:11 +0000 (Sun, 04 Oct 2009)

Log Message:
-----------
Removed Ctrl-Left Click treating as a Right Click

Modified Paths:
--------------
    scummvm/trunk/engines/draci/draci.cpp
    scummvm/trunk/engines/draci/mouse.cpp
    scummvm/trunk/engines/draci/mouse.h

Modified: scummvm/trunk/engines/draci/draci.cpp
===================================================================
--- scummvm/trunk/engines/draci/draci.cpp	2009-10-04 20:01:21 UTC (rev 44632)
+++ scummvm/trunk/engines/draci/draci.cpp	2009-10-04 20:08:11 UTC (rev 44633)
@@ -235,32 +235,10 @@
 					_game->inventoryInit();
 				}
 				break;
-			case Common::KEYCODE_LCTRL:
-				debugC(6, kDraciGeneralDebugLevel, "Left Ctrl down");
-				_mouse->downModifier(0);
-				break;
-			case Common::KEYCODE_RCTRL:
-				debugC(6, kDraciGeneralDebugLevel, "Right Ctrl down");
-				_mouse->downModifier(1);
-				break;
 			default:
 				break;
 			}
 			break;
-		case Common::EVENT_KEYUP:
-			switch (event.kbd.keycode) {
-			case Common::KEYCODE_LCTRL:
-				debugC(6, kDraciGeneralDebugLevel, "Left Ctrl up");
-				_mouse->upModifier(0);
-				break;
-			case Common::KEYCODE_RCTRL:
-				debugC(6, kDraciGeneralDebugLevel, "Right Ctrl up");
-				_mouse->upModifier(1);
-				break;
-			default:
-				break;
-			}
-			break;
 		default:
 			_mouse->handleEvent(event);
 		}

Modified: scummvm/trunk/engines/draci/mouse.cpp
===================================================================
--- scummvm/trunk/engines/draci/mouse.cpp	2009-10-04 20:01:21 UTC (rev 44632)
+++ scummvm/trunk/engines/draci/mouse.cpp	2009-10-04 20:08:11 UTC (rev 44633)
@@ -34,7 +34,6 @@
 	_y = 0;
 	_lButton = false;
 	_rButton = false;
-	_modifierState = 0;
 	_cursorType = kNormalCursor;
 	_vm = vm;
 }
@@ -42,14 +41,8 @@
 void Mouse::handleEvent(Common::Event event) {
 	switch (event.type) {
 	case Common::EVENT_LBUTTONDOWN:
-		// TODO: remove _modifierState, since right click can be achieved via Cmd
-		if (!(_modifierState & 3)) {
-			debugC(6, kDraciGeneralDebugLevel, "Left button down (x: %u y: %u)", _x, _y);
-			_lButton = true;
-		} else {	// any Ctrl pressed
-			debugC(6, kDraciGeneralDebugLevel, "Ctrl-Left button down (x: %u y: %u)", _x, _y);
-			_rButton = true;
-		}
+		debugC(6, kDraciGeneralDebugLevel, "Left button down (x: %u y: %u)", _x, _y);
+		_lButton = true;
 		break;
 
 	case Common::EVENT_LBUTTONUP:

Modified: scummvm/trunk/engines/draci/mouse.h
===================================================================
--- scummvm/trunk/engines/draci/mouse.h	2009-10-04 20:01:21 UTC (rev 44632)
+++ scummvm/trunk/engines/draci/mouse.h	2009-10-04 20:08:11 UTC (rev 44633)
@@ -62,17 +62,12 @@
 	void lButtonSet(bool state) { _lButton = state; }
 	void rButtonSet(bool state) { _rButton = state; }
 
-	// Updates the current state of modifiers.  The indexes are: 0=left Ctrl, 1=right Ctrl.
-	void downModifier(int index) { _modifierState |= 1 << index; }
-	void upModifier(int index) { _modifierState &= ~(1 << index); }
-
 	uint16 getPosX() const { return _x; }
 	uint16 getPosY() const { return _y; }
 
 private:
 	uint16 _x, _y;
 	bool _lButton, _rButton;
-	int _modifierState;
 	CursorType _cursorType;
 	DraciEngine *_vm;
 };


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list