#include <RaceConfig.hh>
Initializes the player with parameters specified in the provided ghost file.
In the base game, this class is responsible for managing the race and menu scenarios. The menu scenario mostly pertains to character and vehicle selection in the menus prior to starting a race. In Kinoko, we don't have these menus, so we initialize the race directly through this class.
Definition at line 21 of file RaceConfig.hh.
Classes | |
struct | Player |
struct | Scenario |
Public Types | |
typedef std::function< void(RaceConfig *, void *)> | InitCallback |
Public Member Functions | |
void | init () |
void | initRace () |
void | initControllers () |
Initializes the controllers. | |
void | initGhost () |
Initializes the ghost. | |
const Scenario & | raceScenario () const |
Scenario & | raceScenario () |
void | setGhost (const u8 *rkg) |
Static Public Member Functions | |
static void | RegisterInitCallback (const InitCallback &callback, void *arg) |
static RaceConfig * | CreateInstance () |
static void | DestroyInstance () |
static RaceConfig * | Instance () |
Private Attributes | |
Scenario | m_raceScenario |
RawGhostFile | m_ghost |
Static Private Attributes | |
static RaceConfig * | s_instance = nullptr |
static InitCallback | s_onInitCallback = nullptr |
Host-agnostic way of initializing RaceConfig. The type of the first player must be set to either Local or Ghost. | |
static void * | s_onInitCallbackArg = nullptr |
The argument sent into the callback. This is expected to be reinterpret_casted. | |
Additional Inherited Members | |
![]() | |
![]() | |
static constexpr u16 | getLinkOffset () |
std::function<void(RaceConfig *, void *)> System::RaceConfig::InitCallback |
Definition at line 53 of file RaceConfig.hh.
|
overrideprivate0x80530038 |
Definition at line 78 of file RaceConfig.cc.
|
static0x8052FE58 |
Definition at line 60 of file RaceConfig.cc.
|
static0x8052FFE8 |
Definition at line 67 of file RaceConfig.cc.
|
0x8052DD40 |
Definition at line 10 of file RaceConfig.cc.
|
0x8052F4E8 |
Initializes the controllers.
This is normally scoped within RaceConfig::Scenario, but Kinoko doesn't support menus.
Definition at line 30 of file RaceConfig.cc.
|
0x8052EEF0 |
Initializes the ghost.
This is normally scoped within RaceConfig::Scenario, but Kinoko doesn't support menus.
Definition at line 47 of file RaceConfig.cc.
|
0x805302C4 |
Normally we copy the menu scenario into the race scenario. However, Kinoko doesn't support menus, so we use a callback.
Definition at line 17 of file RaceConfig.cc.
|
inlinestaticnodiscard |
Definition at line 80 of file RaceConfig.hh.
|
inlinenodiscard |
Definition at line 64 of file RaceConfig.hh.
|
inlinenodiscard |
Definition at line 60 of file RaceConfig.hh.
|
inlinestatic |
Definition at line 72 of file RaceConfig.hh.
|
inline |
Definition at line 68 of file RaceConfig.hh.
|
private |
Definition at line 89 of file RaceConfig.hh.
|
private |
Definition at line 88 of file RaceConfig.hh.
|
staticprivate0x809BD728 |
Definition at line 91 of file RaceConfig.hh.
|
staticprivate |
Host-agnostic way of initializing RaceConfig. The type of the first player must be set to either Local or Ghost.
Definition at line 92 of file RaceConfig.hh.
|
staticprivate |
The argument sent into the callback. This is expected to be reinterpret_casted.
Definition at line 93 of file RaceConfig.hh.