#ifndef SUPERTUX_STATISTICS_H
#define SUPERTUX_STATISTICS_H
-#include "special/timer.h"
+#include "timer.h"
+#include "lisp/lisp.h"
+#include "lisp/writer.h"
-using namespace SuperTux;
-
-namespace SuperTux {
-class LispReader;
-class LispWriter;
class DrawingContext;
-}
+
+#define SPLAYER 0
+#define STOTAL 1
enum {
SCORE_STAT,
- BADGUYS_SQUISHED_STAT,
- SHOTS_STAT,
+ COINS_COLLECTED_STAT,
+ BADGUYS_KILLED_STAT,
TIME_NEEDED_STAT,
- JUMPS_STAT,
NUM_STATS
};
class Statistics
{
public:
+ // don't forget to call reset() to init stat
Statistics();
~Statistics();
/// read statistics from lisp file
- void parse(LispReader& reader);
+ void parse(const lisp::Lisp& lisp);
/// write statistics to lisp file
- void write(LispWriter& writer);
+ void write(lisp::Writer& writer);
/* Draw to the worldmap or a game message */
// TODO: make this functions working
void set_points(int stat, int points);
int get_points(int stat);
+ void set_total_points(int stat, int points);
+
/* Reset statistics */
void reset();
void operator+=(const Statistics& o);
private:
- int stats[NUM_STATS];
+ int stats[NUM_STATS][2];
Timer timer;
int display_stat;