File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ namespace tmx
5959 String,
6060 Colour,
6161 File,
62+ Object,
6263 Undef
6364 };
6465
@@ -104,6 +105,10 @@ namespace tmx
104105 \brief Returns the file path property as a string, relative to the map file
105106 */
106107 const std::string& getFileValue () const { assert (m_type == Type::File); return m_stringValue; }
108+ /* !
109+ \brief Returns the property's value as an integer object handle
110+ */
111+ int getObjectValue () const { assert (m_type == Type::Object); return m_intValue; }
107112
108113
109114 private:
@@ -119,4 +124,4 @@ namespace tmx
119124
120125 Type m_type;
121126 };
122- }
127+ }
Original file line number Diff line number Diff line change @@ -95,4 +95,10 @@ void Property::parse(const pugi::xml_node& node)
9595 m_type = Type::File;
9696 return ;
9797 }
98+ else if (attribData == " object" )
99+ {
100+ m_intValue = node.attribute (" value" ).as_int (0 );
101+ m_type = Type::Object;
102+ return ;
103+ }
98104}
You can’t perform that action at this time.
0 commit comments