LeviLamina
Loading...
Searching...
No Matches
GameControllerHandler_GameCore.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/threading/TaskGroup.h"
7#include "mc/deps/core/threading/XTaskQueuePort.h"
8#include "mc/deps/core/threading/XTaskQueueRegistrationToken.h"
9#include "mc/external/game_input/GameInputDeviceStatus.h"
10#include "mc/input/GameControllerHandler.h"
11#include "mc/platform/Result.h"
12#include "mc/platform/threading/Mutex.h"
13
14// auto generated forward declare list
15// clang-format off
17class HIDController;
18struct XTaskQueueObject;
19namespace GameInput::v2 { struct GameInputDeviceInfo; }
20namespace GameInput::v2 { struct IGameInputDevice; }
21// clang-format on
22
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 8, uint64> mDeviceStatusChangedToken;
28 ::ll::TypedStorage<8, 8, ::XTaskQueueRegistrationToken> mUserDeviceAssociationChangedToken;
29 ::ll::TypedStorage<8, 8, ::XTaskQueueRegistrationToken> mTaskSubmittedCallbackToken;
30 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::HIDController>> mHIDController;
31 ::ll::TypedStorage<2, 2, short> mScreenWidth;
32 ::ll::TypedStorage<2, 2, short> mScreenHeight;
33 ::ll::TypedStorage<
34 8,
35 8,
36 ::std::unique_ptr<::GameInput::v2::IGameInput, ::Bedrock::ComAdapter<::GameInput::v2::IGameInput>::Deleter>>
37 mGameInput;
38 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mPlayerInputsLock;
39 ::ll::TypedStorage<8, 16, ::std::map<int, ::GameCorePlayerInput>> mPlayerInputs;
40 ::ll::TypedStorage<8, 336, ::TaskGroup> mTaskGroup;
41 ::ll::TypedStorage<8, 8, ::XTaskQueueObject*> mTaskQueue;
42 // NOLINTEND
43
44public:
45 // prevent constructor by default
46 GameControllerHandler_GameCore();
47
48public:
49 // virtual functions
50 // NOLINTBEGIN
51 virtual ~GameControllerHandler_GameCore() /*override*/;
52
53 virtual void refresh() /*override*/;
54
55 virtual float normalizeAxis(float raw, float deadzone) /*override*/;
56
57 virtual void normalizeAxes(float& ioX, float& ioY, float deadzone) /*override*/;
58 // NOLINTEND
59
60public:
61 // member functions
62 // NOLINTBEGIN
63 MCAPI GameControllerHandler_GameCore(
64 ::std::shared_ptr<::HIDController> const& hidController,
65 short screenWidth,
66 short screenHeight
67 );
68
69 MCAPI void _onDeviceStatusChanged(
70 ::GameInput::v2::IGameInputDevice* device,
71 ::GameInput::v2::GameInputDeviceStatus currentStatus
72 );
73
74 MCAPI ::Bedrock::Result<void> initialize();
75 // NOLINTEND
76
77public:
78 // static functions
79 // NOLINTBEGIN
80 MCAPI static ::std::string _generateGameInputKindString(::GameInput::v2::GameInputDeviceInfo const& deviceInfo);
81
82 MCAPI static void _onDeviceStatusChangedCallback(
83 uint64,
84 void* context,
85 ::GameInput::v2::IGameInputDevice* device,
86 uint64,
87 ::GameInput::v2::GameInputDeviceStatus currentStatus,
88 ::GameInput::v2::GameInputDeviceStatus
89 );
90
91 MCAPI static void _taskSubmittedCallback(void* context, ::XTaskQueueObject* taskQueue, ::XTaskQueuePort port);
92 // NOLINTEND
93
94public:
95 // constructor thunks
96 // NOLINTBEGIN
97 MCAPI void* $ctor(::std::shared_ptr<::HIDController> const& hidController, short screenWidth, short screenHeight);
98 // NOLINTEND
99
100public:
101 // destructor thunk
102 // NOLINTBEGIN
103 MCAPI void $dtor();
104 // NOLINTEND
105
106public:
107 // virtual function thunks
108 // NOLINTBEGIN
109 MCAPI void $refresh();
110
111 MCAPI float $normalizeAxis(float raw, float deadzone);
112
113 MCAPI void $normalizeAxes(float& ioX, float& ioY, float deadzone);
114 // NOLINTEND
115
116public:
117 // vftables
118 // NOLINTBEGIN
119 MCNAPI static void** $vftable();
120 // NOLINTEND
121};
Definition GameControllerHandler_GameCore.h:5
static MCAPI void ** $vftable()
Definition GameControllerHandler.h:5
MCAPI void * $ctor()
Definition GameCorePlayerInput.h:5
Definition HIDController.h:5
Definition GameInputDeviceInfo.h:7
Definition IGameInputDevice.h:7
Definition XTaskQueueObject.h:5