Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Toggle main menu visibility
Loading...
Searching...
No Matches
KReplaySystem.hh
1
#pragma once
2
3
#include "host/KSystem.hh"
4
5
#include <egg/core/SceneManager.hh>
6
7
#include <game/system/RaceConfig.hh>
8
9
namespace
Kinoko {
10
12
class
KReplaySystem :
public
KSystem
{
13
public
:
14
void
init
()
override
;
15
void
calc
()
override
;
16
bool
run
()
override
;
17
void
parseOptions
(
int
argc,
char
**argv)
override
;
18
19
static
KReplaySystem *CreateInstance();
20
static
void
DestroyInstance();
21
22
static
KReplaySystem *Instance() {
23
return
static_cast<
KReplaySystem *
>
(s_instance);
24
}
25
26
private
:
27
typedef
std::pair<const System::Timer &, const System::Timer &> DesyncingTimerPair;
28
29
KReplaySystem();
30
KReplaySystem(
const
KReplaySystem &) =
delete
;
31
KReplaySystem(KReplaySystem &&) =
delete
;
32
~KReplaySystem()
override
;
33
34
bool
calcEnd
()
const
;
35
void
reportFail
(
const
std::string &msg)
const
;
36
37
bool
success
()
const
;
38
s32
getDesyncingTimerIdx
()
const
;
39
DesyncingTimerPair
getDesyncingTimer
(s32 i)
const
;
40
41
static
void
OnInit
(
System::RaceConfig
*config,
void
*arg);
42
43
EGG::SceneManager
*m_sceneMgr;
44
45
const
char
*m_currentGhostFileName;
46
const
System::GhostFile
*m_currentGhost;
47
const
u8 *m_currentRawGhost;
48
size_t
m_currentRawGhostSize;
49
};
50
51
}
// namespace Kinoko
Kinoko::EGG::SceneManager
Manages the scene stack and transitions between scenes.
Definition
SceneManager.hh:17
Kinoko::KReplaySystem::getDesyncingTimerIdx
s32 getDesyncingTimerIdx() const
Finds the desyncing timer index, if one exists.
Definition
KReplaySystem.cc:180
Kinoko::KReplaySystem::parseOptions
void parseOptions(int argc, char **argv) override
Parses non-generic command line options.
Definition
KReplaySystem.cc:49
Kinoko::KReplaySystem::reportFail
void reportFail(const std::string &msg) const
Reports failure to file.
Definition
KReplaySystem.cc:134
Kinoko::KReplaySystem::calcEnd
bool calcEnd() const
Determines whether or not the ghost simulation should end.
Definition
KReplaySystem.cc:117
Kinoko::KReplaySystem::run
bool run() override
Executes a run.
Definition
KReplaySystem.cc:37
Kinoko::KReplaySystem::OnInit
static void OnInit(System::RaceConfig *config, void *arg)
Initializes the race configuration as needed for replays.
Definition
KReplaySystem.cc:221
Kinoko::KReplaySystem::getDesyncingTimer
DesyncingTimerPair getDesyncingTimer(s32 i) const
Gets the desyncing timer according to the index.
Definition
KReplaySystem.cc:198
Kinoko::KReplaySystem::success
bool success() const
Determines whether the simulation was a success or not.
Definition
KReplaySystem.cc:142
Kinoko::KReplaySystem::calc
void calc() override
Executes a frame.
Definition
KReplaySystem.cc:30
Kinoko::KReplaySystem::init
void init() override
Initializes the system.
Definition
KReplaySystem.cc:15
Kinoko::KSystem
Base interface for a Kinoko system.
Definition
KSystem.hh:10
Kinoko::System::GhostFile
Parsed representation of a binary ghost file.
Definition
GhostFile.hh:77
Kinoko::System::RaceConfig
Initializes the player with parameters specified in the provided ghost file.
Definition
RaceConfig.hh:23
host
KReplaySystem.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.17.0