[Top][All Lists]
[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 */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/input/axes Makefile.am, 1.3, 1.4 joystick_axis.cxx, 1.2, 1.3,
Ingo Ruhnke <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldmap dot.cxx, 1.6, 1.7 dot.hxx, 1.7, 1.8 drawable.hxx, 1.8, 1.9 path.hxx, 1.4, 1.5 surface_drawable.hxx, 1.5, 1.6 worldmap.cxx, 1.50, 1.51
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/gui buffer_graphic_context.cxx, 1.3, 1.4 buffer_graphic_context.hxx, 1.4, 1.5 display_graphic_context.cxx, 1.8, 1.9 display_graphic_context.hxx, 1.6, 1.7 game_delta_recorder.hxx, 1.2, 1.3 graphic_context.hxx, 1.6, 1.7 gui_manager.hxx, 1.14, 1.15 gui_screen.cxx, 1.2, 1.3 input_debug_screen.cxx, 1.2, 1.3 input_debug_screen.hxx, 1.2, 1.3 root_gui_manager.cxx, 1.9, 1.10 screen.hxx, 1.3, 1.4 screen_manager_impl.hxx, 1.2, 1.3
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldmap dot.cxx, 1.6, 1.7 dot.hxx, 1.7, 1.8 drawable.hxx, 1.8, 1.9 path.hxx, 1.4, 1.5 surface_drawable.hxx, 1.5, 1.6 worldmap.cxx, 1.50, 1.51
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/gui buffer_graphic_context.cxx, 1.3, 1.4 buffer_graphic_context.hxx, 1.4, 1.5 display_graphic_context.cxx, 1.8, 1.9 display_graphic_context.hxx, 1.6, 1.7 game_delta_recorder.hxx, 1.2, 1.3 graphic_context.hxx, 1.6, 1.7 gui_manager.hxx, 1.14, 1.15 gui_screen.cxx, 1.2, 1.3 input_debug_screen.cxx, 1.2, 1.3 input_debug_screen.hxx, 1.2, 1.3 root_gui_manager.cxx, 1.9, 1.10 screen.hxx, 1.3, 1.4 screen_manager_impl.hxx, 1.2, 1.3
- Index(es):