pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/input/axes Makefile.am, 1.3, 1.4 joys


From: Ingo Ruhnke
Subject: [Pingus-CVS] CVS: Games/Pingus/src/input/axes Makefile.am, 1.3, 1.4 joystick_axis.cxx, 1.2, 1.3
Date: Sun, 19 Oct 2003 14:25:49 +0200

Update of /var/lib/cvs/Games/Pingus/src/input/axes
In directory dark:/tmp/cvs-serv19578/input/axes

Modified Files:
        Makefile.am joystick_axis.cxx 
Log Message:
- some more stuff, still not much useable

Index: Makefile.am
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/axes/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile.am 16 Jun 2003 20:58:11 -0000      1.3
+++ Makefile.am 19 Oct 2003 12:25:47 -0000      1.4
@@ -17,6 +17,7 @@
 
 noinst_LIBRARIES = libpingus_input_axes.a
 
+libpingus_input_axes_CPPFLAGS = @PINGUS_CFLAGS@
 libpingus_input_axes_a_SOURCES =       \
         button_axis.hxx button_axis.cxx \
        dummy_axis.hxx \

Index: joystick_axis.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/axes/joystick_axis.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- joystick_axis.cxx   19 Apr 2003 10:23:19 -0000      1.2
+++ joystick_axis.cxx   19 Oct 2003 12:25:47 -0000      1.3
@@ -17,49 +17,48 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-#include <ClanLib/Display/Input/input.h>
-#include <ClanLib/Display/Input/inputdevice.h>
-#include <ClanLib/Display/Input/inputaxis.h>
+#include <ClanLib/Display/input.h>
+#include <ClanLib/Display/inputdevice.h>
+#include <ClanLib/Display/inputaxis.h>
 #include "joystick_axis.hxx"
 #include "../../pingus_error.hxx"
 
 namespace Input {
+namespace Axes {
 
-  namespace Axes {
-
-    JoystickAxis::JoystickAxis(int id_, int axis_, float angle_) : id(id_), 
axis(axis_), pos(0), angle(angle_)
-    {
-      if (static_cast<unsigned int> (id) >= CL_Input::joysticks.size())
-        PingusError::raise("JoystickAxis: Invalid joystick id");
+JoystickAxis::JoystickAxis(int id_, int axis_, float angle_) : id(id_), 
axis(axis_), pos(0), angle(angle_)
+{
+  if (static_cast<unsigned int> (id) >= CL_Input::joysticks.size())
+    PingusError::raise("JoystickAxis: Invalid joystick id");
 
-      if (axis > CL_Input::joysticks[id]->get_num_axes())
-        PingusError::raise("JoystickAxis: Invalid joystick axis id");
+  if (axis > CL_Input::joysticks[id]->get_num_axes())
+    PingusError::raise("JoystickAxis: Invalid joystick axis id");
 
-      if (angle < 0)
-        angle = (static_cast<int>(angle) % 360) + 360;
-      else if (angle > 360)
-        angle = static_cast<int>(angle) % 360;
-    }
+  if (angle < 0)
+    angle = (static_cast<int>(angle) % 360) + 360;
+  else if (angle > 360)
+    angle = static_cast<int>(angle) % 360;
+}
 
-    const float&
-    JoystickAxis::get_pos () const
-    {
-      return pos;
-    }
+const float&
+JoystickAxis::get_pos () const
+{
+  return pos;
+}
 
-    const float&
-    JoystickAxis::get_angle () const
-    {
-      return angle;
-    }
+const float&
+JoystickAxis::get_angle () const
+{
+  return angle;
+}
 
-    void
-    JoystickAxis::update (float)
-    {
-      pos = CL_Input::joysticks[id]->get_axis(axis)->get_pos();
-    }
+void
+JoystickAxis::update (float)
+{
+  pos = CL_Input::joysticks[id]->get_axis(axis)->get_pos();
+}
 
-  }
+}
 }
 
 /* EOF */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]