#include <KReplaySystem.hh>
Kinoko system designed to execute replays.
Definition at line 8 of file KReplaySystem.hh.
|
| void | init () override |
| | Initializes the system.
|
| |
| void | calc () override |
| | Executes a frame.
|
| |
| bool | run () override |
| | Executes a run.
|
| |
| void | parseOptions (int argc, char **argv) override |
| | Parses non-generic command line options.
|
| |
|
|
| KReplaySystem (const KReplaySystem &)=delete |
| |
|
| KReplaySystem (KReplaySystem &&)=delete |
| |
| bool | calcEnd () const |
| | Determines whether or not the ghost simulation should end.
|
| |
| void | reportFail (const std::string &msg) const |
| | Reports failure to file.
|
| |
| bool | success () const |
| | Determines whether the simulation was a success or not.
|
| |
| s32 | getDesyncingTimerIdx () const |
| | Finds the desyncing timer index, if one exists.
|
| |
| DesyncingTimerPair | getDesyncingTimer (s32 i) const |
| | Gets the desyncing timer according to the index.
|
| |
◆ DesyncingTimerPair
◆ KReplaySystem()
| KReplaySystem::KReplaySystem |
( |
| ) |
|
|
private |
◆ ~KReplaySystem()
| KReplaySystem::~KReplaySystem |
( |
| ) |
|
|
overrideprivate |
◆ calc()
| void KReplaySystem::calc |
( |
| ) |
|
|
overridevirtual |
◆ calcEnd()
| bool KReplaySystem::calcEnd |
( |
| ) |
const |
|
private |
Determines whether or not the ghost simulation should end.
- Returns
- Whether the ghost should end or not.
Definition at line 115 of file KReplaySystem.cc.
◆ CreateInstance()
◆ DestroyInstance()
| void KReplaySystem::DestroyInstance |
( |
| ) |
|
|
static |
◆ getDesyncingTimer()
| KReplaySystem::DesyncingTimerPair KReplaySystem::getDesyncingTimer |
( |
s32 | i | ) |
const |
|
private |
Gets the desyncing timer according to the index.
- Parameters
-
| i | Index to the desyncing timer. Cannot be -1. |
- Returns
- The pair of timers. The first is the correct one, and the second is the incorrect one.
Definition at line 196 of file KReplaySystem.cc.
◆ getDesyncingTimerIdx()
| s32 KReplaySystem::getDesyncingTimerIdx |
( |
| ) |
const |
|
private |
Finds the desyncing timer index, if one exists.
- Returns
- -1 if there's no desync, 0 if the final timer desyncs, and 1+ if a lap timer desyncs.
Definition at line 178 of file KReplaySystem.cc.
◆ init()
| void KReplaySystem::init |
( |
| ) |
|
|
overridevirtual |
◆ Instance()
◆ OnInit()
Initializes the race configuration as needed for replays.
- Parameters
-
| config | The race configuration instance. |
| arg | Unused optional argument. |
Definition at line 219 of file KReplaySystem.cc.
◆ parseOptions()
| void KReplaySystem::parseOptions |
( |
int | argc, |
|
|
char ** | argv ) |
|
overridevirtual |
Parses non-generic command line options.
The only currently accepted option is the ghost flag.
- Parameters
-
| argc | The number of arguments. |
| argv | The arguments. |
Implements KSystem.
Definition at line 47 of file KReplaySystem.cc.
◆ reportFail()
| void KReplaySystem::reportFail |
( |
const std::string & | msg | ) |
const |
|
private |
Reports failure to file.
- Parameters
-
| msg | The message to report. |
Definition at line 132 of file KReplaySystem.cc.
◆ run()
| bool KReplaySystem::run |
( |
| ) |
|
|
overridevirtual |
Executes a run.
A run consists of replaying a ghost.
- Returns
- Whether the run was successful or not.
Implements KSystem.
Definition at line 35 of file KReplaySystem.cc.
◆ success()
| bool KReplaySystem::success |
( |
| ) |
const |
|
private |
Determines whether the simulation was a success or not.
- Returns
- Whether the simulation was a success or not.
Definition at line 140 of file KReplaySystem.cc.
◆ m_currentGhost
◆ m_currentGhostFileName
| const char* KReplaySystem::m_currentGhostFileName |
|
private |
◆ m_currentRawGhost
| const u8* KReplaySystem::m_currentRawGhost |
|
private |
◆ m_currentRawGhostSize
| size_t KReplaySystem::m_currentRawGhostSize |
|
private |
◆ m_sceneMgr