Skip to content

Commit

Permalink
bump meson version number
Browse files Browse the repository at this point in the history
unify indentation
  • Loading branch information
fallahn committed Jun 18, 2023
1 parent 56c62c2 commit 4303871
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
5 changes: 3 additions & 2 deletions ParseTest/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
Matt Marchant 2016 - 2021
Matt Marchant 2016 - 2023
http://trederia.blogspot.com
tmxlite - Zlib license.
Expand Down Expand Up @@ -65,7 +65,8 @@ int main()
std::cout << "Map class: " << map.getClass() << std::endl;

std::cout << "Map tileset has " << map.getTilesets().size() << " tilesets" << std::endl;
for (const auto& tileset : map.getTilesets()) {
for (const auto& tileset : map.getTilesets())
{
std::cout << "Tileset: " << tileset.getName() << std::endl;
std::cout << "Tileset class: " << tileset.getClass() << std::endl;
}
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('tmxlite', 'cpp', 'c',
version: '1.4.3',
version: '1.4.4',
meson_version: '>=0.49.2',
default_options: [
'buildtype=release',
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ As well as full support for maps up to version 1.0, tmxlite also supports these
* Infinite Maps - Maps with the 'infinite' flag set, and saved in either CSV or base64 (compressed and uncompressed) format are supported. A `TileLayer` will return an empty Tile vector in these cases, and tile ID data can be retrieved instead with `TileLayer::getChunks()` which returns a vector of chunk data that makes up the tile layer.
* Parallax layers - the parallax offset property of layers is parsed, as well as each map's parallax origin, if they exist
* Layer tint colours
* Extended tag support such as `class`

By default tmxlite supports zlib compressed maps, however gzip and zstd compression can be enabled at compile time, by linking the relevant external libraries:

Expand Down
2 changes: 1 addition & 1 deletion tmxlite/include/tmxlite/Tileset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ namespace tmx
\brief The position of the tile within the image.
*/
Vector2u imagePosition;
std::string Class;
std::string className;
};

/*!
Expand Down
4 changes: 2 additions & 2 deletions tmxlite/src/ImageLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ void ImageLayer::parse(const pugi::xml_node& node, Map*)

if (child.attribute("width") && child.attribute("height"))
{
m_imageSize.x = child.attribute("width").as_uint();
m_imageSize.y = child.attribute("height").as_uint();
m_imageSize.x = child.attribute("width").as_uint();
m_imageSize.y = child.attribute("height").as_uint();
}

m_filePath = resolveFilePath(attribName, m_workingDir);
Expand Down
10 changes: 5 additions & 5 deletions tmxlite/src/Tileset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,11 @@ void Tileset::parseTileNode(const pugi::xml_node& node, Map* map)

tile.probability = node.attribute("probability").as_int(100);

tile.Class = node.attribute("type").as_string();
if (tile.Class.empty())
{
tile.Class = node.attribute("class").as_string();
}
tile.className = node.attribute("type").as_string();
if (tile.className.empty())
{
tile.className = node.attribute("class").as_string();
}

//by default we set the tile's values as in an Image tileset
tile.imagePath = m_imagePath;
Expand Down

0 comments on commit 4303871

Please sign in to comment.