32 virtual bool isTriggered(
const irr::SEvent::SJoystickEvent &ev)
const=0;
50 virtual bool isTriggered(
const irr::SEvent::SJoystickEvent &ev)
const;
70 bool isTriggered(
const irr::SEvent::SJoystickEvent &ev)
const override;
94 bool handleEvent(
const irr::SEvent::SJoystickEvent &ev);
Definition joystick_controller.h:87
bool isKeyDown(GameKeyType b)
Definition joystick_controller.h:128
s16 m_axes_vals[JA_COUNT]
Definition joystick_controller.h:155
void clearWasKeyReleased(GameKeyType b)
Definition joystick_controller.h:114
std::bitset< KeyType::INTERNAL_ENUM_COUNT > m_keys_down
Definition joystick_controller.h:159
void onJoystickConnect(const std::vector< irr::SJoystickInfo > &joystick_infos)
Definition joystick_controller.cpp:201
bool wasKeyReleased(GameKeyType b)
Definition joystick_controller.h:110
f32 doubling_dtime
Definition joystick_controller.h:148
void clear()
Definition joystick_controller.cpp:283
float getMovementDirection()
Definition joystick_controller.cpp:304
bool wasKeyDown(GameKeyType b)
Definition joystick_controller.h:103
std::bitset< KeyType::INTERNAL_ENUM_COUNT > m_keys_released
Definition joystick_controller.h:167
JoystickLayout m_layout
Definition joystick_controller.h:153
float getAxisWithoutDead(JoystickAxis axis)
Definition joystick_controller.cpp:292
void setLayoutFromControllerName(const std::string &name)
Definition joystick_controller.cpp:222
bool wasKeyPressed(GameKeyType b)
Definition joystick_controller.h:119
std::bitset< KeyType::INTERNAL_ENUM_COUNT > m_past_keys_pressed
Definition joystick_controller.h:166
void clearWasKeyPressed(GameKeyType b)
Definition joystick_controller.h:123
JoystickController()
Definition joystick_controller.cpp:191
bool handleEvent(const irr::SEvent::SJoystickEvent &ev)
Definition joystick_controller.cpp:233
f32 m_internal_time
Definition joystick_controller.h:162
void releaseAllKeys()
Definition joystick_controller.h:97
std::bitset< KeyType::INTERNAL_ENUM_COUNT > m_keys_pressed
Definition joystick_controller.h:160
u8 m_joystick_id
Definition joystick_controller.h:157
f32 m_past_pressed_time[KeyType::INTERNAL_ENUM_COUNT]
Definition joystick_controller.h:164
u8 getJoystickId() const
Definition joystick_controller.h:143
s16 getAxis(JoystickAxis axis)
Definition joystick_controller.h:133
float getMovementSpeed()
Definition joystick_controller.cpp:310
@ INTERNAL_ENUM_COUNT
Definition keys.h:100
JoystickAxis
Definition joystick_controller.h:12
@ JA_COUNT
Definition joystick_controller.h:20
@ JA_FRUSTUM_HORIZONTAL
Definition joystick_controller.h:16
@ JA_FRUSTUM_VERTICAL
Definition joystick_controller.h:17
@ JA_FORWARD_MOVE
Definition joystick_controller.h:14
@ JA_SIDEWARD_MOVE
Definition joystick_controller.h:13
Definition joystick_controller.h:56
s16 thresh
Definition joystick_controller.h:77
int direction
Definition joystick_controller.h:76
u16 axis_to_compare
Definition joystick_controller.h:72
virtual ~JoystickAxisCmb()=default
bool isTriggered(const irr::SEvent::SJoystickEvent &ev) const override
Definition joystick_controller.cpp:22
JoystickAxisCmb(GameKeyType key, u16 axis_to_compare, int direction, s16 thresh)
Definition joystick_controller.h:60
JoystickAxisCmb()=default
Definition joystick_controller.h:23
int invert
Definition joystick_controller.h:26
u16 axis_id
Definition joystick_controller.h:24
Definition joystick_controller.h:30
virtual bool isTriggered(const irr::SEvent::SJoystickEvent &ev) const =0
GameKeyType key
Definition joystick_controller.h:34
Definition joystick_controller.h:80
std::vector< JoystickButtonCmb > button_keys
Definition joystick_controller.h:81
JoystickAxisLayout axes[JA_COUNT]
Definition joystick_controller.h:83
s16 axes_deadzone
Definition joystick_controller.h:84
std::vector< JoystickAxisCmb > axis_keys
Definition joystick_controller.h:82