47 virtual bool isTriggered(
const irr::SEvent::SJoystickEvent &ev)
const=0;
65 virtual bool isTriggered(
const irr::SEvent::SJoystickEvent &ev)
const;
85 bool isTriggered(
const irr::SEvent::SJoystickEvent &ev)
const override;
109 bool handleEvent(
const irr::SEvent::SJoystickEvent &ev);
Definition: joystick_controller.h:102
bool isKeyDown(GameKeyType b)
Definition: joystick_controller.h:143
s16 m_axes_vals[JA_COUNT]
Definition: joystick_controller.h:165
void clearWasKeyReleased(GameKeyType b)
Definition: joystick_controller.h:129
std::bitset< KeyType::INTERNAL_ENUM_COUNT > m_keys_down
Definition: joystick_controller.h:169
void onJoystickConnect(const std::vector< irr::SJoystickInfo > &joystick_infos)
Definition: joystick_controller.cpp:216
bool wasKeyReleased(GameKeyType b)
Definition: joystick_controller.h:125
f32 doubling_dtime
Definition: joystick_controller.h:158
void clear()
Definition: joystick_controller.cpp:298
float getMovementDirection()
Definition: joystick_controller.cpp:319
bool wasKeyDown(GameKeyType b)
Definition: joystick_controller.h:118
std::bitset< KeyType::INTERNAL_ENUM_COUNT > m_keys_released
Definition: joystick_controller.h:177
JoystickLayout m_layout
Definition: joystick_controller.h:163
float getAxisWithoutDead(JoystickAxis axis)
Definition: joystick_controller.cpp:307
void setLayoutFromControllerName(const std::string &name)
Definition: joystick_controller.cpp:237
bool wasKeyPressed(GameKeyType b)
Definition: joystick_controller.h:134
std::bitset< KeyType::INTERNAL_ENUM_COUNT > m_past_keys_pressed
Definition: joystick_controller.h:176
void clearWasKeyPressed(GameKeyType b)
Definition: joystick_controller.h:138
JoystickController()
Definition: joystick_controller.cpp:206
bool handleEvent(const irr::SEvent::SJoystickEvent &ev)
Definition: joystick_controller.cpp:248
f32 m_internal_time
Definition: joystick_controller.h:172
void releaseAllKeys()
Definition: joystick_controller.h:112
std::bitset< KeyType::INTERNAL_ENUM_COUNT > m_keys_pressed
Definition: joystick_controller.h:170
u8 m_joystick_id
Definition: joystick_controller.h:167
f32 m_past_pressed_time[KeyType::INTERNAL_ENUM_COUNT]
Definition: joystick_controller.h:174
s16 getAxis(JoystickAxis axis)
Definition: joystick_controller.h:148
float getMovementSpeed()
Definition: joystick_controller.cpp:325
@ INTERNAL_ENUM_COUNT
Definition: keys.h:115
JoystickAxis
Definition: joystick_controller.h:27
@ JA_COUNT
Definition: joystick_controller.h:35
@ JA_FRUSTUM_HORIZONTAL
Definition: joystick_controller.h:31
@ JA_FRUSTUM_VERTICAL
Definition: joystick_controller.h:32
@ JA_FORWARD_MOVE
Definition: joystick_controller.h:29
@ JA_SIDEWARD_MOVE
Definition: joystick_controller.h:28
Definition: joystick_controller.h:71
s16 thresh
Definition: joystick_controller.h:92
int direction
Definition: joystick_controller.h:91
u16 axis_to_compare
Definition: joystick_controller.h:87
virtual ~JoystickAxisCmb()=default
bool isTriggered(const irr::SEvent::SJoystickEvent &ev) const override
Definition: joystick_controller.cpp:37
JoystickAxisCmb(GameKeyType key, u16 axis_to_compare, int direction, s16 thresh)
Definition: joystick_controller.h:75
JoystickAxisCmb()=default
Definition: joystick_controller.h:38
int invert
Definition: joystick_controller.h:41
u16 axis_id
Definition: joystick_controller.h:39
Definition: joystick_controller.h:45
virtual bool isTriggered(const irr::SEvent::SJoystickEvent &ev) const =0
GameKeyType key
Definition: joystick_controller.h:49
Definition: joystick_controller.h:95
std::vector< JoystickButtonCmb > button_keys
Definition: joystick_controller.h:96
JoystickAxisLayout axes[JA_COUNT]
Definition: joystick_controller.h:98
s16 axes_deadzone
Definition: joystick_controller.h:99
std::vector< JoystickAxisCmb > axis_keys
Definition: joystick_controller.h:97