SuperTuxKart
|
This class reads and writes the 'highscores.xml' file, and also takes care of dealing with new records. More...
#include <highscore_manager.hpp>
Public Member Functions | |
void | loadHighscores () |
void | saveHighscores () |
Highscores * | getHighscores (const Highscores::HighscoreType &highscore_type, int num_karts, const RaceManager::Difficulty difficulty, const std::string &trackName, const int number_of_laps, const bool reverse) |
Highscores * | getGPHighscores (int num_karts, const RaceManager::Difficulty difficulty, const std::string &trackName, const int target, GrandPrixData::GPReverseType reverse_type, RaceManager::MinorRaceModeType minor_mode) |
getHighscores method for grandprix highscores | |
void | deleteHighscores (int i) |
void | clearHighscores () |
bool | highscoresEmpty () |
Highscores * | getHighscoresAt (int i) |
int | highscoresSize () |
void | sortHighscores (bool reverse) |
Private Member Functions | |
void | setFilename () |
Determines the path to store the highscore file in. | |
Private Attributes | |
std::vector< std::unique_ptr< Highscores > > | m_all_scores |
std::string | m_filename |
bool | m_can_write |
Static Private Attributes | |
static const unsigned int | CURRENT_HSCORE_FILE_VERSION = 4 |
This class reads and writes the 'highscores.xml' file, and also takes care of dealing with new records.
One 'HighscoreEntry' object is created for each highscore entry.