|
R-Type
Distributed multiplayer game engine in C++
|
Classes | |
| class | KeyBindings |
| Centralized key binding manager (Singleton) More... | |
Enumerations | |
| enum class | GameAction { MOVE_UP , MOVE_DOWN , MOVE_LEFT , MOVE_RIGHT , SHOOT , PAUSE_MENU , CHAT_OPEN , MENU_NEXT , MENU_PREVIOUS , MENU_CONFIRM , MENU_BACK , COUNT } |
| Enumeration of all bindable game actions. More... | |
Functions | |
| bool | IsGamepadBinding (int binding) |
| Check if a binding value represents a gamepad button. | |
| int | GamepadButtonToBinding (int button) |
| Convert a gamepad button to a binding value. | |
| int | BindingToGamepadButton (int binding) |
| Extract gamepad button from a binding value. | |
Variables | |
| constexpr int | GAMEPAD_BUTTON_OFFSET = 1000 |
| Special constant for gamepad button bindings Gamepad buttons are stored as (GAMEPAD_BUTTON_OFFSET + button_id) | |
|
strong |
Enumeration of all bindable game actions.
| Enumerator | |
|---|---|
| MOVE_UP | |
| MOVE_DOWN | |
| MOVE_LEFT | |
| MOVE_RIGHT | |
| SHOOT | |
| PAUSE_MENU | |
| CHAT_OPEN | |
| MENU_NEXT | |
| MENU_PREVIOUS | |
| MENU_CONFIRM | |
| MENU_BACK | |
| COUNT | |
Definition at line 47 of file KeyBindings.hpp.
|
inline |
Extract gamepad button from a binding value.
Definition at line 40 of file KeyBindings.hpp.
References GAMEPAD_BUTTON_OFFSET.
Referenced by Input::KeyBindings::GetBindingName(), UI::RaylibMenu::HandleKeyboardNavigation(), and GameLoop::processInput().
|
inline |
Convert a gamepad button to a binding value.
Definition at line 33 of file KeyBindings.hpp.
References GAMEPAD_BUTTON_OFFSET.
Referenced by Input::KeyBindings::ResetToDefaults(), and Game::KeyBindingsMenu::Update().
|
inline |
Check if a binding value represents a gamepad button.
Definition at line 26 of file KeyBindings.hpp.
References GAMEPAD_BUTTON_OFFSET.
Referenced by Input::KeyBindings::GetBindingName(), UI::RaylibMenu::HandleKeyboardNavigation(), and GameLoop::processInput().
|
constexpr |
Special constant for gamepad button bindings Gamepad buttons are stored as (GAMEPAD_BUTTON_OFFSET + button_id)
Definition at line 21 of file KeyBindings.hpp.
Referenced by BindingToGamepadButton(), GamepadButtonToBinding(), and IsGamepadBinding().