|
libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
|
Factory for creating ControllerGyroMapping instances. More...
#include <GyroMappingFactory.h>
Static Public Member Functions | |
| static std::shared_ptr< ControllerGyroMapping > | CreateGyroMappingFromConfig (uint8_t portIndex, std::string id, std::shared_ptr< ConsoleVariable > consoleVariable, std::shared_ptr< ControlDeck > controlDeck) |
| Deserializes a gyro mapping from the configuration string. | |
| static std::shared_ptr< ControllerGyroMapping > | CreateGyroMappingFromSDLInput (uint8_t portIndex, std::shared_ptr< ConsoleVariable > consoleVariable, std::shared_ptr< ControlDeck > controlDeck) |
| Creates a gyro mapping from live SDL input for interactive binding. | |
Factory for creating ControllerGyroMapping instances.
GyroMappingFactory provides static helpers to create ControllerGyroMapping instances that map gyroscope (motion control) input from SDL controllers to game controller gyro output. It supports deserializing gyro mappings from persisted configuration and creating mappings from live SDL input events during interactive binding.
Gyro mappings enable motion-based aim control and other game features that rely on accelerometer/gyroscope input from compatible physical devices.
All factory methods require a ConsoleVariable and ControlDeck to track state and configuration.
Typical usage (within ControlDeck or ConfigUI):
|
static |
Deserializes a gyro mapping from the configuration string.
| portIndex | The controller port index (0-based). |
| id | Configuration string encoding the gyro input source. |
| consoleVariable | ConsoleVariable for persisting the mapping. |
| controlDeck | ControlDeck for physical device access. |
|
static |
Creates a gyro mapping from live SDL input for interactive binding.
| portIndex | The controller port index (0-based). |
| consoleVariable | ConsoleVariable for persisting the mapping. |
| controlDeck | ControlDeck for physical device access. |