00001
00025 #ifndef _HCLEVELLOADER_
00026 #define _HCLEVELLOADER_
00027
00028 #include "Singleton.h"
00029 #include "Level.h"
00030
00031 class CLevelLoader: public CSingleton<CLevelLoader> {
00032
00033 public:
00034
00035 CLevelLoader();
00036 virtual ~CLevelLoader();
00037
00038 bool loadLevel(int id);
00039 bool loadLevel(const char * fileName);
00040
00041 int getWidth() {
00042 return m_width;
00043 }
00044 ;
00045 int getLength() {
00046 return m_length;
00047 }
00048 ;
00049 int** getMapData() {
00050 return m_mapdata;
00051 }
00052 ;
00053
00054 int getPositionPlayerX() const {
00055 return m_positionPlayerX;
00056 }
00057 ;
00058 int getPositionPlayerZ() const {
00059 return m_positionPlayerZ;
00060 }
00061 ;
00062
00063 void clearMap();
00064 void put(CLevel &level);
00065
00066 private:
00067 int** m_mapdata;
00068 int m_width;
00069 int m_length;
00070
00071 int m_positionPlayerX;
00072 int m_positionPlayerZ;
00073
00074 };
00075
00076 #endif
00077