diff options
author | tom barrett <spalf0@gmail.com> | 2019-06-26 05:50:34 -0500 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2019-06-26 05:50:34 -0500 |
commit | 53b4ccdcc6cdac3b02480a97a2ec30439114ff6c (patch) | |
tree | e7925bfd55c15c68b13301301bd12a6d092e43c4 /src/map.rs | |
parent | 15b4ade5a357a791cf3ffa86cfe78b5f7ae270c9 (diff) |
now can parse tile properties
Diffstat (limited to 'src/map.rs')
-rw-r--r-- | src/map.rs | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -17,8 +17,16 @@ impl Map { pub fn new(file: File, tileset: &Tileset) -> Map { let elements = XMLElements::new(file); - let width = elements.get_element_attribute("map", "width").unwrap(); - let height = elements.get_element_attribute("map", "height").unwrap(); + let width = elements + .get_element_attribute("map", "width") + .unwrap() + .parse() + .unwrap(); + let height = elements + .get_element_attribute("map", "height") + .unwrap() + .parse() + .unwrap(); let layers = elements .events |