#ifndef INPUT_H_INCLUDED #define INPUT_H_INCLUDED #include #undef main enum etat {APPUYER = 0b0001, R_APPUYER = 0b0011, RELACHER = 0b0100, R_RELACHER = 0b1100}; /*le R veut dire que l'on reste ex: appuyer -> vrai juste au moment de l'appui Rappuyer -> vrai tout pendant que la touche reste enfoncé */ class Input { public: Input(); ~Input(); void updateEvenement(); bool continuer() const; int getTouches(const SDLKey touche) const; int getBoutonSouris(const Uint8 bouton) const; bool mouvementSouris() const; int getX() const; int getY() const; int getXRel() const; int getYRel() const; private: SDL_Event m_evenement; int m_touches[512]; int m_boutonsSouris[8]; int m_x, m_y; int m_xRel, m_yRel; bool m_continuer; }; #endif // INPUT_H_INCLUDED