Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::vector<std::vector<int>>
- for (std::vector<std::vector<Tile>>::const_iterator layerRow = ...) {}
- class Map
- {
- public:
- using tileLayerVector_t = std::vector<std::vector<Tile>>;
- using rawDataLayerVector_t = std::vector<std::vector<int>>;
- tileLayerVector_t getTileLayer(const std::string pLayerName) const;
- void generateTileMapLayer(const std::string pMapLayerName, const rawDataLayerVector_t pRawMapData, const std::shared_ptr<Texture> pTexture);
- }
- #include <map.h>
- tileLayerVector_t Map::getTileLayer(const std::string pLayerName) const
- {
- return mapLayers.at(pLayerName);
- }
- void Map::generateTileMapLayer(const std::string pMapLayerName, const
- rawDataLayerVector_t pRawMapData, const std::shared_ptr<Texture> pTexture)
- {
- int tileCount = 0;
- int xPos = 0;
- int yPos = 0;
- ...
- std::pair<std::string, tileLayerVector_t> tileLayer(pMapLayerName, tileMapLayer);
- mapLayers.insert(tileLayer);
- }
Add Comment
Please, Sign In to add comment