[Scummvm-cvs-logs] SF.net SVN: scummvm:[44764] scummvm/trunk/engines/sci/engine/kevent.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Oct 8 00:45:50 CEST 2009


Revision: 44764
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44764&view=rev
Author:   fingolfin
Date:     2009-10-07 22:45:50 +0000 (Wed, 07 Oct 2009)

Log Message:
-----------
SCI: Fix warning, cleanup

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kevent.cpp

Modified: scummvm/trunk/engines/sci/engine/kevent.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kevent.cpp	2009-10-07 22:44:44 UTC (rev 44763)
+++ scummvm/trunk/engines/sci/engine/kevent.cpp	2009-10-07 22:45:50 UTC (rev 44764)
@@ -44,7 +44,7 @@
 	int oldx, oldy;
 	int modifier_mask = getSciVersion() <= SCI_VERSION_01 ? SCI_EVM_ALL : SCI_EVM_NO_FOOLOCK;
 	SegManager *segMan = s->_segMan;
-	Common::Point mousePos = s->_cursor->getPosition();
+	const Common::Point mousePos = s->_cursor->getPosition();
 
 	// If there's a simkey pending, and the game wants a keyboard event, use the
 	// simkey instead of a normal event
@@ -94,9 +94,7 @@
 		break;
 
 	case SCI_EVT_MOUSE_RELEASE:
-	case SCI_EVT_MOUSE_PRESS: {
-		int extra_bits = 0;
-		Common::Point mousePos = s->_cursor->getPosition();
+	case SCI_EVT_MOUSE_PRESS:
 
 		// track left buttton clicks, if requested
 		if (e.type == SCI_EVT_MOUSE_PRESS && e.data == 1 && g_debug_track_mouse_clicks) {
@@ -105,6 +103,8 @@
 		}
 
 		if (mask & e.type) {
+			int extra_bits = 0;
+
 			switch (e.data) {
 			case 2:
 				extra_bits = SCI_EVM_LSHIFT | SCI_EVM_RSHIFT;
@@ -121,7 +121,6 @@
 			s->r_acc = make_reg(0, 1);
 		}
 		break;
-	}
 
 	default:
 		s->r_acc = NULL_REG; // Unknown or no event


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