RTS2D
include/game/Map.h
00001 #ifndef MAP_H
00002 #include <cstdio>
00003 #include <string>
00004 #include <vector>
00005 #include "Define.h"
00006 #include "Tile.h"
00007 #define MAP_H
00008 
00012 class Map {
00013 public:
00014     Map(const char* mapname, const char* configname);
00015     virtual ~Map();
00016     int getRows();
00017     int getColumns();
00018     std::vector<std::string> getMapMatrix();
00019     const char* getConfigName();
00020     Tile*** getTiles();
00021     void render();
00022 
00023 protected:
00024 private:
00025     int rows_;
00026     int columns_;
00027     std::vector<std::string> mapMatrix_;
00028     const char* configname_;
00029     Tile*** tiles_;
00030     void loadMap(const char* mapname);
00031     void loadTiles();
00032     std::vector<std::string> transpose(std::vector<std::string> matrix);
00033 };
00034 
00035 #endif // MAP_H
 Todos Classes Funções