make igloo the first level
[supertux.git] / src / object / player.hpp
index d7326cd..019fbd2 100644 (file)
@@ -1,7 +1,7 @@
 //  $Id$
 //
-//  SuperTux -  A Jump'n Run
-//  Copyright (C) 2003 Tobias Glaesser <tobi.web@gmx.de>
+//  SuperTux
+//  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 //
 //  This program is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU General Public License
@@ -16,6 +16,7 @@
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
 #ifndef SUPERTUX_PLAYER_H
 #define SUPERTUX_PLAYER_H
 
@@ -80,20 +81,6 @@ extern TuxBodyParts* big_tux;
 extern TuxBodyParts* fire_tux;
 extern TuxBodyParts* ice_tux;
 
-class FallingCoin : public GameObject
-{
-public:
-  FallingCoin(const Vector& start_position, const int x_vel);
-  ~FallingCoin();
-
-  void draw(DrawingContext& context);
-  void update(float elapsed_time);
-private:
-  Vector  pos;
-  Sprite* sprite;
-  Physic  physic;
-};
-
 class Player : public MovingObject, public Scripting::Player, public ScriptInterface
 {
 public:
@@ -160,7 +147,11 @@ public:
   void kill(HurtMode mode);
   void check_bounds(Camera* camera);
   void move(const Vector& vector);
-  void set_bonus(BonusType type, bool animate = false);
+
+  virtual void add_bonus(const std::string& bonus);
+  virtual void add_coins(int count);
+  void add_bonus(BonusType type, bool animate = false); /**< picks up a bonus, taking care not to pick up lesser bonus items than we already have */
+  void set_bonus(BonusType type, bool animate = false); /**< like add_bonus, but can also downgrade the bonus items carried */
   PlayerStatus* get_status()
   {
     return player_status;