libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
SDLAxisDirectionToAxisDirectionMapping.h
Go to the documentation of this file.
3#include <memory>
4
5namespace Ship {
6class ConsoleVariable;
7class ControlDeck;
8
17 public:
26 SDLAxisDirectionToAxisDirectionMapping(uint8_t portIndex, StickIndex stickIndex, Direction direction,
27 int32_t sdlControllerAxis, int32_t axisDirection,
28 std::shared_ptr<ControlDeck> controlDeck = nullptr,
29 std::shared_ptr<ConsoleVariable> consoleVariable = nullptr);
30
33
35 std::string GetAxisDirectionMappingId() override;
36
38 int8_t GetMappingType() override;
39
41 void SaveToConfig() override;
42
44 void EraseFromConfig() override;
45
47 std::string GetPhysicalDeviceName() override;
48
50 std::string GetPhysicalInputName() override;
51
52 protected:
53 std::shared_ptr<ConsoleVariable> mConsoleVariable;
54 std::shared_ptr<ControlDeck> mControlDeck;
55};
56} // namespace Ship
Maps a physical input to a virtual analog stick direction.
Definition ControllerAxisDirectionMapping.h:27
Base class for mappings that bind an SDL gamepad axis direction to any controller input.
Definition SDLAxisDirectionToAnyMapping.h:14
Maps an SDL gamepad axis direction to a virtual analog stick direction.
Definition SDLAxisDirectionToAxisDirectionMapping.h:16
void SaveToConfig() override
Persists this mapping to the application configuration.
SDLAxisDirectionToAxisDirectionMapping(uint8_t portIndex, StickIndex stickIndex, Direction direction, int32_t sdlControllerAxis, int32_t axisDirection, std::shared_ptr< ControlDeck > controlDeck=nullptr, std::shared_ptr< ConsoleVariable > consoleVariable=nullptr)
Constructs an SDL axis-direction-to-axis-direction mapping.
std::string GetAxisDirectionMappingId() override
Returns the unique string identifier for this mapping.
std::shared_ptr< ControlDeck > mControlDeck
Definition SDLAxisDirectionToAxisDirectionMapping.h:54
float GetNormalizedAxisDirectionValue() override
Returns the normalised axis value from the SDL axis input.
std::string GetPhysicalInputName() override
Returns the human-readable name of the bound axis and direction.
std::string GetPhysicalDeviceName() override
Returns the human-readable name of the SDL gamepad device.
std::shared_ptr< ConsoleVariable > mConsoleVariable
Definition SDLAxisDirectionToAxisDirectionMapping.h:53
int8_t GetMappingType() override
Returns the mapping type identifier.
void EraseFromConfig() override
Removes this mapping from the application configuration.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
Direction
Identifies the direction component of an axis mapping.
Definition ControllerAxisDirectionMapping.h:18
StickIndex
Identifies which analog stick an axis mapping applies to.
Definition ControllerAxisDirectionMapping.h:15