|
libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
|
Maps rumble (haptic feedback) output to a physical controller. More...
#include <ControllerRumbleMapping.h>
Public Member Functions | |
| ControllerRumbleMapping (PhysicalDeviceType physicalDeviceType, uint8_t portIndex, uint8_t lowFrequencyIntensityPercentage, uint8_t highFrequencyIntensityPercentage) | |
| Constructs a ControllerRumbleMapping. | |
| ~ControllerRumbleMapping () | |
| virtual void | StartRumble ()=0 |
| Activates rumble on the physical device. | |
| virtual void | StopRumble ()=0 |
| Deactivates rumble on the physical device. | |
| virtual void | SetLowFrequencyIntensity (uint8_t intensityPercentage) |
| Sets the low-frequency rumble intensity. | |
| virtual void | SetHighFrequencyIntensity (uint8_t intensityPercentage) |
| Sets the high-frequency rumble intensity. | |
| uint8_t | GetLowFrequencyIntensityPercentage () |
| Returns the current low-frequency rumble intensity percentage. | |
| uint8_t | GetHighFrequencyIntensityPercentage () |
| Returns the current high-frequency rumble intensity percentage. | |
| bool | HighFrequencyIntensityIsDefault () |
| Checks whether the high-frequency intensity is at its default value. | |
| bool | LowFrequencyIntensityIsDefault () |
| Checks whether the low-frequency intensity is at its default value. | |
| void | ResetHighFrequencyIntensityToDefault () |
| Resets high-frequency rumble intensity to DEFAULT_HIGH_FREQUENCY_RUMBLE_PERCENTAGE. | |
| void | ResetLowFrequencyIntensityToDefault () |
| Resets low-frequency rumble intensity to DEFAULT_LOW_FREQUENCY_RUMBLE_PERCENTAGE. | |
| void | SetPortIndex (uint8_t portIndex) |
| Sets the controller port index for this mapping. | |
| virtual std::string | GetRumbleMappingId ()=0 |
| Returns a unique string identifier for this rumble mapping. | |
| virtual void | SaveToConfig ()=0 |
| Persists this mapping to the application configuration. | |
| virtual void | EraseFromConfig ()=0 |
| Removes this mapping from the application configuration. | |
Public Member Functions inherited from Ship::ControllerMapping | |
| ControllerMapping (PhysicalDeviceType physicalDeviceType) | |
| Constructs a ControllerMapping for the given physical device type. | |
| ~ControllerMapping () | |
| virtual std::string | GetPhysicalDeviceName () |
| Returns a human-readable name for the physical device associated with this mapping. | |
| PhysicalDeviceType | GetPhysicalDeviceType () |
| Returns the physical device type for this mapping. | |
Protected Attributes | |
| uint8_t | mPortIndex |
| uint8_t | mLowFrequencyIntensityPercentage |
| uint8_t | mHighFrequencyIntensityPercentage |
Protected Attributes inherited from Ship::ControllerMapping | |
| PhysicalDeviceType | mPhysicalDeviceType |
Maps rumble (haptic feedback) output to a physical controller.
Provides low-frequency and high-frequency rumble intensity control. Subclasses implement the device-specific start/stop rumble behaviour for their hardware.
| Ship::ControllerRumbleMapping::ControllerRumbleMapping | ( | PhysicalDeviceType | physicalDeviceType, |
| uint8_t | portIndex, | ||
| uint8_t | lowFrequencyIntensityPercentage, | ||
| uint8_t | highFrequencyIntensityPercentage | ||
| ) |
Constructs a ControllerRumbleMapping.
| physicalDeviceType | The type of physical device this mapping targets. |
| portIndex | The controller port index this mapping is assigned to. |
| lowFrequencyIntensityPercentage | Initial low-frequency rumble intensity percentage. |
| highFrequencyIntensityPercentage | Initial high-frequency rumble intensity percentage. |
| Ship::ControllerRumbleMapping::~ControllerRumbleMapping | ( | ) |
|
pure virtual |
Removes this mapping from the application configuration.
Implemented in Ship::SDLRumbleMapping.
| uint8_t Ship::ControllerRumbleMapping::GetHighFrequencyIntensityPercentage | ( | ) |
Returns the current high-frequency rumble intensity percentage.
| uint8_t Ship::ControllerRumbleMapping::GetLowFrequencyIntensityPercentage | ( | ) |
Returns the current low-frequency rumble intensity percentage.
|
pure virtual |
Returns a unique string identifier for this rumble mapping.
Implemented in Ship::SDLRumbleMapping.
| bool Ship::ControllerRumbleMapping::HighFrequencyIntensityIsDefault | ( | ) |
Checks whether the high-frequency intensity is at its default value.
| bool Ship::ControllerRumbleMapping::LowFrequencyIntensityIsDefault | ( | ) |
Checks whether the low-frequency intensity is at its default value.
| void Ship::ControllerRumbleMapping::ResetHighFrequencyIntensityToDefault | ( | ) |
Resets high-frequency rumble intensity to DEFAULT_HIGH_FREQUENCY_RUMBLE_PERCENTAGE.
| void Ship::ControllerRumbleMapping::ResetLowFrequencyIntensityToDefault | ( | ) |
Resets low-frequency rumble intensity to DEFAULT_LOW_FREQUENCY_RUMBLE_PERCENTAGE.
|
pure virtual |
Persists this mapping to the application configuration.
Implemented in Ship::SDLRumbleMapping.
|
virtual |
Sets the high-frequency rumble intensity.
| intensityPercentage | The intensity as a percentage (0–100). |
Reimplemented in Ship::SDLRumbleMapping.
|
virtual |
Sets the low-frequency rumble intensity.
| intensityPercentage | The intensity as a percentage (0–100). |
Reimplemented in Ship::SDLRumbleMapping.
| void Ship::ControllerRumbleMapping::SetPortIndex | ( | uint8_t | portIndex | ) |
Sets the controller port index for this mapping.
| portIndex | The new port index. |
|
pure virtual |
Activates rumble on the physical device.
Implemented in Ship::SDLRumbleMapping.
|
pure virtual |
Deactivates rumble on the physical device.
Implemented in Ship::SDLRumbleMapping.
|
protected |
|
protected |
|
protected |