30#include <tmxlite/Layer.hpp>
31#include <tmxlite/Types.hpp>
47 std::uint8_t flipFlags = 0;
57 std::vector<Tile> tiles;
73 void parse(
const pugi::xml_node&,
Map*)
override;
81 const std::vector<Tile>&
getTiles()
const {
return m_tiles; }
89 const std::vector<Chunk>&
getChunks()
const {
return m_chunks; }
92 std::vector<Tile> m_tiles;
93 std::vector<Chunk> m_chunks;
94 std::size_t m_tileCount;
96 void parseBase64(
const pugi::xml_node&);
97 void parseCSV(
const pugi::xml_node&);
98 void parseUnencoded(
const pugi::xml_node&);
100 void createTiles(
const std::vector<std::uint32_t>&, std::vector<Tile>& destination);
107 return *
static_cast<TileLayer*
>(
this);
114 return *
static_cast<const TileLayer*
>(
this);
Represents a layer of a tmx format tile map. This is an abstract base class from which all layer type...
Definition Layer.hpp:56
T & getLayerAs()
Use this to get a reference to the concrete layer type which this layer points to....
Type
Layer type as returned by getType() Tile: this layer is a TileLayer type Object: This layer is an Obj...
Definition Layer.hpp:71
virtual Type getType() const =0
Returns a Type value representing the concrete type. Use this when deciding which conrete layer type ...
Parser for TMX format tile maps. This class can be used to parse the XML format tile maps created wit...
Definition Map.hpp:94
A layer made up from a series of tile sets.
Definition TileLayer.hpp:39
FlipFlag
Flags used to tell if a tile is flipped when drawn.
Definition TileLayer.hpp:64
void parse(const pugi::xml_node &, Map *) override
Attempts to parse the specific node layer type.
const std::vector< Tile > & getTiles() const
Returns the list of tiles used to make up the layer If this is empty then the map is most likely infi...
Definition TileLayer.hpp:81
Type getType() const override
Returns a Type value representing the concrete type. Use this when deciding which conrete layer type ...
Definition TileLayer.hpp:72
const std::vector< Chunk > & getChunks() const
Returns a vector of chunks which make up this layer if the map is set to infinite....
Definition TileLayer.hpp:89
Represents a chunk of tile data, if this is an infinite map.
Definition TileLayer.hpp:54
Vector2i size
size in tiles, not pixels
Definition TileLayer.hpp:56
Tile information for a layer.
Definition TileLayer.hpp:45