Badguys now inherit from MovingSprite
[supertux.git] / src / badguy / badguy.hpp
index e9f6833..eee973f 100644 (file)
@@ -23,8 +23,7 @@
 // moved them here to make it less typing when implementing new badguys
 #include <math.h>
 #include "timer.hpp"
-#include "moving_object.hpp"
-#include "sprite/sprite.hpp"
+#include "object/moving_sprite.hpp"
 #include "physic.hpp"
 #include "object/player.hpp"
 #include "serializable.hpp"
 #include "video/drawing_context.hpp"
 #include "audio/sound_manager.hpp"
 #include "audio/sound_source.hpp"
-#include "sprite/sprite_manager.hpp"
 
-class BadGuy : public MovingObject, public Serializable
+class BadGuy : public MovingSprite, public Serializable
 {
 public:
-  BadGuy();
-  BadGuy(const BadGuy& badguy);
-  ~BadGuy();
+  BadGuy(const Vector& pos, const std::string& sprite_name, int layer = LAYER_OBJECTS);
+  BadGuy(const lisp::Lisp& reader, const std::string& sprite_name, int layer = LAYER_OBJECTS);
+  virtual BadGuy* clone() const = 0;
 
   /** Called when the badguy is drawn. The default implementation simply draws
    * the badguy sprite on screen
@@ -88,8 +86,6 @@ public:
    * during runtime. */
   bool countMe;
 
-  virtual BadGuy* clone() const = 0;
-
 protected:
   enum State {
     STATE_INIT,
@@ -142,7 +138,6 @@ protected:
    */
   Player* get_nearest_player();
   
-  Sprite* sprite;
   Physic physic;
 
   /// is the enemy activated
@@ -162,12 +157,6 @@ protected:
 
   Direction dir;
 
-  /**
-   * z-position at which to draw the sprite.
-   * e.g. LAYER_OBJECTS, LAYER_OBJECTS - 1, LAYER_FLOATINGOBJECTS
-   */
-  int layer;
-
 private:
   void try_activate();