libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
SDLButtonToAxisDirectionMapping.h
Go to the documentation of this file.
3#include <memory>
4
5namespace Ship {
6class ConsoleVariable;
7class ControlDeck;
8
16 public:
24 SDLButtonToAxisDirectionMapping(uint8_t portIndex, StickIndex stickIndex, Direction direction,
25 int32_t sdlControllerButton, std::shared_ptr<ControlDeck> controlDeck = nullptr,
26 std::shared_ptr<ConsoleVariable> consoleVariable = nullptr);
27
30
32 std::string GetAxisDirectionMappingId() override;
33
35 int8_t GetMappingType() override;
36
38 void SaveToConfig() override;
39
41 void EraseFromConfig() override;
42
44 std::string GetPhysicalDeviceName() override;
45
47 std::string GetPhysicalInputName() override;
48
49 protected:
50 std::shared_ptr<ConsoleVariable> mConsoleVariable;
51 std::shared_ptr<ControlDeck> mControlDeck;
52};
53} // 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 button to any controller input.
Definition SDLButtonToAnyMapping.h:15
Maps an SDL gamepad button to a virtual analog stick direction.
Definition SDLButtonToAxisDirectionMapping.h:15
std::shared_ptr< ConsoleVariable > mConsoleVariable
Definition SDLButtonToAxisDirectionMapping.h:50
SDLButtonToAxisDirectionMapping(uint8_t portIndex, StickIndex stickIndex, Direction direction, int32_t sdlControllerButton, std::shared_ptr< ControlDeck > controlDeck=nullptr, std::shared_ptr< ConsoleVariable > consoleVariable=nullptr)
Constructs an SDL button-to-axis-direction mapping.
float GetNormalizedAxisDirectionValue() override
Returns the normalised axis value (0 or MAX_AXIS_RANGE).
void EraseFromConfig() override
Removes this mapping from the application configuration.
void SaveToConfig() override
Persists this mapping to the application configuration.
std::string GetAxisDirectionMappingId() override
Returns the unique string identifier for this mapping.
std::string GetPhysicalInputName() override
Returns the human-readable name of the bound button.
std::string GetPhysicalDeviceName() override
Returns the human-readable name of the SDL gamepad device.
int8_t GetMappingType() override
Returns the mapping type identifier.
std::shared_ptr< ControlDeck > mControlDeck
Definition SDLButtonToAxisDirectionMapping.h:51
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