#ifndef COLLISIONS_H_INCLUDED #define COLLISIONS_H_INCLUDED //Includes #include #include #include "traitement.h" //Orientation #define HAUT 0 #define DROITE 1 #define BAS 2 #define GAUCHE 3 //Define du mur #define VIDE -1 //Pas de mur #define NEUTRE -2 // Mur sans identification /** \brief Gestionnaire de collisions * \last Remplacement bool par int, -1 = MUR * \next * * */ class Collisions { public: Collisions(SDL_Surface* screen, int const xBlocSize, int const yBlocSize); ~Collisions(); void ajouter(int x, int y, int ID); void enlever(int x, int y); int tester(int x, int y) const; void afficher(); void reinitialiser(); void coorectPos(int &x, int &y) const; int getSize(int idCoord);// x -> 0 et y -> 1 private: SDL_Surface* m_screen; SDL_Surface* m_carreStd; SDL_Surface* m_carre[12]; SDL_Surface* m_sol; SDL_Surface* m_terrain; int const m_xSize; int const m_ySize; SDL_Rect m_position; int **m_tableau; }; #endif // COLLISIONS_H_INCLUDED