X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fplayer.h;h=e76b93b0ec47dc9ede2b822fe2b8807bfd69931c;hb=6c61f312a1f5a768e202195ca18ed5a51974bdcc;hp=3cbeb2ed09127bd2c4189308ecf3bd86399a6c61;hpb=4d3df5a40dfea474da0f15d8f2c6c755738bb7f6;p=supertux.git diff --git a/src/player.h b/src/player.h index 3cbeb2ed0..e76b93b0e 100644 --- a/src/player.h +++ b/src/player.h @@ -40,6 +40,7 @@ class BadGuy; #define TUX_SAFE_TIME 1250 #define TUX_INVINCIBLE_TIME 10000 #define TUX_INVINCIBLE_TIME_WARNING 2000 +#define TUX_FLAPPING_TIME 1000 /* How long Tux can flap his wings to gain additional jump height */ #define TIME_WARNING 20000 /* When to alert player they're low on time! */ /* One-ups... */ @@ -49,7 +50,7 @@ class BadGuy; /* Scores: */ #define SCORE_BRICK 5 -#define SCORE_DISTRO 25 +#define SCORE_DISTRO 20 /* Sizes: */ @@ -62,11 +63,11 @@ struct PlayerKeymap { public: int jump; - int activate; - int duck; + int up; + int down; int left; int right; - int fire; + int power; PlayerKeymap(); }; @@ -78,11 +79,12 @@ struct player_input_type int right; int left; int up; - int old_up; int down; int fire; int old_fire; int activate; + int jump; + int old_jump; }; void player_input_init(player_input_type* pplayer_input); @@ -110,7 +112,7 @@ public: ~TuxBodyParts() { }; void set_action(std::string action); - void start_animation(int loops, std::string next_action = ""); + void one_time_animation(); void draw(DrawingContext& context, const Vector& pos, int layer, Uint32 drawing_effect = NONE_EFFECT); @@ -147,10 +149,23 @@ public: FallMode fall_mode; bool jumping; + bool flapping; bool can_jump; + bool can_flap; + bool falling_from_flap; + bool enable_hover; bool butt_jump; int frame_; int frame_main; + + float flapping_velocity; + + // Ricardo's flapping + int flaps_nb; + + // temporary to help player's choosing a flapping + enum { MAREK_FLAP, RICARDO_FLAP, RYAN_FLAP, NONE_FLAP }; + int flapping_mode; base_type previous_base; Timer invincible_timer; @@ -162,6 +177,7 @@ public: Timer dying_timer; Timer growing_timer; Timer idle_timer; + Timer flapping_timer; Physic physic; public: