Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/CTileMap.h
blob: ed3536cb3e9bfa184d035c3b3958ee22d5b63960 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//--------------------------------------------------------------------------------------------------
// CTileMap.
// A class to represent the tiled based map.
//--------------------------------------------------------------------------------------------------

#ifndef __CTILEMAP_H__
#define __CTILEMAP_H__

#include "CGameConstants.h"
#include "CSurface.h"

class CTileMap
{
	public:
		CTileMap(void);
		CTileMap(int aMapIndex);
		~CTileMap(void);
		void destroy(void);
		void loadMap(int aMap);
		void draw(CSurface *aImgDst, int aX, int aY);
		int getTile(int aTileX, int aTileY);
		bool isWalkable(int aTileX, int aTileY);

	private:
		int mCurrentMap;
		CSurface *mMapImage;
		char mMap[CGameConstants::MAP_WIDTH * CGameConstants::MAP_HEIGHT];
};

#endif /* __CTILEMAP_H__ */