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 Kinoko {
6
7namespace Host {
8
9class Context;
10
11} // namespace Host
12
13namespace System {
14
18 friend class Host::Context;
19
20public:
21 void calc();
22 void calcPads();
23
25 void clear() {}
26
27 void reset();
28 void startGhostProxies();
29 void endGhostProxies();
30
31 [[nodiscard]] const KPadPlayer &playerInput() const {
32 return m_playerInput;
33 }
34
35 [[nodiscard]] KPadHostController *hostController() {
36 return m_hostController;
37 }
38
39 void setGhostPad(const u8 *inputs, bool driftIsAuto);
40 void setHostPad(bool driftIsAuto);
41
42 static KPadDirector *CreateInstance();
43 static void DestroyInstance();
44
45 [[nodiscard]] static KPadDirector *Instance() {
46 return s_instance;
47 }
48
49private:
51 ~KPadDirector() override;
52
53 KPadPlayer m_playerInput;
54 KPadGhostController *m_ghostController;
55 KPadHostController *m_hostController;
56
57 static KPadDirector *s_instance;
58};
59
60} // namespace System
61
62} // namespace Kinoko
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:70
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.