Changed up and down to previous and next. And added up and down icons.
[supertux.git] / src / player.h
index 2199f23..da36ef8 100644 (file)
@@ -31,8 +31,9 @@
 
 /* Times: */
 
-#define TUX_SAFE_TIME 750
+#define TUX_SAFE_TIME 1250
 #define TUX_INVINCIBLE_TIME 10000
+#define TUX_INVINCIBLE_TIME_WARNING 2000
 #define TIME_WARNING 20000     /* When to alert player they're low on time! */
 
 /* One-ups... */
@@ -65,6 +66,7 @@ struct player_input_type
   int right;
   int left;
   int up;
+  int old_up;
   int down;
   int fire;
   int old_fire;
@@ -101,27 +103,30 @@ struct PlayerSprite
 extern PlayerSprite smalltux;
 extern PlayerSprite largetux;
 extern PlayerSprite firetux;
+extern PlayerSprite icetux;
 
-class Player
+class Player : public GameObject
 {
 public:
   enum HurtMode { KILL, SHRINK };
+  enum Power { NONE_POWER, FIRE_POWER, ICE_POWER };
 
   player_input_type  input;
-  bool got_coffee;
+  int got_power;
   int size;
   bool duck;
   bool holding_something;
   DyingType dying;
 
   Direction dir;
+  Direction old_dir;
 
   bool jumping;
+  bool can_jump;
+  bool butt_jump;
   int frame_;
   int frame_main;
 
-  base_type  base;
-  base_type  old_base;
   base_type  previous_base;
   Timer invincible_timer;
   Timer skidding_timer;
@@ -143,11 +148,13 @@ public:
   void is_dying();
   bool is_dead();
   void player_remove_powerups();
-  void keep_in_bounds();
+  void check_bounds(bool back_scrolling, bool hor_autoscroll);
   bool on_ground();
   bool under_solid();
   void grow();
   
+  std::string type() { return "Player";};
+  
 private:
   void handle_horizontal_input();
   void handle_vertical_input();