Some more aspect ratio stuff
[supertux.git] / src / badguy / snail.hpp
index 5866e95..0d31ca8 100644 (file)
@@ -1,4 +1,4 @@
-//  $Id: snail.hpp 3364 2006-04-19 00:54:40Z sommer $
+//  $Id$
 //
 //  SuperTux - Badguy "Snail"
 //  Copyright (C) 2006 Christoph Sommer <christoph.sommer@2006.expires.deltadevelopment.de>
 #ifndef __SNAIL_H__
 #define __SNAIL_H__
 
-#include "badguy.hpp"
+#include "walking_badguy.hpp"
 
 /**
  * Badguy "Snail" - a snail-like creature that can be flipped and tossed around at an angle
  */
-class Snail : public BadGuy
+class Snail : public WalkingBadguy
 {
 public:
   Snail(const lisp::Lisp& reader);
-  Snail(float pos_x, float pos_y, Direction d);
+  Snail(const Vector& pos, Direction d);
 
-  void activate();
+  void initialize();
   void write(lisp::Writer& writer);
-  HitResponse collision_solid(GameObject& object, const CollisionHit& hit);
+  void collision_solid(const CollisionHit& hit);
   HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit);
+  bool can_break();
 
   void active_update(float elapsed_time);
 
+  virtual Snail* clone() const { return new Snail(*this); }
+
 protected:
-  bool collision_squished(Player& player);
+  bool collision_squished(GameObject& object);
   void be_normal(); /**< switch to state STATE_NORMAL */
   void be_flat(); /**< switch to state STATE_FLAT */
   void be_kicked(); /**< switch to state STATE_KICKED_DELAY */
@@ -55,9 +58,6 @@ private:
   Timer flat_timer; /**< wait time until flipping right-side-up again */
   Timer kicked_delay_timer; /**< wait time until switching from STATE_KICKED_DELAY to STATE_KICKED */
   int squishcount;
-  bool set_direction;
-  Direction initial_direction;  
 };
 
 #endif
-