#include <KPadController.hh>
Represents a set of controller inputs.
Definition at line 36 of file KPadController.hh.
Public Member Functions | |
| void | reset () |
| bool | isValid () const |
| Checks if the input state is valid. | |
| bool | isButtonsValid () const |
| Checks if there are any invalid buttons. | |
| bool | isStickValid (f32 stick) const |
| Checks if the stick values are within the domain of the physics engine. | |
| bool | isTrickValid () const |
| Checks if the trick input is valid. | |
| bool | accelerate () const |
| bool | brake () const |
| bool | item () const |
| bool | drift () const |
| bool | trickUp () const |
| bool | trickDown () const |
Public Attributes | |
| u16 | buttons |
| u16 | buttonsRaw |
| EGG::Vector2f | stick |
| u8 | stickXRaw |
| u8 | stickYRaw |
| Trick | trick |
| u8 | trickRaw |
| Kinoko::System::RaceInputState::RaceInputState | ( | ) |
Definition at line 106 of file KPadController.cc.
|
inlinevirtual |
Definition at line 38 of file KPadController.hh.
|
inlinenodiscard |
Definition at line 69 of file KPadController.hh.
|
inlinenodiscard |
Definition at line 73 of file KPadController.hh.
|
inlinenodiscard |
Definition at line 81 of file KPadController.hh.
|
inlinenodiscard |
Checks if there are any invalid buttons.
Validation with the previous input state doesn't happen because it doesn't exist. Therefore, we cannot check here if e.g. the drift button is pressed when it shouldn't be.
Definition at line 48 of file KPadController.hh.
|
nodiscard |
Checks if the stick values are within the domain of the physics engine.
The set of valid stick values is \(\{\frac{x-7}{7}|0\leq x\leq 14,\in\mathbb{Z}\}\). It's possible for the stick input to be 8/7 with x = 15, but only with ghost controllers.
Definition at line 143 of file KPadController.cc.
|
inlinenodiscard |
Checks if the trick input is valid.
Definition at line 56 of file KPadController.hh.
|
nodiscard |
Checks if the input state is valid.
Definition at line 123 of file KPadController.cc.
|
inlinenodiscard |
Definition at line 77 of file KPadController.hh.
|
0x8051E85C |
Definition at line 111 of file KPadController.cc.
|
inlinenodiscard |
Definition at line 89 of file KPadController.hh.
|
inlinenodiscard |
Definition at line 85 of file KPadController.hh.
| u16 Kinoko::System::RaceInputState::buttons |
Definition at line 93 of file KPadController.hh.
| u16 Kinoko::System::RaceInputState::buttonsRaw |
Definition at line 94 of file KPadController.hh.
| EGG::Vector2f Kinoko::System::RaceInputState::stick |
Definition at line 95 of file KPadController.hh.
| u8 Kinoko::System::RaceInputState::stickXRaw |
Definition at line 96 of file KPadController.hh.
| u8 Kinoko::System::RaceInputState::stickYRaw |
Definition at line 97 of file KPadController.hh.
| Trick Kinoko::System::RaceInputState::trick |
Definition at line 98 of file KPadController.hh.
| u8 Kinoko::System::RaceInputState::trickRaw |
Definition at line 99 of file KPadController.hh.