7#include <IEventReceiver.h>
34 virtual bool isTriggered(
const SEvent::SJoystickEvent &ev)
const=0;
52 virtual bool isTriggered(
const SEvent::SJoystickEvent &ev)
const;
72 bool isTriggered(
const SEvent::SJoystickEvent &ev)
const override;
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
bool wasKeyReleased(GameKeyType b)
Definition joystick_controller.h:112
f32 doubling_dtime
Definition joystick_controller.h:150
void clear()
Definition joystick_controller.cpp:281
float getMovementDirection()
Definition joystick_controller.cpp:302
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:290
void setLayoutFromControllerName(const std::string &name)
Definition joystick_controller.cpp:220
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
void onJoystickConnect(const std::vector< SJoystickInfo > &joystick_infos)
Definition joystick_controller.cpp:199
JoystickController()
Definition joystick_controller.cpp:189
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:308
bool handleEvent(const SEvent::SJoystickEvent &ev)
Definition joystick_controller.cpp:231
@ INTERNAL_ENUM_COUNT
Definition keys.h:98
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
JoystickAxisCmb(GameKeyType key, u16 axis_to_compare, int direction, s16 thresh)
Definition joystick_controller.h:62
bool isTriggered(const SEvent::SJoystickEvent &ev) const override
Definition joystick_controller.cpp:20
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 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