A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
KPadDirector.hh
1#pragma once
2
3#include "game/system/KPadController.hh"
4
5namespace Host {
6
7class Context;
8
9} // namespace Host
10
11namespace System {
12
16 friend class Host::Context;
17
18public:
19 void calc();
20 void calcPads();
21
23 void clear() {}
24
25 void reset();
26 void startGhostProxies();
27 void endGhostProxies();
28
29 [[nodiscard]] const KPadPlayer &playerInput() const {
30 return m_playerInput;
31 }
32
33 [[nodiscard]] KPadHostController *hostController() {
34 return m_hostController;
35 }
36
37 void setGhostPad(const u8 *inputs, bool driftIsAuto);
38 void setHostPad(bool driftIsAuto);
39
40 static KPadDirector *CreateInstance();
41 static void DestroyInstance();
42
43 [[nodiscard]] static KPadDirector *Instance() {
44 return s_instance;
45 }
46
47private:
49 ~KPadDirector() override;
50
51 KPadPlayer m_playerInput;
52 KPadGhostController *m_ghostController;
53 KPadHostController *m_hostController;
54
55 static KPadDirector *s_instance;
56};
57
58} // namespace System
An interface for ensuring certain structures and classes are destroyed with the heap.
Definition Disposer.hh:11
Contexts can be used to restore a previous memory state for the current session.
Definition Context.hh:59
The highest level abstraction for controller processing.
The abstraction of a controller object but for ghost playback.
The abstraction of a controller object but for external usage.
A specialized KPad for player input, as opposed to CPU players for example.
Represents the host application.
Definition HeapCommon.hh:9
High-level handling for generic system operations, such as input reading, race configuration,...
Definition CourseMap.cc:5