r9520 - in packages/trunk/qonk/debian: . patches

Barry deFreese bdefreese at alioth.debian.org
Fri Apr 10 17:21:37 UTC 2009


Author: bdefreese
Date: 2009-04-10 17:21:37 +0000 (Fri, 10 Apr 2009)
New Revision: 9520

Added:
   packages/trunk/qonk/debian/patches/50_absolute_mouse.diff
Modified:
   packages/trunk/qonk/debian/changelog
   packages/trunk/qonk/debian/patches/series
Log:
  * 50_absolute_mouse.diff - Use absolute mouse positioning. (Closes: #480170).
    + Thanks to Christian Pulvermacher for the patch!.


Modified: packages/trunk/qonk/debian/changelog
===================================================================
--- packages/trunk/qonk/debian/changelog	2009-04-10 15:01:23 UTC (rev 9519)
+++ packages/trunk/qonk/debian/changelog	2009-04-10 17:21:37 UTC (rev 9520)
@@ -1,3 +1,11 @@
+qonk (0.3.1-3) unstable; urgency=low
+
+  [ Barry deFreese ]
+  * 50_absolute_mouse.diff - Use absolute mouse positioning. (Closes: #480170).
+    + Thanks to Christian Pulvermacher for the patch!.
+
+ -- Barry deFreese <bdefreese at debian.org>  Fri, 10 Apr 2009 13:03:25 -0400
+
 qonk (0.3.1-2) unstable; urgency=low
 
   [ Eddy Petrișor ]

Added: packages/trunk/qonk/debian/patches/50_absolute_mouse.diff
===================================================================
--- packages/trunk/qonk/debian/patches/50_absolute_mouse.diff	                        (rev 0)
+++ packages/trunk/qonk/debian/patches/50_absolute_mouse.diff	2009-04-10 17:21:37 UTC (rev 9520)
@@ -0,0 +1,140 @@
+Index: qonk-0.3.1/src/game.cpp
+===================================================================
+--- qonk-0.3.1.orig/src/game.cpp	2009-04-10 13:00:28.000000000 -0400
++++ qonk-0.3.1/src/game.cpp	2009-04-10 13:02:20.000000000 -0400
+@@ -178,6 +178,14 @@
+       if (value)
+         setFleetStrength(1);
+       break;
++    case GA_MOVE_CURSOR_H:
++      if(value)
++        x = value;
++      break;
++    case GA_MOVE_CURSOR_V:
++      if(value)
++        y = value;
++      break;
+     case GA_CURSOR_UP:
+         yn = value;
+         break;
+Index: qonk-0.3.1/src/input.h
+===================================================================
+--- qonk-0.3.1.orig/src/input.h	2009-04-10 13:01:05.000000000 -0400
++++ qonk-0.3.1/src/input.h	2009-04-10 13:02:20.000000000 -0400
+@@ -53,6 +53,9 @@
+ 
+         GA_SELECTION,
+ 
++	GA_MOVE_CURSOR_H,
++	GA_MOVE_CURSOR_V,
++
+         GA_CURSOR_UP,
+         GA_CURSOR_DOWN,
+         GA_CURSOR_LEFT,
+Index: qonk-0.3.1/src/sdl_driver.cpp
+===================================================================
+--- qonk-0.3.1.orig/src/sdl_driver.cpp	2009-04-10 13:01:22.000000000 -0400
++++ qonk-0.3.1/src/sdl_driver.cpp	2009-04-10 13:02:20.000000000 -0400
+@@ -217,23 +217,23 @@
+             
+             if (ev.motion.xrel <= -DEADZONE_MOUSE)
+             {
+-                input(IT_MOUSEMOTION, 0, AD_NEGATIVE, 0, -ev.motion.xrel);
++                input(IT_MOUSEMOTION, 0, 0, 0, ev.motion.x);
+                 mouseXNeg = MOVED;
+             }
+             else if(ev.motion.xrel >= DEADZONE_MOUSE)
+             {                
+-                input(IT_MOUSEMOTION, 0, AD_POSITIVE, 0, ev.motion.xrel);
++                input(IT_MOUSEMOTION, 0, 0, 0, ev.motion.x);
+                 mouseXPos = MOVED;
+             }
+ 
+             if (ev.motion.yrel <= -DEADZONE_MOUSE)
+             {
+-                input(IT_MOUSEMOTION, 1, AD_NEGATIVE, 0, -ev.motion.yrel);
++                input(IT_MOUSEMOTION, 1, 0, 0, ev.motion.y);
+                 mouseYNeg = MOVED;
+             }
+             else if(ev.motion.yrel >= DEADZONE_MOUSE)
+             {                
+-                input(IT_MOUSEMOTION, 1, AD_POSITIVE, 0, ev.motion.yrel);
++                input(IT_MOUSEMOTION, 1, 0, 0, ev.motion.y);
+                 mouseYPos = MOVED;
+             }
+ 
+@@ -263,7 +263,7 @@
+     // like a key or joystick axis where releases and non-movement can be detected.
+     if (mouseXNeg == RESET_NEEDED)
+     {
+-      input(IT_MOUSEMOTION, 0, AD_NEGATIVE, 0, 0);
++      input(IT_MOUSEMOTION, 0, 0, 0, 0);
+       mouseXNeg = INITIAL;
+     }
+     else if (mouseXNeg == MOVED)
+@@ -271,7 +271,7 @@
+ 
+     if (mouseXPos == RESET_NEEDED)
+     {
+-      input(IT_MOUSEMOTION, 0, AD_POSITIVE, 0, 0);
++      input(IT_MOUSEMOTION, 0, 0, 0, 0);
+       mouseXPos = INITIAL;
+     }
+     else if (mouseXPos == MOVED)
+@@ -279,7 +279,7 @@
+ 
+     if (mouseYNeg == RESET_NEEDED)
+     {
+-      input(IT_MOUSEMOTION, 1, AD_NEGATIVE, 0, 0);
++      input(IT_MOUSEMOTION, 1, 0, 0, 0);
+       mouseYNeg = INITIAL;
+     }
+     else if (mouseYNeg == MOVED)
+@@ -287,7 +287,7 @@
+ 
+     if (mouseYPos == RESET_NEEDED)
+     {
+-      input(IT_MOUSEMOTION, 1, AD_POSITIVE, 0, 0);
++      input(IT_MOUSEMOTION, 1, 0, 0, 0);
+       mouseYPos = INITIAL;
+     }
+     else if (mouseYPos == MOVED)
+Index: qonk-0.3.1/src/settings.cpp
+===================================================================
+--- qonk-0.3.1.orig/src/settings.cpp	2009-04-10 13:01:42.000000000 -0400
++++ qonk-0.3.1/src/settings.cpp	2009-04-10 13:02:20.000000000 -0400
+@@ -66,6 +66,8 @@
+   // Those are fixed and not supposed to be changed via a config file.
+   set(GA_TOGGLE_GRAB, IT_KEYBOARD, SDLK_g, 0, 0);
+   set(GA_LEAVE, IT_KEYBOARD, SDLK_ESCAPE, 0, 0);
++  set(GA_MOVE_CURSOR_H, IT_MOUSEMOTION, 0, 0 , 0);
++  set(GA_MOVE_CURSOR_V, IT_MOUSEMOTION, 1, 0 , 0);
+ 
+   const lisp::Lisp* root = 0;
+ 
+@@ -308,6 +310,8 @@
+         subReader->get("axis", id0);
+         subReader->get("direction", id1);
+         id2 = 0;
++	if(id0 == 0 || id0 == 1)
++		id0 = -1; //ignore old bindings for mouse movement
+     }
+     else if (inputTypeName == "mousebutton")
+     {
+@@ -489,16 +493,12 @@
+   set(GA_MOVE_TO_NEAREST_PLANET, IT_MOUSEBUTTON, SDL_BUTTON_RIGHT, 0, 0);
+   set(GA_MOVE_TO_NEAREST_PLANET, IT_KEYBOARD, SDLK_LCTRL, 0, 0);
+ 
+-  set(GA_CURSOR_LEFT, IT_MOUSEMOTION, 0, AD_NEGATIVE, 0);
+   set(GA_CURSOR_LEFT, IT_KEYBOARD, SDLK_LEFT, 0, 0);
+ 
+-  set(GA_CURSOR_RIGHT, IT_MOUSEMOTION, 0, AD_POSITIVE, 0);
+   set(GA_CURSOR_RIGHT, IT_KEYBOARD, SDLK_RIGHT, 0, 0);
+ 
+-  set(GA_CURSOR_UP, IT_MOUSEMOTION, 1, AD_NEGATIVE, 0);
+   set(GA_CURSOR_UP, IT_KEYBOARD, SDLK_UP, 0, 0);
+ 
+-  set(GA_CURSOR_DOWN, IT_MOUSEMOTION, 1, AD_POSITIVE, 0);
+   set(GA_CURSOR_DOWN, IT_KEYBOARD, SDLK_DOWN, 0, 0);
+ 
+ /* preliminary: cursor control with joystick - works good

Modified: packages/trunk/qonk/debian/patches/series
===================================================================
--- packages/trunk/qonk/debian/patches/series	2009-04-10 15:01:23 UTC (rev 9519)
+++ packages/trunk/qonk/debian/patches/series	2009-04-10 17:21:37 UTC (rev 9520)
@@ -2,3 +2,4 @@
 20_gcc_4.3.diff
 30_gcc_4.4.diff
 40_player_colors.diff
+50_absolute_mouse.diff




More information about the Pkg-games-commits mailing list