[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/input axis.hxx, 1.10, 1.11 button_fac
From: |
Ingo Ruhnke |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/input axis.hxx, 1.10, 1.11 button_factory.hxx, 1.9, 1.10 controller.cxx, 1.28, 1.29 event_fwd.hxx, 1.3, 1.4 key_helper.cxx, 1.4, 1.5 key_helper.hxx, 1.4, 1.5 pointer.hxx, 1.11, 1.12 pointer_factory.cxx, 1.10, 1.11 pointer_factory.hxx, 1.7, 1.8 scroller.hxx, 1.8, 1.9 scroller_factory.cxx, 1.11, 1.12 scroller_factory.hxx, 1.8, 1.9 |
Date: |
Mon, 20 Oct 2003 21:28:57 +0200 |
Update of /var/lib/cvs/Games/Pingus/src/input
In directory dark:/tmp/cvs-serv7605/input
Modified Files:
axis.hxx button_factory.hxx controller.cxx event_fwd.hxx
key_helper.cxx key_helper.hxx pointer.hxx pointer_factory.cxx
pointer_factory.hxx scroller.hxx scroller_factory.cxx
scroller_factory.hxx
Log Message:
misc stuff
Index: axis.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/axis.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- axis.hxx 19 Apr 2003 10:23:18 -0000 1.10
+++ axis.hxx 20 Oct 2003 19:28:55 -0000 1.11
@@ -22,29 +22,31 @@
#include "../pingus.hxx"
+namespace Pingus {
namespace Input {
- /// abstract base class which defines the axis interface
- class Axis {
+/// abstract base class which defines the axis interface
+class Axis {
- public:
- Axis () { }
- virtual ~Axis () { }
+public:
+ Axis () { }
+ virtual ~Axis () { }
- /// yields the position of the axis in [-1;1]
- virtual const float& get_pos () const =0;
+ /// yields the position of the axis in [-1;1]
+ virtual const float& get_pos () const =0;
- /// yields the angle of axis in [0;360[ degree
- virtual const float& get_angle () const =0;
+ /// yields the angle of axis in [0;360[ degree
+ virtual const float& get_angle () const =0;
- virtual void update(float) =0;
+ virtual void update(float) =0;
- private:
- Axis (const Axis&);
- Axis& operator= (const Axis&);
- };
+private:
+ Axis (const Axis&);
+ Axis& operator= (const Axis&);
+};
-}
+} // namespace Input
+} // namespace Pingus
#endif
Index: button_factory.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/button_factory.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- button_factory.hxx 16 Jun 2003 20:58:11 -0000 1.9
+++ button_factory.hxx 20 Oct 2003 19:28:55 -0000 1.10
@@ -22,30 +22,32 @@
#include "../libxmlfwd.hxx"
+namespace Pingus {
namespace Input {
- class Button;
+class Button;
- class ButtonFactory
- {
- private:
- static Button* double_button (xmlNodePtr cur);
- static Button* joystick_button (xmlNodePtr cur);
- static Button* key_button (xmlNodePtr cur);
- static Button* mouse_button (xmlNodePtr cur);
- static Button* multiple_button (xmlNodePtr cur);
- static Button* triple_button (xmlNodePtr cur);
+class ButtonFactory
+{
+private:
+ static Button* double_button (xmlNodePtr cur);
+ static Button* joystick_button (xmlNodePtr cur);
+ static Button* key_button (xmlNodePtr cur);
+ static Button* mouse_button (xmlNodePtr cur);
+ static Button* multiple_button (xmlNodePtr cur);
+ static Button* triple_button (xmlNodePtr cur);
- public:
- static Button* create (xmlNodePtr cur);
+public:
+ static Button* create (xmlNodePtr cur);
- private:
- ButtonFactory ();
- ButtonFactory (const ButtonFactory&);
- ButtonFactory& operator= (const ButtonFactory&);
- };
+private:
+ ButtonFactory ();
+ ButtonFactory (const ButtonFactory&);
+ ButtonFactory& operator= (const ButtonFactory&);
+};
-}
+} // namespace Input
+} // namespace Pingus
#endif
Index: controller.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/controller.cxx,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- controller.cxx 19 Apr 2003 10:23:18 -0000 1.28
+++ controller.cxx 20 Oct 2003 19:28:55 -0000 1.29
@@ -22,9 +22,9 @@
#include "../pingus_error.hxx"
/*#include "axis_event.hxx"
-#include "axis_factory.hxx"
-#include "button_factory.hxx"
-#include "pointer_event.hxx"
+ #include "axis_factory.hxx"
+ #include "button_factory.hxx"
+ #include "pointer_event.hxx"
*/
#include "controller.hxx"
#include "axes/dummy_axis.hxx"
@@ -36,6 +36,7 @@
#include "button_factory.hxx"
//#include "scroll_event.hxx"
+namespace Pingus {
namespace Input {
using namespace Axes;
@@ -256,6 +257,7 @@
return 0;
}
-}
+} // namespace Input
+} // namespace Pingus
/* EOF */
Index: event_fwd.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/event_fwd.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- event_fwd.hxx 19 Apr 2003 10:23:18 -0000 1.3
+++ event_fwd.hxx 20 Oct 2003 19:28:55 -0000 1.4
@@ -24,12 +24,14 @@
// Forward Header for event.hxx, just here to reduce compile time
// dependencies a bit.
+namespace Pingus {
namespace Input {
union Event;
typedef std::vector<Event> EventLst;
} // namespace Input
+} // namespace Pingus
#endif
Index: key_helper.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/key_helper.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- key_helper.cxx 19 Apr 2003 10:23:18 -0000 1.4
+++ key_helper.cxx 20 Oct 2003 19:28:55 -0000 1.5
@@ -18,12 +18,15 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <iostream>
-#include <ClanLib/Display/Input/key.h>
+#include <ClanLib/Display/keys.h>
#include "key_helper.hxx"
+namespace Pingus {
+
std::string
Input::KeyHelper::key_to_string (int key)
{
+#ifdef CLANLIB_0_6
switch (key)
{
case CL_KEY_0: return "0";
@@ -129,11 +132,14 @@
default:
return "Unhandled key";
}
+#endif
+ return "Unhandled key";
}
int
Input::KeyHelper::string_to_key (const std::string& key)
{
+#ifdef CLANLIB_0_6
if (key == "0") { return CL_KEY_0; }
else if (key == "1") { return CL_KEY_1; }
else if (key == "2") { return CL_KEY_2; }
@@ -239,6 +245,10 @@
std::cout << "Key Name " << key << "not known" << std::endl;
return CL_NO_KEY;
}
+#endif
+ return 0;
}
+} // namespace Pingus
+
/* EOF */
Index: key_helper.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/key_helper.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- key_helper.hxx 19 Apr 2003 10:23:18 -0000 1.4
+++ key_helper.hxx 20 Oct 2003 19:28:55 -0000 1.5
@@ -22,20 +22,23 @@
#include <string>
-namespace Input
+namespace Pingus {
+namespace Input {
+
+class KeyHelper
{
- class KeyHelper
- {
- public:
- static std::string key_to_string (int);
- static int string_to_key (const std::string&);
+public:
+ static std::string key_to_string (int);
+ static int string_to_key (const std::string&);
- private:
- KeyHelper ();
- KeyHelper (const KeyHelper&);
- KeyHelper& operator= (const KeyHelper&);
- };
-}
+private:
+ KeyHelper ();
+ KeyHelper (const KeyHelper&);
+ KeyHelper& operator= (const KeyHelper&);
+};
+
+} // namespace Input
+} // namespace Pingus
#endif
Index: pointer.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/pointer.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- pointer.hxx 19 Apr 2003 10:23:18 -0000 1.11
+++ pointer.hxx 20 Oct 2003 19:28:55 -0000 1.12
@@ -22,32 +22,34 @@
#include "../pingus.hxx"
+namespace Pingus {
namespace Input {
- /// abstract base class defining the pointer interface
- class Pointer
- {
- public:
- Pointer () { }
- virtual ~Pointer() { }
+/// abstract base class defining the pointer interface
+class Pointer
+{
+public:
+ Pointer () { }
+ virtual ~Pointer() { }
- /// returns the X coordinate of the pointer
- virtual const float& get_x_pos () const =0;
+ /// returns the X coordinate of the pointer
+ virtual const float& get_x_pos () const =0;
- /// returns the Y coordinate of the pointer
- virtual const float& get_y_pos () const =0;
+ /// returns the Y coordinate of the pointer
+ virtual const float& get_y_pos () const =0;
- /// sets the pointer to the given position
- virtual void set_pos (float, float) =0;
+ /// sets the pointer to the given position
+ virtual void set_pos (float, float) =0;
- virtual void update (float) =0;
+ virtual void update (float) =0;
- private:
- Pointer (const Pointer&);
- Pointer& operator= (const Pointer&);
- };
+private:
+ Pointer (const Pointer&);
+ Pointer& operator= (const Pointer&);
+};
-}
+} // namespace Input
+} // namespace Pingus
#endif
Index: pointer_factory.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/pointer_factory.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- pointer_factory.cxx 19 Apr 2003 10:23:18 -0000 1.10
+++ pointer_factory.cxx 20 Oct 2003 19:28:55 -0000 1.11
@@ -25,6 +25,7 @@
#include "pointers/multiple_pointer.hxx"
#include "pointer_factory.hxx"
+namespace Pingus {
namespace Input {
using namespace Pointers;
@@ -97,6 +98,7 @@
return new MultiplePointer(pointers);
}
-}
+} // namespace Input
+} // namespace Pingus
/* EOF */
Index: pointer_factory.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/pointer_factory.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- pointer_factory.hxx 16 Jun 2003 20:58:11 -0000 1.7
+++ pointer_factory.hxx 20 Oct 2003 19:28:55 -0000 1.8
@@ -22,26 +22,29 @@
#include "../libxmlfwd.hxx"
+namespace Pingus {
namespace Input {
- class Pointer;
+class Pointer;
- class PointerFactory
- {
- private:
- static Pointer* axis_pointer (xmlNodePtr cur);
- static Pointer* mouse_pointer ();
- static Pointer* multiple_pointer (xmlNodePtr cur);
+class PointerFactory
+{
+private:
+ static Pointer* axis_pointer (xmlNodePtr cur);
+ static Pointer* mouse_pointer ();
+ static Pointer* multiple_pointer (xmlNodePtr cur);
- public:
- static Pointer* create (xmlNodePtr cur);
+public:
+ static Pointer* create (xmlNodePtr cur);
- private:
- PointerFactory ();
- PointerFactory (const PointerFactory&);
- PointerFactory& operator= (const PointerFactory&);
- };
-}
+private:
+ PointerFactory ();
+ PointerFactory (const PointerFactory&);
+ PointerFactory& operator= (const PointerFactory&);
+};
+
+} // namespace Input
+} // namespace Pingus
#endif
Index: scroller.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/scroller.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- scroller.hxx 19 Apr 2003 10:23:18 -0000 1.8
+++ scroller.hxx 20 Oct 2003 19:28:55 -0000 1.9
@@ -22,31 +22,33 @@
#include "../pingus.hxx"
+namespace Pingus {
namespace Input {
- /// abstract base class defining the scroller interface
- class Scroller {
- public:
- Scroller () { }
- virtual ~Scroller () { }
+/// abstract base class defining the scroller interface
+class Scroller {
+public:
+ Scroller () { }
+ virtual ~Scroller () { }
- /// returns the scroll delta in X direction
- virtual const float& get_x_delta () const =0;
+ /// returns the scroll delta in X direction
+ virtual const float& get_x_delta () const =0;
- /// returns the scroll delta in Y direction
- virtual const float& get_y_delta () const =0;
+ /// returns the scroll delta in Y direction
+ virtual const float& get_y_delta () const =0;
- /// writes the X/Y scroll delta into it's parameters
- virtual void get_delta (float&, float&) const =0;
+ /// writes the X/Y scroll delta into it's parameters
+ virtual void get_delta (float&, float&) const =0;
- virtual void update (float) =0;
+ virtual void update (float) =0;
- private:
- Scroller (const Scroller&);
- Scroller& operator= (const Scroller&);
- };
+private:
+ Scroller (const Scroller&);
+ Scroller& operator= (const Scroller&);
+};
-}
+} // namespace Input
+} // namespace Pingus
#endif
Index: scroller_factory.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/scroller_factory.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- scroller_factory.cxx 19 Apr 2003 10:23:18 -0000 1.11
+++ scroller_factory.cxx 20 Oct 2003 19:28:55 -0000 1.12
@@ -34,7 +34,7 @@
#include "scrollers/multiple_scroller.hxx"
#include "scrollers/pointer_scroller.hxx"
-
+namespace Pingus {
namespace Input {
using namespace Scrollers;
@@ -164,5 +164,6 @@
}
} // namespace Input
+} // namespace Pingus
/* EOF */
Index: scroller_factory.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input/scroller_factory.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- scroller_factory.hxx 16 Jun 2003 20:58:11 -0000 1.8
+++ scroller_factory.hxx 20 Oct 2003 19:28:55 -0000 1.9
@@ -22,29 +22,32 @@
#include "../libxmlfwd.hxx"
+namespace Pingus {
namespace Input {
- class Scroller;
+class Scroller;
- class ScrollerFactory
- {
- private:
- static Scroller* axis_scroller (xmlNodePtr cur);
- static Scroller* inverted_scroller (xmlNodePtr cur);
- static Scroller* joystick_scroller (xmlNodePtr cur);
- static Scroller* mouse_scroller (xmlNodePtr cur);
- static Scroller* multiple_scroller (xmlNodePtr cur);
- static Scroller* pointer_scroller (xmlNodePtr cur);
+class ScrollerFactory
+{
+private:
+ static Scroller* axis_scroller (xmlNodePtr cur);
+ static Scroller* inverted_scroller (xmlNodePtr cur);
+ static Scroller* joystick_scroller (xmlNodePtr cur);
+ static Scroller* mouse_scroller (xmlNodePtr cur);
+ static Scroller* multiple_scroller (xmlNodePtr cur);
+ static Scroller* pointer_scroller (xmlNodePtr cur);
- public:
- static Scroller* create (xmlNodePtr cur);
+public:
+ static Scroller* create (xmlNodePtr cur);
- private:
- ScrollerFactory ();
- ScrollerFactory (const ScrollerFactory&);
- ScrollerFactory& operator= (const ScrollerFactory&);
- };
-}
+private:
+ ScrollerFactory ();
+ ScrollerFactory (const ScrollerFactory&);
+ ScrollerFactory& operator= (const ScrollerFactory&);
+};
+
+} // namespace Input
+} // namespace Pingus
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/input axis.hxx, 1.10, 1.11 button_factory.hxx, 1.9, 1.10 controller.cxx, 1.28, 1.29 event_fwd.hxx, 1.3, 1.4 key_helper.cxx, 1.4, 1.5 key_helper.hxx, 1.4, 1.5 pointer.hxx, 1.11, 1.12 pointer_factory.cxx, 1.10, 1.11 pointer_factory.hxx, 1.7, 1.8 scroller.hxx, 1.8, 1.9 scroller_factory.cxx, 1.11, 1.12 scroller_factory.hxx, 1.8, 1.9,
Ingo Ruhnke <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src action_holder.hxx, 1.13, 1.14 client.cxx, 1.48, 1.49 col_map.cxx, 1.20, 1.21 console.hxx, 1.14, 1.15 credits.cxx, 1.39, 1.40 credits.hxx, 1.15, 1.16 demo_session.cxx, 1.10, 1.11 exit_menu.cxx, 1.21, 1.22 fade_out.cxx, 1.9, 1.10 fonts.cxx, 1.5, 1.6 fps_counter.cxx, 1.9, 1.10 game_session.hxx, 1.20, 1.21 global_event.cxx, 1.11, 1.12 level_desc.hxx, 1.7, 1.8 level_result.hxx, 1.6, 1.7 loading.cxx, 1.7, 1.8 menu_button.hxx, 1.5, 1.6 pingus_counter_bar.cxx, 1.8, 1.9 pingus_main.cxx, 1.100, 1.101 res_descriptor.cxx, 1.17, 1.18 savegame.hxx, 1.4, 1.5 smallmap.cxx, 1.39, 1.40 smallmap_image.cxx, 1.11, 1.12 smallmap_image.hxx, 1.9, 1.10 spot_map.cxx, 1.28, 1.29 stat_manager.cxx, 1.8, 1.9 story_screen.cxx, 1.22, 1.23 target_provider.cxx, 1.2, 1.3 target_provider.hxx, 1.7, 1.8 theme.cxx, 1.20, 1.21 theme.hxx, 1.7, 1.8 time_display.hxx, 1.11, 1.12 usb_mouse_controller.cxx, 1.5, 1.6
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input/buttons dummy_button.hxx, 1.4, 1.5
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src action_holder.hxx, 1.13, 1.14 client.cxx, 1.48, 1.49 col_map.cxx, 1.20, 1.21 console.hxx, 1.14, 1.15 credits.cxx, 1.39, 1.40 credits.hxx, 1.15, 1.16 demo_session.cxx, 1.10, 1.11 exit_menu.cxx, 1.21, 1.22 fade_out.cxx, 1.9, 1.10 fonts.cxx, 1.5, 1.6 fps_counter.cxx, 1.9, 1.10 game_session.hxx, 1.20, 1.21 global_event.cxx, 1.11, 1.12 level_desc.hxx, 1.7, 1.8 level_result.hxx, 1.6, 1.7 loading.cxx, 1.7, 1.8 menu_button.hxx, 1.5, 1.6 pingus_counter_bar.cxx, 1.8, 1.9 pingus_main.cxx, 1.100, 1.101 res_descriptor.cxx, 1.17, 1.18 savegame.hxx, 1.4, 1.5 smallmap.cxx, 1.39, 1.40 smallmap_image.cxx, 1.11, 1.12 smallmap_image.hxx, 1.9, 1.10 spot_map.cxx, 1.28, 1.29 stat_manager.cxx, 1.8, 1.9 story_screen.cxx, 1.22, 1.23 target_provider.cxx, 1.2, 1.3 target_provider.hxx, 1.7, 1.8 theme.cxx, 1.20, 1.21 theme.hxx, 1.7, 1.8 time_display.hxx, 1.11, 1.12 usb_mouse_controller.cxx, 1.5, 1.6
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input/buttons dummy_button.hxx, 1.4, 1.5
- Index(es):