2 // Copyright (C) 2004 SuperTux Development Team, see AUTHORS for details
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 #ifndef SUPERTUX_STATISTICS_H
20 #define SUPERTUX_STATISTICS_H
22 using namespace SuperTux;
34 /** This class is a layer between level and worldmap to keep
35 * track of stuff like scores, and minor, but funny things, like
36 * number of jumps and stuff */
44 /// read statistics from lisp file
45 void parse(LispReader& reader);
46 /// write statistics to lisp file
47 void write(LispWriter& writer);
49 // TODO: add drawing functions to draw stats on WorldMap
51 void add_points(int stat, int points);
52 int get_points(int stat);
56 /* Give another Statistics object, find the best of each one */
57 void merge(Statistics& stats);
59 /* Add two statistic objects */
60 void operator+=(const Statistics& o);
66 extern Statistics global_stats;
68 #endif /*SUPERTUX_STATISTICS_H*/