123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #ifndef INPUTANDJOY_H_INCLUDED
- #define INPUTANDJOY_H_INCLUDED
- //Jovian
- /* InputAndJoy :
- * Last modification : 3rd August 2017
- * Allow several game-pads
- */
- // Includes
- #include <SDL2/SDL.h>
- #include <iostream>
- #include <vector>
- #include "Input.h"
- // Data
- struct GamePadData;
- // Class
- class InputAndJoy : public Input {
- public:
- InputAndJoy();
- virtual ~InputAndJoy();
- virtual void updateEvents();
- protected:
- bool catchPadEvents(const SDL_Event &event);
- public:
- int getAxeValue(const Uint8 axeID, Sint32 joyID = 0) const;
- bool getButtonPad(const Uint8 button, Sint32 joyID = 0) const;
- unsigned long getNbPads() const;
- private:
- std::vector<GamePadData*> m_pad;
- };
- #endif // INPUTANDJOY_H_INCLUDED
|