fix cr/lfs and remove trailing whitespaces...
[supertux.git] / src / badguy / dart.hpp
index 46bc301..bbab1df 100644 (file)
@@ -1,4 +1,4 @@
-//  $Id: dart.hpp 3327 2006-04-13 15:02:40Z sommer $
+//  $Id$
 //
 //  Dart - Your average poison dart
 //  Copyright (C) 2006 Christoph Sommer <supertux@2006.expires.deltadevelopment.de>
@@ -30,7 +30,8 @@ class Dart : public BadGuy
 {
 public:
   Dart(const lisp::Lisp& reader);
-  Dart(float pos_x, float pos_y, Direction d, const BadGuy* parent);
+  Dart(const Vector& pos, Direction d, const BadGuy* parent);
+  Dart(const Dart& dart);
   ~Dart();
 
   void activate();
@@ -39,16 +40,17 @@ public:
 
   void active_update(float elapsed_time);
 
-  HitResponse collision_solid(GameObject& object, const CollisionHit& hit);
+  void collision_solid(const CollisionHit& hit);
   HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit);
   HitResponse collision_player(Player& player, const CollisionHit& hit);
 
+  virtual Dart* clone() const { return new Dart(*this); }
+
+  virtual bool updatePointers(const GameObject* from_object, GameObject* to_object);
+
 protected:
-  bool set_direction;
-  Direction initial_direction;
   const BadGuy* parent; /**< collisions with this BadGuy will be ignored */
-  SoundSource* soundSource; /**< SoundSource for ambient sound */
+  std::auto_ptr<SoundSource> sound_source; /**< SoundSource for ambient sound */
 };
 
 #endif
-