X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fplayer_status.hpp;h=bf5cc272d365e3ef9b214656680945338b3ec6c5;hb=ca86583fae991aa3280c5d70bf20dbf0504a93cb;hp=3df230be339378460761adb6a5f05c06e2e991ee;hpb=13c6f377301f91c8d79ab768ba97b5eb771ed624;p=supertux.git diff --git a/src/player_status.hpp b/src/player_status.hpp index 3df230be3..bf5cc272d 100644 --- a/src/player_status.hpp +++ b/src/player_status.hpp @@ -27,6 +27,7 @@ #include "serializable.hpp" #include "sprite/sprite.hpp" #include "console.hpp" +#include "video/surface.hpp" static const float BORDER_X = 10; static const float BORDER_Y = 10; @@ -36,7 +37,7 @@ enum BonusType { }; class DrawingContext; -/** +/** * This class memorizes player status between different game sessions (for * example when switching maps in the worldmap) */ @@ -45,8 +46,8 @@ class PlayerStatus : public Serializable, public ConsoleCommandReceiver public: PlayerStatus(); ~PlayerStatus(); - void reset(); - void add_coins(int count); + void reset(); + void add_coins(int count, bool play_sound = true); void write(lisp::Writer& writer); void read(const lisp::Lisp& lisp); @@ -54,7 +55,7 @@ public: void draw(DrawingContext& context); bool consoleCommand(std::string command, std::vector arguments); /**< callback from Console; return false if command was unknown, true otherwise */ - + int coins; BonusType bonus; int max_fire_bullets; /**< maximum number of fire bullets in play */ @@ -64,12 +65,12 @@ public: int max_score_multiplier; void operator= (const PlayerStatus& other); - + private: // don't use this PlayerStatus(const PlayerStatus& other); - - std::auto_ptr tux_life; + + std::auto_ptr coin_surface; }; // global player state