3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/deps/input/InputDeviceMapper.h"
8#include "mc/deps/input/InputMode.h"
9#include "mc/deps/input/enums/DirectionId.h"
16struct ControllerIDtoClientMap;
29 struct DirectionAttributes;
30 struct ButtonAttributes;
31 struct GameControllerMappingData;
32 struct GamepadStickTurnData;
46 using GameControllerButtonId = int;
48 using GamePadTriggerId = int;
50 using GamePadStickId = int;
52 using GamePadButtonToButtonIdMap = ::std::unordered_multimap<int, ::GameControllerMapper::ButtonAttributes>;
54 using GamePadTriggerToButtonIdMap = ::std::unordered_multimap<int, ::GameControllerMapper::TriggerState>;
56 using GamePadStickToDirectionIdMap = ::std::unordered_multimap<int, ::GameControllerMapper::DirectionAttributes>;
58 using GamePadStickToButtonIdMap = ::std::unordered_multimap<int, uint>;
60 using GamePadStickDirectionToButtonIdMap = ::std::unordered_multimap<::DirectionId, uint>;
62 using GamePadExclusiveButtonIdSet = ::std::set<uint>;
64 using GamePadStickEvents = ::std::unordered_map<int, ::GameControllerStickEvent>;
69 ::ll::TypedStorage<8, 8, double> mLastTime;
70 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, double>> mLastTurnButtonTimeSeconds;
71 ::ll::TypedStorage<8, 24, ::std::vector<::GameControllerMapper::GamepadStickTurnData>> mStickTurnData;
72 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::GameControllerMapper::GameControllerMappingData>>
79 virtual void setMapping(
86 virtual void clearMapping(
int controllerId) ;
90 ::Bedrock::NotNullNonOwnerPtr<::ControllerIDtoClientMap>
const& map
93 virtual ::InputMode getInputMode() const ;
95 virtual
void changeControllerId(
int oldId,
int newId) ;
109 MCAPI
void _enqueueButtonDownUpEvents(
112 ::DirectionId direction
115 MCAPI
void _handleButtonEvent(
119 int alternateControllerId
123 _handleConnectionStateChangedEvent(::
InputEventQueue& eventQueue,
bool controllerConnected,
int controllerId);
128 MCAPI
void _handleTriggerEvent(
134 MCAPI
void _reprocessPreviousStickEvents(
137 ::
std::vector<
int> const& handledEventStickIds
158 MCAPI
void $setMapping(
165 MCAPI
void $clearMapping(
int controllerId);
168 $tick(::
InputEventQueue& eventQueue, ::Bedrock::NotNullNonOwnerPtr<::ControllerIDtoClientMap> const& map);
170 MCFOLD ::InputMode $getInputMode() const;
172 MCAPI
void $changeControllerId(
int oldId,
int newId);
Definition BindingFactory.h:5
Definition GameControllerMapper.h:5
static MCAPI void ** $vftable()
Definition IGameController.h:5
Definition GameControllerMapper.h:38
Definition GameControllerMapper.h:42
Definition GameControllerMapper.h:44
Definition GameControllerMapper.h:36
Definition GameControllerStickEvent.h:5
Definition GameControllerTriggerEvent.h:5