Skip to content

Commit 69a2f47

Browse files
committed
Merge branch 'roig-develop'
2 parents de3f748 + 5025803 commit 69a2f47

17 files changed

Lines changed: 30 additions & 24 deletions

tmxlite/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ include(${PROJECT_DIR}/CMakeLists.txt)
3939

4040
if(WIN32)
4141
if(TMXLITE_STATIC_LIB)
42-
add_library(${PROJECT_NAME} STATIC WIN32 ${PROJECT_SRC})
42+
add_library(${PROJECT_NAME} STATIC ${PROJECT_SRC})
4343
else()
44-
add_library(${PROJECT_NAME} SHARED WIN32 ${PROJECT_SRC})
44+
add_library(${PROJECT_NAME} SHARED ${PROJECT_SRC})
4545
endif()
4646
else()
4747
if(TMXLITE_STATIC_LIB)

tmxlite/include/tmxlite/FreeFuncs.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ source distribution.
2828
/*********************************************************************
2929
base64_decode
3030
31-
Copyright (C) 2004-2008 René Nyffenegger
31+
Copyright (C) 2004-2008 René Nyffenegger
3232
This source code is provided 'as-is', without any express or implied
3333
warranty. In no event will the author be held liable for any damages
3434
arising from the use of this software.
@@ -46,13 +46,12 @@ appreciated but is not required.
4646
misrepresented as being the original source code.
4747
3. This notice may not be removed or altered from any source distribution.
4848
49-
René Nyffenegger rene.nyffenegger@adp-gmbh.ch
49+
René Nyffenegger rene.nyffenegger@adp-gmbh.ch
5050
*********************************************************************/
5151

5252
#ifndef TMXLITE_TILE_FUNCS_HPP_
5353
#define TMXLITE_TILE_FUNCS_HPP_
5454

55-
#include <tmxlite/detail/pugixml.hpp>
5655
#include <tmxlite/detail/Log.hpp>
5756
#include <tmxlite/Types.hpp>
5857

@@ -191,4 +190,4 @@ namespace tmx
191190
}
192191
}
193192

194-
#endif //TMXLITE_TILE_FUNCS_HPP_
193+
#endif //TMXLITE_TILE_FUNCS_HPP_

tmxlite/include/tmxlite/Tileset.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ namespace tmx
110110
*/
111111
std::uint32_t getFirstGID() const { return m_firstGID; }
112112
/*!
113+
\brief Returns the last GID of this tile set.
114+
This is the ID of the last tile in the tile set.
115+
*/
116+
std::uint32_t getLastGID() const { return m_firstGID + getTileCount(); }
117+
/*!
113118
\brief Returns the name of this tile set.
114119
*/
115120
const std::string& getName() const { return m_name; }
@@ -203,4 +208,4 @@ namespace tmx
203208
};
204209
}
205210

206-
#endif //TMXLITE_TILESET_HPP_
211+
#endif //TMXLITE_TILESET_HPP_

tmxlite/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
set(PROJECT_SRC
2+
${PROJECT_DIR}/detail/pugixml.cpp
23
${PROJECT_DIR}/FreeFuncs.cpp
34
${PROJECT_DIR}/ImageLayer.cpp
45
${PROJECT_DIR}/Map.cpp
56
${PROJECT_DIR}/miniz.c
67
${PROJECT_DIR}/Object.cpp
78
${PROJECT_DIR}/ObjectGroup.cpp
89
${PROJECT_DIR}/Property.cpp
9-
${PROJECT_DIR}/pugixml.cpp
1010
${PROJECT_DIR}/TileLayer.cpp
1111
${PROJECT_DIR}/Tileset.cpp)

tmxlite/src/ImageLayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ source distribution.
2727

2828
#include <tmxlite/ImageLayer.hpp>
2929
#include <tmxlite/FreeFuncs.hpp>
30-
#include <tmxlite/detail/pugixml.hpp>
30+
#include "detail/pugixml.hpp"
3131
#include <tmxlite/detail/Log.hpp>
3232

3333
using namespace tmx;

tmxlite/src/Map.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and must not be misrepresented as being the original software.
2525
source distribution.
2626
*********************************************************************/
2727

28+
#include "detail/pugixml.hpp"
2829
#include <tmxlite/Map.hpp>
2930
#include <tmxlite/FreeFuncs.hpp>
3031
#include <tmxlite/ObjectGroup.hpp>
@@ -306,4 +307,4 @@ bool Map::reset()
306307
m_properties.clear();
307308

308309
return false;
309-
}
310+
}

tmxlite/src/Object.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ source distribution.
2626
*********************************************************************/
2727

2828
#include <tmxlite/Object.hpp>
29-
#include <tmxlite/detail/pugixml.hpp>
29+
#include "detail/pugixml.hpp"
3030
#include <tmxlite/detail/Log.hpp>
3131

3232
#include <sstream>
@@ -131,4 +131,4 @@ void Object::parsePoints(const pugi::xml_node& node)
131131
{
132132
Logger::log("Points for polygon or polyline object are missing", Logger::Type::Warning);
133133
}
134-
}
134+
}

tmxlite/src/ObjectGroup.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ source distribution.
2727

2828
#include <tmxlite/FreeFuncs.hpp>
2929
#include <tmxlite/ObjectGroup.hpp>
30-
#include <tmxlite/detail/pugixml.hpp>
30+
#include "detail/pugixml.hpp"
3131
#include <tmxlite/detail/Log.hpp>
3232

3333
using namespace tmx;
@@ -84,4 +84,4 @@ void ObjectGroup::parse(const pugi::xml_node& node)
8484
m_objects.back().parse(child);
8585
}
8686
}
87-
}
87+
}

tmxlite/src/Property.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ source distribution.
2626
*********************************************************************/
2727

2828
#include <tmxlite/Property.hpp>
29-
#include <tmxlite/detail/pugixml.hpp>
29+
#include "detail/pugixml.hpp"
3030
#include <tmxlite/detail/Log.hpp>
3131

3232
using namespace tmx;
@@ -75,4 +75,4 @@ void Property::parse(const pugi::xml_node& node)
7575
m_type = Type::String;
7676
return;
7777
}
78-
}
78+
}

tmxlite/src/TileLayer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ source distribution.
2727

2828
#include <tmxlite/FreeFuncs.hpp>
2929
#include <tmxlite/TileLayer.hpp>
30-
#include <tmxlite/detail/pugixml.hpp>
30+
#include "detail/pugixml.hpp"
3131
#include <tmxlite/detail/Log.hpp>
3232

3333
#include <sstream>
@@ -189,4 +189,4 @@ void TileLayer::createTiles(const std::vector<std::uint32_t>& IDs)
189189
m_tiles.back().flipFlags = ((id & mask) >> 28);
190190
m_tiles.back().ID = id & ~mask;
191191
}
192-
}
192+
}

0 commit comments

Comments
 (0)