19#ifndef HEADER_HISTORY_HPP
20#define HEADER_HISTORY_HPP
23#include "input/input.hpp"
24#include "karts/controller/kart_control.hpp"
65 static bool m_online_history_replay;
Definition: history.hpp:35
void setReplayHistory(bool b)
Set if replay is enabled or not.
Definition: history.hpp:84
bool m_replay_history
True if a history should be replayed,.
Definition: history.hpp:38
void Load()
Loads a history from history.dat in the current directory.
Definition: history.cpp:191
void updateReplay(int world_ticks)
Sets the kart position and controls to the recorded history value.
Definition: history.cpp:95
bool replayHistory() const
Returns if a history is replayed, i.e.
Definition: history.hpp:81
unsigned int m_event_index
Points to the last used input event index.
Definition: history.hpp:41
std::vector< std::string > m_kart_ident
The identities of the karts to use.
Definition: history.hpp:44
void addEvent(int kart_id, PlayerAction pa, int value)
Stores an input event (e.g.
Definition: history.cpp:78
void initRecording()
Initialise the history for a new recording.
Definition: history.cpp:49
void allocateMemory(int size=-1)
Allocates memory for the history.
Definition: history.cpp:61
const std::string & getKartIdent(unsigned int n)
Returns the identifier of the n-th kart.
Definition: history.hpp:75
void Save()
Saves the history stored in the internal data structures into a file called history....
Definition: history.cpp:133
std::vector< InputEvent > m_all_input_events
All input events.
Definition: history.hpp:61
History()
Initialises the history object and sets the mode to none.
Definition: history.cpp:40
The main kart class.
Definition: kart.hpp:69
Definition: history.hpp:48
int m_value
The value to use.
Definition: history.hpp:56
int m_kart_index
For which kart the event was.
Definition: history.hpp:52
PlayerAction m_action
Which action it was.
Definition: history.hpp:54