Downgrade surface format message from warning to debug
[supertux.git] / src / badguy / walking_badguy.hpp
index f316078..26c2f47 100644 (file)
@@ -27,24 +27,25 @@ class Timer;
 class WalkingBadguy : public BadGuy
 {
 public:
-  WalkingBadguy(const Vector& pos, 
-                const std::string& sprite_name, 
-                const std::string& walk_left_action, 
-                const std::string& walk_right_action, 
+  WalkingBadguy(const Vector& pos,
+                const std::string& sprite_name,
+                const std::string& walk_left_action,
+                const std::string& walk_right_action,
                 int layer = LAYER_OBJECTS);
-  WalkingBadguy(const Vector& pos, Direction direction, 
-                const std::string& sprite_name, 
-                const std::string& walk_left_action, 
-                const std::string& walk_right_action, 
+  WalkingBadguy(const Vector& pos, Direction direction,
+                const std::string& sprite_name,
+                const std::string& walk_left_action,
+                const std::string& walk_right_action,
                 int layer = LAYER_OBJECTS);
-  WalkingBadguy(const Reader& reader, 
-                const std::string& sprite_name, 
-                const std::string& walk_left_action, 
-                const std::string& walk_right_action, 
+  WalkingBadguy(const Reader& reader,
+                const std::string& sprite_name,
+                const std::string& walk_left_action,
+                const std::string& walk_right_action,
                 int layer = LAYER_OBJECTS);
 
   void initialize();
   void active_update(float elapsed_time);
+  void active_update(float elapsed_time, float target_velocity);
   void collision_solid(const CollisionHit& hit);
   HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit);
   void freeze();
@@ -53,6 +54,17 @@ public:
   float get_velocity_y() const;
   void set_velocity_y(float vy);
 
+  /**
+   * Adds velocity to the badguy (be careful when using this)
+   */
+  void add_velocity(const Vector& velocity);
+
+  float get_walk_speed (void) const
+  {
+    return (walk_speed);
+  }
+  void  set_walk_speed (float);
+
 protected:
   void turn_around();