7#include <IEventReceiver.h>
34 virtual bool isTriggered(
const irr::SEvent::SJoystickEvent &ev)
const=0;
52 virtual bool isTriggered(
const irr::SEvent::SJoystickEvent &ev)
const;
72 bool isTriggered(
const irr::SEvent::SJoystickEvent &ev)
const override;
96 bool handleEvent(
const irr::SEvent::SJoystickEvent &ev);
Definition joystick_controller.h:89
bool isKeyDown(GameKeyType b)
Definition joystick_controller.h:130
s16 m_axes_vals[JA_COUNT]
Definition joystick_controller.h:157
void clearWasKeyReleased(GameKeyType b)
Definition joystick_controller.h:116
std::bitset< KeyType::INTERNAL_ENUM_COUNT > m_keys_down
Definition joystick_controller.h:161
void onJoystickConnect(const std::vector< irr::SJoystickInfo > &joystick_infos)
Definition joystick_controller.cpp:201
bool wasKeyReleased(GameKeyType b)
Definition joystick_controller.h:112
f32 doubling_dtime
Definition joystick_controller.h:150
void clear()
Definition joystick_controller.cpp:283
float getMovementDirection()
Definition joystick_controller.cpp:304
bool wasKeyDown(GameKeyType b)
Definition joystick_controller.h:105
std::bitset< KeyType::INTERNAL_ENUM_COUNT > m_keys_released
Definition joystick_controller.h:169
JoystickLayout m_layout
Definition joystick_controller.h:155
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:121
std::bitset< KeyType::INTERNAL_ENUM_COUNT > m_past_keys_pressed
Definition joystick_controller.h:168
void clearWasKeyPressed(GameKeyType b)
Definition joystick_controller.h:125
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:164
void releaseAllKeys()
Definition joystick_controller.h:99
std::bitset< KeyType::INTERNAL_ENUM_COUNT > m_keys_pressed
Definition joystick_controller.h:162
u8 m_joystick_id
Definition joystick_controller.h:159
f32 m_past_pressed_time[KeyType::INTERNAL_ENUM_COUNT]
Definition joystick_controller.h:166
u8 getJoystickId() const
Definition joystick_controller.h:145
s16 getAxis(JoystickAxis axis)
Definition joystick_controller.h:135
float getMovementSpeed()
Definition joystick_controller.cpp:310
@ INTERNAL_ENUM_COUNT
Definition keys.h:100
JoystickAxis
Definition joystick_controller.h:14
@ JA_COUNT
Definition joystick_controller.h:22
@ JA_FRUSTUM_HORIZONTAL
Definition joystick_controller.h:18
@ JA_FRUSTUM_VERTICAL
Definition joystick_controller.h:19
@ JA_FORWARD_MOVE
Definition joystick_controller.h:16
@ JA_SIDEWARD_MOVE
Definition joystick_controller.h:15
Definition joystick_controller.h:58
s16 thresh
Definition joystick_controller.h:79
int direction
Definition joystick_controller.h:78
u16 axis_to_compare
Definition joystick_controller.h:74
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:62
JoystickAxisCmb()=default
Definition joystick_controller.h:25
int invert
Definition joystick_controller.h:28
u16 axis_id
Definition joystick_controller.h:26
Definition joystick_controller.h:32
virtual bool isTriggered(const irr::SEvent::SJoystickEvent &ev) const =0
GameKeyType key
Definition joystick_controller.h:36
Definition joystick_controller.h:82
std::vector< JoystickButtonCmb > button_keys
Definition joystick_controller.h:83
JoystickAxisLayout axes[JA_COUNT]
Definition joystick_controller.h:85
s16 axes_deadzone
Definition joystick_controller.h:86
std::vector< JoystickAxisCmb > axis_keys
Definition joystick_controller.h:84