Input.h 901 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef DEF_INPUT
  2. #define DEF_INPUT
  3. ///Jovian
  4. ///Adaptation pour InputAndJoy
  5. // Include
  6. #include <iostream>
  7. #include <SDL/SDL.h>
  8. // Classe
  9. class Input
  10. {
  11. public:
  12. Input();
  13. virtual ~Input();
  14. virtual void updateEvenements();
  15. bool terminer() const;
  16. void afficherPointeur(bool reponse) const;
  17. void capturerPointeur(bool reponse);
  18. bool getTouche(const int touche) const;
  19. bool getBoutonSouris(const Uint8 bouton) const;
  20. bool mouvementSouris() const;
  21. int getX() const;
  22. int getY() const;
  23. int getXRel() const;
  24. int getYRel() const;
  25. void placerPtr(SDL_Surface* activWindow);
  26. int getWinHalfH();
  27. int getWinHalfW();
  28. protected:
  29. SDL_Event m_evenements;
  30. bool m_touches[SDLK_LAST];
  31. bool m_boutonsSouris[8];
  32. int m_x;
  33. int m_y;
  34. int m_xRel;
  35. int m_yRel;
  36. bool m_terminer;
  37. bool m_relativeMouse;
  38. int m_windowHalfHeight;
  39. int m_windowHalfWidth;
  40. };
  41. #endif