LeviLamina
Loading...
Searching...
No Matches
GameControllerManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/SubClientId.h"
7#include "mc/deps/input/interface/ControllerRefreshState.h"
8#include "mc/deps/input/interface/GameControllerButtonState.h"
9#include "mc/deps/input/interface/GameControllerErrorType.h"
10#include "mc/deps/input/interface/GameControllerStickState.h"
11#include "mc/deps/input/interface/IGameControllerManager.h"
12
13// auto generated forward declare list
14// clang-format off
15class GameController;
16class IGameController;
17// clang-format on
18
20public:
21 // member variables
22 // NOLINTBEGIN
23 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::GameController>>> mGameControllers;
24 ::ll::TypedStorage<8, 8, uint64> mMaxGameControllerButtons;
25 ::ll::TypedStorage<1, 1, bool> mIsActive;
26 ::ll::TypedStorage<8, 24, ::std::vector<void const*>> mConsumerRegistry;
27 ::ll::TypedStorage<4, 4, ::ControllerRefreshState> mControllerRefreshState;
28 ::ll::TypedStorage<1, 1, uchar> mClientControllerCount;
29 ::ll::TypedStorage<8, 64, ::std::function<::GameControllerErrorType()>>
30 mPlatformSpecificControllerErrorRetrievalFunc;
31 // NOLINTEND
32
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 virtual ~GameControllerManager() /*override*/ = default;
37
38 virtual ::std::weak_ptr<::IGameController> getGameController(int id) /*override*/;
39
40 virtual ::std::vector<::std::weak_ptr<::IGameController>> getConnectedGameControllers() /*override*/;
41
42 virtual ::std::vector<::std::weak_ptr<::IGameController>> getGameControllersInUse() /*override*/;
43
44 virtual bool hasAdequateConnectedGameController() const /*override*/;
45
46 virtual bool hasAdequateConnectedGameControllers(uint64 const playerCount) const /*override*/;
47
48 virtual uint64 getMaxGameControllerButtons() const /*override*/;
49
50 virtual void registerConsumer(void const* token) /*override*/;
51
52 virtual void unregisterConsumer(void const* token) /*override*/;
53
54 virtual void setControllerRefreshState(::ControllerRefreshState state) /*override*/;
55
56 virtual ::ControllerRefreshState getControllerRefreshState() const /*override*/;
57
58 virtual ::GameControllerErrorType getPlatformSpecificControllerError() const /*override*/;
59
60 virtual void
61 setPlatformSpecificControllerErrorRetrievalFunc(::std::function<::GameControllerErrorType()>&& lambda) /*override*/;
62
63 virtual void resetClientControllerCount() /*override*/;
64
65 virtual void addClientHasAdequateConnectedController(int, bool const, ::SubClientId) /*override*/;
66 // NOLINTEND
67
68public:
69 // member functions
70 // NOLINTBEGIN
72
73 MCAPI void
74 feedButton(int gameControllerId, int buttonId, ::GameControllerButtonState buttonState, bool allowRemapping);
75
76 MCAPI void feedChangeUser(int gameControllerId, bool restrictToControllerIdChange);
77
78 MCAPI void feedJoinGame(int gameControllerId, bool isConfirmation);
79
80 MCAPI void feedStick(int gameControllerId, int stickId, ::GameControllerStickState state, float x, float y);
81
82 MCAPI void feedTrigger(int gameControllerId, int triggerId, float magnitude);
83
84 MCAPI void setGameControllerConnected(int gameControllerId, bool isConnected);
85 // NOLINTEND
86
87public:
88 // static variables
89 // NOLINTBEGIN
90 MCAPI static ::GameControllerManager& sGamePadManager();
91 // NOLINTEND
92
93public:
94 // constructor thunks
95 // NOLINTBEGIN
96 MCAPI void* $ctor();
97 // NOLINTEND
98
99public:
100 // virtual function thunks
101 // NOLINTBEGIN
102 MCAPI ::std::weak_ptr<::IGameController> $getGameController(int id);
103
104 MCAPI ::std::vector<::std::weak_ptr<::IGameController>> $getConnectedGameControllers();
105
106 MCAPI ::std::vector<::std::weak_ptr<::IGameController>> $getGameControllersInUse();
107
108 MCAPI bool $hasAdequateConnectedGameController() const;
109
110 MCAPI bool $hasAdequateConnectedGameControllers(uint64 const playerCount) const;
111
112 MCFOLD uint64 $getMaxGameControllerButtons() const;
113
114 MCAPI void $registerConsumer(void const* token);
115
116 MCAPI void $unregisterConsumer(void const* token);
117
118 MCFOLD void $setControllerRefreshState(::ControllerRefreshState state);
119
120 MCFOLD ::ControllerRefreshState $getControllerRefreshState() const;
121
122 MCAPI ::GameControllerErrorType $getPlatformSpecificControllerError() const;
123
124 MCAPI void $setPlatformSpecificControllerErrorRetrievalFunc(::std::function<::GameControllerErrorType()>&& lambda);
125
126 MCAPI void $resetClientControllerCount();
127 // NOLINTEND
128
129public:
130 // vftables
131 // NOLINTBEGIN
132 MCNAPI static void** $vftable();
133 // NOLINTEND
134};
Definition GameControllerManager.h:5
static MCAPI void ** $vftable()
Definition GameController.h:5
Definition IGameControllerManager.h:5
Definition IGameController.h:5
STL namespace.