converted player to new object system
[supertux.git] / src / special.h
index a297944..a28c742 100644 (file)
@@ -32,6 +32,7 @@
 
 enum UpgradeKind {
   UPGRADE_GROWUP,
+  UPGRADE_FIREFLOWER,
   UPGRADE_ICEFLOWER,
   UPGRADE_HERRING,
   UPGRADE_1UP
@@ -40,19 +41,20 @@ enum UpgradeKind {
 void load_special_gfx();
 void free_special_gfx();
 
-class Upgrade
+class Upgrade : public GameObject
 {
 public:
   UpgradeKind kind;
   Direction  dir;
-  base_type base;
-  base_type old_base;
   Physic physic;
 
   void init(float x, float y, Direction dir, UpgradeKind kind);
   void action(double frame_ratio);
   void draw();
-  void collision(void* p_c_object, int c_object);
+  void collision(void* p_c_object, int c_object, CollisionType type);
+  std::string type() { return "Upgrade"; };
+  
+  ~Upgrade() {};
 
 private:
   /** removes the Upgrade from the global upgrade list. Note that after this
@@ -60,19 +62,29 @@ private:
    * anymore then
    */
   void remove_me();
+
+  void bump(Player* player);
 };
 
-class Bullet
+enum BulletsKind {
+  FIRE_BULLET,
+  ICE_BULLET
+};
+
+class Bullet : public GameObject
 {
  public:
   int life_count;
   base_type base;
   base_type old_base;
+
+  int kind;
   
-  void init(float x, float y, float xm, Direction dir);
+  void init(float x, float y, float xm, Direction dir, int kind_);
   void action(double frame_ratio);
   void draw();
   void collision(int c_object);
+  std::string type() { return "Bullet"; };
 
 private:
   /** removes the Upgrade from the global upgrade list. Note that after this