1 #ifndef GAMECONTROLLER_HPP 2 #define GAMECONTROLLER_HPP 4 #include <SDL2/SDL_gamecontroller.h> 37 A = SDL_CONTROLLER_BUTTON_A,
38 B = SDL_CONTROLLER_BUTTON_B,
39 X = SDL_CONTROLLER_BUTTON_X,
40 Y = SDL_CONTROLLER_BUTTON_Y,
41 BACK = SDL_CONTROLLER_BUTTON_BACK,
42 GUIDE = SDL_CONTROLLER_BUTTON_GUIDE,
43 START = SDL_CONTROLLER_BUTTON_START,
169 #endif // GAMECONTROLLER_HPP int getID()
Get the id for the game pad.
Definition: GameController.hpp:100
const char * getControllerName()
Get the name for the game pad.
Definition: GameController.hpp:108
const char * m_name
The name given by SDL to the game controller.
Definition: GameController.hpp:164
int getDeadZone()
Get the dead zone for the game pad.
Definition: GameController.hpp:132
Definition: GameController.hpp:21
Definition: GameController.hpp:20
void setDeadZone(int deadzone)
Get the dead zone for the game pad's joystick(s).
Definition: GameController.hpp:124
GameControllerAxis
Mapping of SDL game pad axes for the purposes of not having to depend on memorizing SDL enums...
Definition: GameController.hpp:15
Definition: GameController.hpp:18
Definition: GameController.hpp:42
Definition: GameController.hpp:17
Definition: GameController.hpp:19
Definition: GameController.hpp:22
int m_deadzone
The value stored for the game controller's axis dead zone.
Definition: GameController.hpp:162
Definition: GameController.hpp:36
void close()
Calls SDL close routine, cleaning up for the controller without intervention. This function is called...
Definition: GameController.hpp:68
SDL_bool isConnected()
Get the connection status for the game pad.
Definition: GameController.hpp:116
Definition: GameController.hpp:38
int m_id
The id corresponding to the game controller.
Definition: GameController.hpp:163
virtual ~GameController()
Definition: GameController.hpp:52
Definition: GameController.hpp:40
Definition: GameController.hpp:51
Definition: GameController.hpp:46
Definition: GameController.hpp:23
Definition: GameController.hpp:37
Definition: GameController.hpp:47
Definition: GameController.hpp:45
Definition: GameController.hpp:41
GameController()
Default constructor - INACCESSIBLE!
Definition: GameController.hpp:68
SDL_GameController * m_controller
A handle to the SDL_GameController.
Definition: GameController.hpp:158
Definition: GameController.hpp:43
Definition: GameController.hpp:48
Definition: GameController.hpp:49
Sint16 getAxisState(int axis)
Get the axis state for the game pad.
Definition: GameController.hpp:145
Definition: GameController.hpp:44
Convenience class for abstracting functionality that already exists in SDL.
Definition: GameController.hpp:61
Definition: GameController.hpp:39
Definition: GameController.hpp:24
Definition: GameController.hpp:50
GameControllerButton
Mapping of SDL game pad buttons for the purposes of not having to depend on memorizing SDL enums...
Definition: GameController.hpp:34
Uint8 getButtonState(int button)
Get the button state for the game pad.
Definition: GameController.hpp:158