|
coastline 0.0.4
|
#include <array>#include <cstddef>#include <string>#include <string_view>#include <vector>#include <SDL3/SDL.h>

Go to the source code of this file.
Classes | |
| struct | coastline::ControlPreset |
| A set of bindings of every action, in the syntax of the Controls section. More... | |
| struct | coastline::ControlSource |
| A button or the half of an axis of a gamepad that drives an action. More... | |
| class | coastline::ControlBindings |
| Configured action sources, player devices, and stick dead zone for an input owner. More... | |
Namespaces | |
| namespace | coastline |
Functions | |
| constexpr ControlPreset | coastline::RaceControlPreset (std::string_view name, const std::array< std::string_view, RACE_CONTROL_ACTIONS > &race) |
| void | coastline::LoadControls (const GameConfig &config) |
Read the Controls section of config: the preset of the Preset key, the default for an absent or unknown preset, with each action key present replacing the binding of the preset, the device of each player, and the dead zone of the axes. | |
| std::string_view | coastline::PlayerDevice (std::size_t player) |
| bool | coastline::IsControlAnalog (ControlAction action) |
| int | coastline::ReadControl (SDL_Gamepad *gamepad, ControlAction action) |
Variables | |
| constexpr std::array< std::string_view, CONTROL_ACTION_COUNT > | coastline::CONTROL_KEYS |
| The keys of the Controls section, by ControlAction. | |
| constexpr std::string_view | coastline::CONTROL_PRESET_KEY = "Preset" |
| The key of the Controls section that chooses a preset. | |
| constexpr std::string_view | coastline::DEAD_ZONE_KEY = "DeadZone" |
| The key of the Controls section with the share of the travel of an axis that reads as 0. | |
| constexpr std::array< std::string_view, 2 > | coastline::PLAYER_DEVICE_KEYS {"Player1", "Player2"} |
| The keys of the Controls section that choose the input device of each player. | |
| constexpr ControlPreset | coastline::DEFAULT_CONTROL_PRESET |
| The preset of an absent or unknown Preset key. | |
| constexpr std::size_t | coastline::RACE_CONTROL_ACTIONS = CONTROL_CHASE_CAMERA + 1 |
| The actions of a race, from CONTROL_STEER_LEFT to CONTROL_CHASE_CAMERA. | |
| constexpr std::array< ControlPreset, 7 > | coastline::CONTROL_PRESETS |
| The presets the Preset key chooses from, the first the default. | |
| constexpr int | coastline::CONTROL_FULL = 32768 |
| The magnitude of a button held down or of an axis at its end. | |