|
libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
|
Maps an SDL gamepad axis direction to a virtual analog stick direction. More...
#include <SDLAxisDirectionToAxisDirectionMapping.h>
Public Member Functions | |
| 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. | |
| float | GetNormalizedAxisDirectionValue () override |
| Returns the normalised axis value from the SDL axis input. | |
| std::string | GetAxisDirectionMappingId () override |
| Returns the unique string identifier for this mapping. | |
| int8_t | GetMappingType () override |
| Returns the mapping type identifier. | |
| void | SaveToConfig () override |
| Persists this mapping to the application configuration. | |
| void | EraseFromConfig () override |
| Removes this mapping from the application configuration. | |
| std::string | GetPhysicalDeviceName () override |
| Returns the human-readable name of the SDL gamepad device. | |
| std::string | GetPhysicalInputName () override |
| Returns the human-readable name of the bound axis and direction. | |
Public Member Functions inherited from Ship::ControllerAxisDirectionMapping | |
| ControllerAxisDirectionMapping (PhysicalDeviceType physicalDeviceType, uint8_t portIndex, StickIndex stickIndex, Direction direction, std::shared_ptr< ControlDeck > controlDeck=nullptr) | |
| Constructs a ControllerAxisDirectionMapping. | |
| virtual | ~ControllerAxisDirectionMapping () |
| Direction | GetDirection () |
| Returns the direction this mapping represents. | |
| void | SetPortIndex (uint8_t portIndex) |
| Sets the controller port index for this mapping. | |
| std::shared_ptr< ControlDeck > | GetControlDeck () const |
Public Member Functions inherited from Ship::ControllerInputMapping | |
| ControllerInputMapping (PhysicalDeviceType physicalDeviceType) | |
| Constructs a ControllerInputMapping for the given physical device type. | |
| ~ControllerInputMapping () | |
Public Member Functions inherited from Ship::ControllerMapping | |
| ControllerMapping (PhysicalDeviceType physicalDeviceType) | |
| Constructs a ControllerMapping for the given physical device type. | |
| ~ControllerMapping () | |
| PhysicalDeviceType | GetPhysicalDeviceType () |
| Returns the physical device type for this mapping. | |
Public Member Functions inherited from Ship::SDLAxisDirectionToAnyMapping | |
| SDLAxisDirectionToAnyMapping (int32_t sdlControllerAxis, int32_t axisDirection) | |
| Constructs an SDL axis-direction mapping. | |
| virtual | ~SDLAxisDirectionToAnyMapping () |
| Destructor. | |
| bool | AxisIsTrigger () |
| Tests whether this axis represents a trigger (e.g. LT / RT). | |
| bool | AxisIsStick () |
| Tests whether this axis represents an analog stick axis. | |
Protected Attributes | |
| std::shared_ptr< ConsoleVariable > | mConsoleVariable |
| std::shared_ptr< ControlDeck > | mControlDeck |
Protected Attributes inherited from Ship::ControllerAxisDirectionMapping | |
| uint8_t | mPortIndex |
| StickIndex | mStickIndex |
| Direction | mDirection |
| std::shared_ptr< ControlDeck > | mControlDeck |
Protected Attributes inherited from Ship::ControllerMapping | |
| PhysicalDeviceType | mPhysicalDeviceType |
Protected Attributes inherited from Ship::SDLAxisDirectionToAnyMapping | |
| SDL_GameControllerAxis | mControllerAxis |
| AxisDirection | mAxisDirection |
Maps an SDL gamepad axis direction to a virtual analog stick direction.
Reads the raw SDL axis value and converts it into a normalised deflection for the configured stick and direction.
| Ship::SDLAxisDirectionToAxisDirectionMapping::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.
| portIndex | The controller port index. |
| stickIndex | Which analog stick this mapping targets. |
| direction | The stick direction to activate. |
| sdlControllerAxis | The SDL controller axis index. |
| axisDirection | The axis half to bind (NEGATIVE or POSITIVE). |
|
overridevirtual |
Removes this mapping from the application configuration.
Implements Ship::ControllerAxisDirectionMapping.
|
overridevirtual |
Returns the unique string identifier for this mapping.
Implements Ship::ControllerAxisDirectionMapping.
|
overridevirtual |
Returns the mapping type identifier.
Reimplemented from Ship::ControllerAxisDirectionMapping.
|
overridevirtual |
Returns the normalised axis value from the SDL axis input.
Implements Ship::ControllerAxisDirectionMapping.
|
overridevirtual |
Returns the human-readable name of the SDL gamepad device.
Reimplemented from Ship::ControllerMapping.
|
overridevirtual |
Returns the human-readable name of the bound axis and direction.
Reimplemented from Ship::ControllerInputMapping.
|
overridevirtual |
Persists this mapping to the application configuration.
Implements Ship::ControllerAxisDirectionMapping.
|
protected |
|
protected |