WillOWisp badguys can now be trapped inside empty Lanterns.
[supertux.git] / src / statistics.hpp
index d282e0e..4aca2ad 100644 (file)
@@ -22,6 +22,7 @@
 #ifndef SUPERTUX_STATISTICS_H
 #define SUPERTUX_STATISTICS_H
 
+#include <squirrel.h>
 #include "timer.hpp"
 
 namespace lisp { class Writer; }
@@ -48,14 +49,25 @@ public:
   ~Statistics();
 
   /// read statistics from lisp file
-  void parse(const lisp::Lisp& lisp);
+  //void parse(const lisp::Lisp& lisp);
   /// write statistics to lisp file
-  void write(lisp::Writer& writer);
+  //void write(lisp::Writer& writer);
+
+  /**
+   * serialize statistics object as squirrel table "statistics"
+   */
+  void serialize_to_squirrel(HSQUIRRELVM vm);
+
+  /**
+   * unserialize statistics object from squirrel table "statistics"
+   */
+  void unserialize_from_squirrel(HSQUIRRELVM vm);
 
   void draw_worldmap_info(DrawingContext& context); /**< draw worldmap stat HUD */
   void draw_message_info(DrawingContext& context, std::string title); /**< draw stats at level start */
   void draw_endseq_panel(DrawingContext& context, Statistics* best_stats, Surface* backdrop); /**< draw panel shown during level's end sequence */
 
+  void zero(); /**< Set stats to zero */
   void reset(); /**< Set stats (but not totals) to zero */
   void merge(Statistics& stats); /**< Given another Statistics object finds the best of each one */
   void operator+=(const Statistics& o); /**< Add two Statistics objects */