X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fstatistics.hpp;h=a7b194f94bc6896873f2755091715f1dfb8adc36;hb=ecb5b95cae951c0dddc73c4ec76bbbc328d17d4a;hp=0883e36aa11ab7bb70a3481ce3574704a371585d;hpb=244488950ba1c0daf20795213619c27e6963937c;p=supertux.git diff --git a/src/statistics.hpp b/src/statistics.hpp index 0883e36aa..a7b194f94 100644 --- a/src/statistics.hpp +++ b/src/statistics.hpp @@ -32,7 +32,7 @@ * track of stuff like scores, and minor, but funny things, like * number of jumps and stuff */ class Statistics -{ +{ public: int coins; /**< coins collected */ int total_coins; /**< coins in level */ @@ -59,7 +59,10 @@ public: void merge(Statistics& stats); /**< Given another Statistics object finds the best of each one */ void operator+=(const Statistics& o); /**< Add two Statistics objects */ + void declare_invalid(); /**< marks statistics as invalid for their entire lifetime (e.g. after cheating). Invalid statistics will not be merged or drawn. */ + private: + bool valid; /**< stores whether this statistics can be trusted */ Timer timer; /**< for draw_worldmap_info: time until switching to next stat */ int display_stat; /**< for draw_worldmap_info: which stat is currently displayed */ };