//Header de la classe Map

class CMap
{
	private:
		class CBonus
		{
			public:
				int CarreauX, CarreauY, TypeBonus;

				CBonus();
				~CBonus();
		};
				
		int Hauteur, Largeur, PosDebutX, PosDebutY;

		vector<vector<char> > TablMap;
		vector<CBonus> Bonus;

		int TexturesMap[34], TexturesBonus[80];

		void AddBonus(int CX, int CY, int Type);

	public:
		CMap();
		~CMap();

		CMainPerso* LoadMap(const char *filename);
		void LoadTextures();
		bool AutAcces(int X, int Y);
		bool DiedAcces(int X, int Y);
		
		void RenderMap(int PersoX, int PersoY);
		int ReturnPosDebutX();
		int ReturnPosDebutY();
		int ReturnBonus(int X, int Y);


};

extern CMap Map;


//Define des composantes de la Map ...

#define 	ERROR 	0
#define 	VIDE 	1
#define 	HERBE 	2
#define 	EAU 	3
#define		MUR 	4
#define		DEBUT_PENTE_DROITE 	5
#define		SABLE_VIDE_DROITE 	6
#define		DEBUT_PENTE_GAUCHE	7
#define		SOMMET_COTE_DROITE	8
#define 	SOMMET_COTE_GAUCHE	9
#define 	TERRE 	10
#define 	HERBE_VIDE_DROITE 	11
#define 	TRANSITION_DROITE 	12
#define 	HERBE_VIDE_GAUCHE 	13
#define 	TRANSITION_GAUCHE 	14
#define 	TRANSITION_MUR_EAU_DROITE 	15
#define 	MUR_DROITE 	16
#define 	TRANSITION_MUR_EAU_GAUCHE 	17
#define 	MUR_GAUCHE 	18
#define 	TRANSITION_MUR_HERBE_DROITE 	19
#define 	TRANSITION_MUR_HERBE_GAUCHE 	20
#define 	PENTE_DROITE 	21
#define 	TRANSITION_MUR_TERRE_BAS_DROITE 	22
#define 	PENTE_GAUCHE 	23
#define 	TRANSITION_MUR_TERRE_BAS_GAUCHE 	24
#define 	SABLE 	25
#define 	TRANSITION_MUR_TERRE_DROITE 	26
#define 	SABLE_MUR_DROITE 	27
#define 	TRANSITION_MUR_TERRE_GAUCHE 	28
#define 	SABLE_MUR_GAUCHE 	29
#define 	TRANSITION_MUR_TERRE_HAUT_DROITE 	30
#define 	SABLE_SOL 	31
#define 	TRANSITION_MUR_TERRE_HAUT_GAUCHE 	32
#define 	SABLE_VIDE_GAUCHE 	33


//Equivalence des bonus
#define		BONUS_ERREUR	0
#define		BONUS_VIE_25P	1
#define		BONUS_VIE_50P	2
#define		BONUS_VIE_75P	3
#define		BONUS_VIE_100P	4
#define		BONUS_MANA_25P	5
#define		BONUS_MANA_50P	6
#define		BONUS_MANA_75P	7
#define		BONUS_MANA_100P	8



