projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't be too pedantic for squirrel sources
[supertux.git]
/
src
/
player_status.hpp
diff --git
a/src/player_status.hpp
b/src/player_status.hpp
index
7b352cf
..
85ac059
100644
(file)
--- a/
src/player_status.hpp
+++ b/
src/player_status.hpp
@@
-1,7
+1,8
@@
// $Id$
//
// $Id$
//
-// SuperTux
- A Jump'n Run
+// SuperTux
// Copyright (C) 2003 Tobias Glaesser <tobi.web@gmx.de>
// Copyright (C) 2003 Tobias Glaesser <tobi.web@gmx.de>
+// 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
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@
-19,12
+20,12
@@
#ifndef SUPERTUX_PLAYERSTATUS_H
#define SUPERTUX_PLAYERSTATUS_H
#ifndef SUPERTUX_PLAYERSTATUS_H
#define SUPERTUX_PLAYERSTATUS_H
-#include <assert.h>
#include <memory>
#include <memory>
-#include "lisp/lisp.hpp"
-#include "timer.hpp"
#include "serializable.hpp"
#include "serializable.hpp"
-#include "sprite/sprite.hpp"
+
+namespace lisp{ class Writer; }
+namespace lisp{ class Lisp; }
+class Surface;
static const float BORDER_X = 10;
static const float BORDER_Y = 10;
static const float BORDER_X = 10;
static const float BORDER_Y = 10;
@@
-34,7
+35,7
@@
enum BonusType {
};
class DrawingContext;
};
class DrawingContext;
-/**
+/**
* This class memorizes player status between different game sessions (for
* example when switching maps in the worldmap)
*/
* This class memorizes player status between different game sessions (for
* example when switching maps in the worldmap)
*/
@@
-43,44
+44,29
@@
class PlayerStatus : public Serializable
public:
PlayerStatus();
~PlayerStatus();
public:
PlayerStatus();
~PlayerStatus();
- void reset();
- void incLives();
- void incCoins();
- void set_keys(int new_key);
+ void reset();
+ void add_coins(int count, bool play_sound = true);
void write(lisp::Writer& writer);
void read(const lisp::Lisp& lisp);
void draw(DrawingContext& context);
void write(lisp::Writer& writer);
void read(const lisp::Lisp& lisp);
void draw(DrawingContext& context);
- void draw_keys(DrawingContext& context);
int coins;
BonusType bonus;
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 score_multiplier;
int max_score_multiplier;
void operator= (const PlayerStatus& other);
int score_multiplier;
int max_score_multiplier;
void operator= (const PlayerStatus& other);
-
- enum {
- KEY_BRASS = 0x001,
- KEY_IRON = 0x002,
- KEY_BRONZE = 0x004,
- KEY_SILVER = 0x008,
- KEY_GOLD = 0x010,
- };
private:
// don't use this
PlayerStatus(const PlayerStatus& other);
private:
// don't use this
PlayerStatus(const PlayerStatus& other);
-
- int keys;
- std::auto_ptr<Sprite> tux_life;
- std::auto_ptr<Sprite> key_iron;
- std::auto_ptr<Sprite> key_brass;
- std::auto_ptr<Sprite> key_bronze;
- std::auto_ptr<Sprite> key_silver;
- std::auto_ptr<Sprite> key_gold;
+
+ std::auto_ptr<Surface> coin_surface;
};
// global player state
};
// global player state