2 // Copyright (C) 2003 Tobias Glaesser <tobi.web@gmx.de>
3 // Copyright (C) 2006 Matthias Braun <matze@braunis.de>
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef HEADER_SUPERTUX_SUPERTUX_PLAYER_STATUS_HPP
19 #define HEADER_SUPERTUX_SUPERTUX_PLAYER_STATUS_HPP
23 #include "util/reader_fwd.hpp"
24 #include "util/writer_fwd.hpp"
25 #include "video/color.hpp"
26 #include "video/surface_ptr.hpp"
28 static const float BORDER_X = 10;
29 static const float BORDER_Y = 10;
32 NO_BONUS, GROWUP_BONUS, FIRE_BONUS, ICE_BONUS
37 * This class keeps player status between different game sessions (for
38 * example when switching maps in the worldmap)
42 static Color text_color;
47 void add_coins(int count, bool play_sound = true);
49 void write(Writer& writer);
50 void read(const Reader& lisp);
52 void draw(DrawingContext& context);
57 int max_fire_bullets; /**< maximum number of fire bullets in play */
58 int max_ice_bullets; /**< maximum number of ice bullets in play */
61 SurfacePtr coin_surface;
64 PlayerStatus(const PlayerStatus&);
65 PlayerStatus& operator=(const PlayerStatus&);