InputAndJoy.h 777 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef INPUTANDJOY_H_INCLUDED
  2. #define INPUTANDJOY_H_INCLUDED
  3. ///Jovian
  4. ///Adaptation pour InputAndJoy
  5. // Include
  6. #include <vector>
  7. #include "Input.h"
  8. //Enum
  9. #define CLAVIER_SOURIS 1
  10. #define MANETTE 2
  11. // Classe
  12. class InputAndJoy : public Input
  13. {
  14. public:
  15. InputAndJoy();
  16. virtual ~InputAndJoy();
  17. virtual void updateEvenements();
  18. int getAxeValue(const Uint8 axeID) const;
  19. bool getBoutonPad(const Uint8 bouton) const;
  20. void setMainControleur(int type);
  21. int getMainCtrl() const;
  22. private:
  23. SDL_Joystick* m_manette;
  24. int m_nbAxes;
  25. int m_nbBoutons;
  26. int m_controleurType;
  27. int const m_seuil;
  28. std::vector<int> m_axeValue;
  29. std::vector<bool> m_boutonValue;
  30. };
  31. #endif // INPUTANDJOY_H_INCLUDED