Limitated the number of bullets to be shot at the same time.
[supertux.git] / src / player.h
index 524e4d8..b0edbd2 100644 (file)
 
 #include <vector>
 
-struct player_keymap_type
+struct PlayerKeymap
 {
+public:
   int jump;
   int duck;
   int left;
   int right;
   int fire;
+  
+  PlayerKeymap();
 };
 
+extern PlayerKeymap keymap;
+
 struct player_input_type
 {
   int right;
@@ -101,15 +106,15 @@ extern Surface* bigcape_left[2];
 
 class Player
 {
- public:
-  player_keymap_type keymap;
-
+public:
   player_input_type  input;
   bool got_coffee;
   int size;
   bool duck;
   DyingType dying;
-  int dir;
+
+  Direction dir;
+
   bool jumping;
   int frame_;
   int frame_main;
@@ -123,7 +128,7 @@ class Player
   Timer frame_timer;
   Physic physic;
 
- public:
+public:
   void init();
   int  key_event(SDLKey key, int state);
   void level_begin();
@@ -140,10 +145,14 @@ class Player
   bool on_ground();
   bool under_solid();
   
- private:
+private:
   void handle_horizontal_input();
   void handle_vertical_input();
   void remove_powerups();
 };
 
 #endif /*SUPERTUX_PLAYER_H*/
+
+/* Local Variables: */
+/* mode:c++ */
+/* End: */