[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/input axis_pointer.cxx,1.1,1.2 axis_p
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/input axis_pointer.cxx,1.1,1.2 axis_pointer.hxx,1.1,1.2 button_axis.cxx,1.2,1.3 joystick_axis.cxx,1.2,1.3 mouse_pointer.cxx,1.1,1.2 mouse_pointer.hxx,1.1,1.2 pointer.hxx,1.3,1.4 |
Date: |
5 Jul 2002 11:02:49 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/input
In directory dark:/tmp/cvs-serv10268
Modified Files:
axis_pointer.cxx axis_pointer.hxx button_axis.cxx
joystick_axis.cxx mouse_pointer.cxx mouse_pointer.hxx
pointer.hxx
Log Message:
Interface updates / bugfixes
Index: axis_pointer.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/axis_pointer.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- axis_pointer.cxx 4 Jul 2002 15:14:42 -0000 1.1
+++ axis_pointer.cxx 5 Jul 2002 11:02:47 -0000 1.2
@@ -48,6 +48,13 @@
}
void
+ AxisPointer::set_pos(float new_x, float new_y)
+ {
+ x_pos = new_x;
+ y_pos = new_y;
+ }
+
+ void
AxisPointer::update(float delta)
{
CL_Vector pos_delta;
Index: axis_pointer.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/axis_pointer.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- axis_pointer.hxx 4 Jul 2002 15:14:42 -0000 1.1
+++ axis_pointer.hxx 5 Jul 2002 11:02:47 -0000 1.2
@@ -42,6 +42,9 @@
virtual float get_x_pos ();
virtual float get_y_pos ();
+
+ virtual void set_pos(float new_x, float new_y);
+
virtual void update (float);
};
}
Index: button_axis.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/button_axis.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- button_axis.cxx 5 Jul 2002 10:06:35 -0000 1.2
+++ button_axis.cxx 5 Jul 2002 11:02:47 -0000 1.3
@@ -26,9 +26,9 @@
angle(angle_), button1(button1_), button2(button2_)
{
if (angle < 0)
- angle = (angle % 360) + 360;
+ angle = (static_cast<int>(angle) % 360) + 360;
else if (angle > 360)
- angle = angle % 360;
+ angle = static_cast<int>(angle) % 360;
}
float
Index: joystick_axis.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/joystick_axis.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- joystick_axis.cxx 5 Jul 2002 10:06:35 -0000 1.2
+++ joystick_axis.cxx 5 Jul 2002 11:02:47 -0000 1.3
@@ -27,9 +27,9 @@
JoystickAxis::JoystickAxis(int id_, int axis_, float angle_) : id(id_),
axis(axis_), angle(angle_)
{
if (angle < 0)
- angle = (angle % 360) + 360;
+ angle = (static_cast<int>(angle) % 360) + 360;
else if (angle > 360)
- angle = angle % 360;
+ angle = static_cast<int>(angle) % 360;
}
float
Index: mouse_pointer.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/mouse_pointer.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mouse_pointer.cxx 4 Jul 2002 15:51:29 -0000 1.1
+++ mouse_pointer.cxx 5 Jul 2002 11:02:47 -0000 1.2
@@ -31,13 +31,19 @@
float
MousePointer::get_x_pos ()
{
- return CL_Input::pointers[0]->get_cursor(1)->get_x();
+ return CL_Input::pointers[0]->get_cursor(0)->get_x();
}
float
MousePointer::get_y_pos ()
{
- return CL_Input::pointers[0]->get_cursor(1)->get_y();
+ return CL_Input::pointers[0]->get_cursor(0)->get_y();
+ }
+
+ void
+ MousePointer::set_pos (float new_x, float new_y)
+ {
+ CL_Input::pointers[0]->get_cursor(0)->set_position(new_x, new_y);
}
void
Index: mouse_pointer.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/mouse_pointer.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mouse_pointer.hxx 4 Jul 2002 15:51:29 -0000 1.1
+++ mouse_pointer.hxx 5 Jul 2002 11:02:47 -0000 1.2
@@ -36,6 +36,9 @@
virtual float get_x_pos ();
virtual float get_y_pos ();
+
+ virtual void set_pos (float new_x, float new_y);
+
virtual void update (float);
};
}
Index: pointer.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input/pointer.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pointer.hxx 4 Jul 2002 15:14:00 -0000 1.3
+++ pointer.hxx 5 Jul 2002 11:02:47 -0000 1.4
@@ -29,7 +29,10 @@
virtual ~Pointer() { }
virtual float get_x_pos () =0;
virtual float get_y_pos () =0;
- virtual void update () =0;
+
+ virtual void set_pos (float, float) =0;
+
+ virtual void update (float) =0;
};
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/input axis_pointer.cxx,1.1,1.2 axis_pointer.hxx,1.1,1.2 button_axis.cxx,1.2,1.3 joystick_axis.cxx,1.2,1.3 mouse_pointer.cxx,1.1,1.2 mouse_pointer.hxx,1.1,1.2 pointer.hxx,1.3,1.4,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input multiple_pointer.cxx,NONE,1.1 multiple_pointer.hxx,NONE,1.1
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input Makefile.am,1.5,1.6
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input multiple_pointer.cxx,NONE,1.1 multiple_pointer.hxx,NONE,1.1
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input Makefile.am,1.5,1.6
- Index(es):