SuperTuxKart
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
SavedGrandPrix Class Reference

Class for managing saved Grand-Prix's A list of all possible resumable GP's is stored in the user config. More...

#include <saved_grand_prix.hpp>

Classes

class  SavedGPKart
 

Public Member Functions

 SavedGrandPrix (unsigned int player_id, const std::string &gp_id, RaceManager::MinorRaceModeType race_type, RaceManager::Difficulty difficulty, int player_karts, int last_track, int reverse_type, int skipped_tracks, float time_target, int player_total_laps, const std::vector< RaceManager::KartStatus > &kart_list)
 Constructor to create a new entry.
 
 SavedGrandPrix (const XMLNode *node)
 Constructor to deserialize a entry that was saved to a XML file.
 
void setKarts (const std::vector< RaceManager::KartStatus > &kart_list)
 
void clearKarts ()
 
void loadKarts (std::vector< RaceManager::KartStatus > &kart_list)
 
unsigned int getPlayerID () const
 Returns the player id for this saved GP.
 
std::string getGPID () const
 Returns the grand prix id.
 
int getRaceType () const
 Returns the race type of this GP.
 
int getDifficulty () const
 Returns the difficulty of this GP.
 
int getTotalKarts () const
 Returns the total number of karts of this GP.
 
int getPlayerKarts () const
 Returns the number of player karts in this GP.
 
int getNextTrack () const
 Returns the index of the last track finished when this GP was saved.
 
int getReverseType () const
 Returns the reverse Type.
 
int getSkippedTracks () const
 Returns skipped tracks count.
 
float getTimeTarget () const
 Returns time target used in Lap Trial mode.
 
int getPlayerTotalLaps () const
 Returns total laps in GP.
 
void setNextTrack (int next_track)
 Sets the index of the last track finished.
 
void remove ()
 Removed this SavedGrandPrix from the list of all SavedGrandPrix, and deletes it.
 

Static Public Member Functions

static SavedGrandPrixgetSavedGP (unsigned int player, const std::string &gpid, RaceManager::MinorRaceModeType race_type, const unsigned int number_of_players)
 Finds the right SavedGrandPrix given the specified data, or NULL if no matching GP was found.
 

Protected Attributes

GroupUserConfigParam m_savedgp_group
 For saving to config file.
 
IntUserConfigParam m_player_id
 
StringUserConfigParam m_gp_id
 Identifier of this GP.
 
IntUserConfigParam m_race_type
 Race type at which this GP was run.
 
IntUserConfigParam m_difficulty
 Difficulty at which this GP was run.
 
IntUserConfigParam m_player_karts
 Number of player karts used in this GP.
 
IntUserConfigParam m_next_track
 Index of the next to run track.
 
IntUserConfigParam m_reverse_type
 GPReverseType of the GP as int.
 
IntUserConfigParam m_skipped_tracks
 Count of tracks that player skipped.
 
FloatUserConfigParam m_time_target
 Time target used in Lap Trial mode.
 
IntUserConfigParam m_player_total_laps
 Total laps count, used in Lap Trial mode.
 
PtrVector< SavedGPKartm_karts
 

Detailed Description

Class for managing saved Grand-Prix's A list of all possible resumable GP's is stored in the user config.

Member Data Documentation

◆ m_savedgp_group

GroupUserConfigParam SavedGrandPrix::m_savedgp_group
protected

For saving to config file.

WARNING : m_savedgp_group has to be declared before the other userconfigparams!


The documentation for this class was generated from the following files: