Skip to content

Commit 4c8550c

Browse files
committed
add support for 'type' attribute to tile nodes
1 parent a6309e9 commit 4c8550c

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

tmxlite/include/tmxlite/Tileset.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ namespace tmx
8484
ObjectGroup objectGroup;
8585
std::string imagePath;
8686
Vector2u imageSize;
87+
std::string type;
8788
};
8889

8990
/*!

tmxlite/src/Tileset.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ void Tileset::parseTileNode(const pugi::xml_node& node)
258258
}
259259

260260
tile.probability = node.attribute("probability").as_int(100);
261+
tile.type = node.attribute("type").as_string();
261262

262263
const auto& children = node.children();
263264
for (const auto& child : children)

0 commit comments

Comments
 (0)