19#ifndef HEADER_PROFILE_WORLD_HPP
20#define HEADER_PROFILE_WORLD_HPP
22#include "modes/standard_race.hpp"
71 virtual std::shared_ptr<AbstractKart>
createKart
72 (
const std::string &kart_ident,
int index,
int local_player_id,
81 virtual void update(
int ticks);
The main kart class.
Definition: kart.hpp:69
An implementation of World, used for profiling only.
Definition: profile_world.hpp:31
static bool isProfileMode()
Returns true if profile mode was selected.
Definition: profile_world.hpp:89
unsigned int m_start_time
Return value of real time at start of race.
Definition: profile_world.hpp:43
ProfileWorld()
The constructor sets the number of (local) players to 0, since only AI karts are used.
Definition: profile_world.cpp:43
long long m_num_trans_effect
Number of transparent effect triangles drawn.
Definition: profile_world.hpp:61
static ProfileType m_profile_mode
If profiling is done, and if so, which mode.
Definition: profile_world.hpp:37
long long m_num_triangles
Number of primitives drawn (in 1000).
Definition: profile_world.hpp:49
virtual bool isRaceOver()
The race is over if either the requested number of laps have been done or the requested time is over.
Definition: profile_world.cpp:136
long long m_num_calls
Number of calls to draw.
Definition: profile_world.hpp:64
ProfileType
Profiling modes.
Definition: profile_world.hpp:34
virtual ~ProfileWorld()
Sets profile mode off again.
Definition: profile_world.cpp:67
long long m_num_transparent
Number of transparent triangles drawn.
Definition: profile_world.hpp:58
virtual std::shared_ptr< AbstractKart > createKart(const std::string &kart_ident, int index, int local_player_id, int global_player_id, RaceManager::KartType type, HandicapLevel handicap)
Creates a kart, having a certain position, starting location, and local and global player id (if appl...
Definition: profile_world.cpp:108
static int m_num_laps
In laps based profiling: number of laps to run.
Definition: profile_world.hpp:69
static void setProfileModeTime(float time)
Enables profiling for a certain amount of time.
Definition: profile_world.cpp:78
long long m_num_solid
Numer of solid triangles drawn.
Definition: profile_world.hpp:55
long long m_num_culls
Number of culled triangles.
Definition: profile_world.hpp:52
virtual void enterRaceOverState()
This function is called when the race is finished, but end-of-race animations have still to be played...
Definition: profile_world.cpp:177
virtual void update(int ticks)
Counts the number of frames.
Definition: profile_world.cpp:155
static void setProfileModeLaps(int laps)
Enables profiling for a certain number of laps.
Definition: profile_world.cpp:90
static float m_time
In time based profiling only: time to run.
Definition: profile_world.hpp:40
virtual std::string getInternalCode() const
Returns identifier for this world.
Definition: profile_world.hpp:80
int m_frame_count
Number of frames.
Definition: profile_world.hpp:46
KartType
Different kart types: A local player, a player connected via network, an AI kart, the leader kart (cu...
Definition: race_manager.hpp:242
Represents a standard race, i.e.
Definition: standard_race.hpp:29
HandicapLevel
Handicap per player.
Definition: remote_kart_info.hpp:42