projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Silence compiler warning
[supertux.git]
/
src
/
supertux
/
player_status.hpp
diff --git
a/src/supertux/player_status.hpp
b/src/supertux/player_status.hpp
index
f8ba723
..
35adf96
100644
(file)
--- a/
src/supertux/player_status.hpp
+++ b/
src/supertux/player_status.hpp
@@
-23,19
+23,18
@@
#include "util/reader_fwd.hpp"
#include "util/writer_fwd.hpp"
#include "video/color.hpp"
#include "util/reader_fwd.hpp"
#include "util/writer_fwd.hpp"
#include "video/color.hpp"
-
-class Surface;
+#include "video/surface_ptr.hpp"
static const float BORDER_X = 10;
static const float BORDER_Y = 10;
enum BonusType {
static const float BORDER_X = 10;
static const float BORDER_Y = 10;
enum BonusType {
- NO_BONUS, GROWUP_BONUS, FIRE_BONUS, ICE_BONUS
+ NO_BONUS, GROWUP_BONUS, FIRE_BONUS, ICE_BONUS
, AIR_BONUS, EARTH_BONUS
};
class DrawingContext;
/**
};
class DrawingContext;
/**
- * This class
memorize
s player status between different game sessions (for
+ * This class
keep
s player status between different game sessions (for
* example when switching maps in the worldmap)
*/
class PlayerStatus
* example when switching maps in the worldmap)
*/
class PlayerStatus
@@
-47,28
+46,29
@@
public:
void reset();
void add_coins(int count, bool play_sound = true);
void reset();
void add_coins(int count, bool play_sound = true);
- void write(
lisp::
Writer& writer);
+ void write(Writer& writer);
void read(const Reader& lisp);
void draw(DrawingContext& context);
void read(const Reader& lisp);
void draw(DrawingContext& context);
+public:
int coins;
BonusType bonus;
int max_fire_bullets; /**< maximum number of fire bullets in play */
int max_ice_bullets; /**< maximum number of ice bullets in play */
int coins;
BonusType bonus;
int max_fire_bullets; /**< maximum number of fire bullets in play */
int max_ice_bullets; /**< maximum number of ice bullets in play */
-
- void operator= (const PlayerStatus& other);
+ int max_air_time; /**<determines maximum number of seconds player can float in air */
+ int max_earth_time; /**< determines maximum number of seconds player can turn to stone */
private:
private:
- // don't use this
- PlayerStatus(const PlayerStatus& other);
+ int displayed_coins;
+ int displayed_coins_frame;
+ SurfacePtr coin_surface;
- std::auto_ptr<Surface> coin_surface;
+private:
+ PlayerStatus(const PlayerStatus&);
+ PlayerStatus& operator=(const PlayerStatus&);
};
};
-// global player state
-extern PlayerStatus* player_status;
-
#endif
/* EOF */
#endif
/* EOF */