33 #include "TmxPropertySet.h"
34 #include "TmxMapTile.h"
47 enum TileLayerEncodingType
57 enum TileLayerCompressionType
80 void Parse(
const tinyxml2::XMLNode *tileLayerNode);
83 unsigned GetTileId(
int x,
int y)
const {
return tile_map[y * width + x].
id; }
86 unsigned GetTileGid(
int x,
int y)
const {
return tile_map[y * width + x].
gid; }
111 Tmx::TileLayerEncodingType
GetEncoding()
const {
return encoding; }
118 void ParseXML(
const tinyxml2::XMLNode *dataNode);
119 void ParseBase64(
const std::string &innerText);
120 void ParseCSV(
const std::string &innerText);
124 Tmx::TileLayerEncodingType encoding;
125 Tmx::TileLayerCompressionType compression;
Base class for other layer types.
Definition: TmxLayer.h:54
unsigned gid
Gid.
Definition: TmxMapTile.h:73
int tilesetId
Tileset id.
Definition: TmxMapTile.h:67
bool flippedVertically
True when the tile should be drawn flipped vertically.
Definition: TmxMapTile.h:79
Tmx::TileLayerEncodingType GetEncoding() const
Get the type of encoding that was used for parsing the tile layer data.
Definition: TmxTileLayer.h:111
Tmx::TileLayerCompressionType GetCompression() const
Get the type of compression that was used for parsing the tile layer data.
Definition: TmxTileLayer.h:115
unsigned GetTileGid(int x, int y) const
Pick a specific tile gid from the list.
Definition: TmxTileLayer.h:86
Used for storing information about the tile ids for every tile layer.
Definition: TmxTileLayer.h:68
bool flippedDiagonally
True when the tile should be drawn flipped diagonally.
Definition: TmxMapTile.h:82
Struct to store information about a specific tile in the map layer.
Definition: TmxMapTile.h:42
int GetTileTilesetIndex(int x, int y) const
Get the tileset index for a tileset from the list.
Definition: TmxTileLayer.h:89
const Tmx::MapTile & GetTile(int index) const
Get a tile by its index.
Definition: TmxTileLayer.h:107
bool IsTileFlippedHorizontally(int x, int y) const
Get whether a tile is flipped horizontally.
Definition: TmxTileLayer.h:92
bool IsTileFlippedVertically(int x, int y) const
Get whether a tile is flipped vertically.
Definition: TmxTileLayer.h:96
This class is the root class of the parser.
Definition: TmxMap.h:115
unsigned id
Id.
Definition: TmxMapTile.h:70
bool flippedHorizontally
True when the tile should be drawn flipped horizontally.
Definition: TmxMapTile.h:76
void Parse(const tinyxml2::XMLNode *tileLayerNode)
Parse a tile layer node.
Definition: TmxTileLayer.cpp:63
const Tmx::MapTile & GetTile(int x, int y) const
Get the tile at the given position.
Definition: TmxTileLayer.h:104
unsigned GetTileId(int x, int y) const
Pick a specific tile id from the list.
Definition: TmxTileLayer.h:83
bool IsTileFlippedDiagonally(int x, int y) const
Get whether a tile is flipped diagonally.
Definition: TmxTileLayer.h:100