diff --git a/tmxlite/include/tmxlite/ImageLayer.hpp b/tmxlite/include/tmxlite/ImageLayer.hpp index dc39b74..d9a9617 100644 --- a/tmxlite/include/tmxlite/ImageLayer.hpp +++ b/tmxlite/include/tmxlite/ImageLayer.hpp @@ -59,7 +59,7 @@ namespace tmx const Colour& getTransparencyColour() const { return m_transparencyColour; } /*! - \brief Returns true if the image used by this layer specifically states a + \brief Returns true if the image used by this layer specifically states a colour to use as transparency */ bool hasTransparency() const { return m_hasTransparency; } @@ -70,17 +70,22 @@ namespace tmx const Vector2u& getImageSize() const { return m_imageSize; } /*! - \brief Returns true if the image drawn by this layer is repeated along + \brief Returns true if the image drawn by this layer is repeated along the X axis. */ bool hasRepeatX() const { return m_hasRepeatX; } /*! - \brief Returns true if the image drawn by this layer is repeated along + \brief Returns true if the image drawn by this layer is repeated along the Y axis. */ bool hasRepeatY() const { return m_hasRepeatY; } + /*! + \brief Returns true if the image drawn by this layer is locked. + */ + bool locked() const {return m_locked;} + private: std::string m_workingDir; std::string m_filePath; @@ -89,6 +94,7 @@ namespace tmx Vector2u m_imageSize; bool m_hasRepeatX; bool m_hasRepeatY; + bool m_locked; }; template <> diff --git a/tmxlite/src/ImageLayer.cpp b/tmxlite/src/ImageLayer.cpp index 1079d28..a1522b5 100644 --- a/tmxlite/src/ImageLayer.cpp +++ b/tmxlite/src/ImageLayer.cpp @@ -72,6 +72,7 @@ void ImageLayer::parse(const pugi::xml_node& node, Map*) m_hasRepeatX = node.attribute("repeatx").as_bool(false); m_hasRepeatY = node.attribute("repeaty").as_bool(false); + m_locked = node.attribute("locked").as_bool(false); for (const auto& child : node.children()) {