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"
29 static const float BORDER_X = 10;
30 static const float BORDER_Y = 10;
33 NO_BONUS, GROWUP_BONUS, FIRE_BONUS, ICE_BONUS
38 * This class memorizes player status between different game sessions (for
39 * example when switching maps in the worldmap)
43 static Color text_color;
48 void add_coins(int count, bool play_sound = true);
50 void write(lisp::Writer& writer);
51 void read(const Reader& lisp);
53 void draw(DrawingContext& context);
58 int max_fire_bullets; /**< maximum number of fire bullets in play */
59 int max_ice_bullets; /**< maximum number of ice bullets in play */
62 std::auto_ptr<Surface> coin_surface;
65 PlayerStatus(const PlayerStatus&);
66 PlayerStatus& operator=(const PlayerStatus&);
69 // global player state
70 extern PlayerStatus* player_status;