From 53b4ccdcc6cdac3b02480a97a2ec30439114ff6c Mon Sep 17 00:00:00 2001 From: tom barrett Date: Wed, 26 Jun 2019 05:50:34 -0500 Subject: now can parse tile properties --- src/map.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/map.rs') diff --git a/src/map.rs b/src/map.rs index 38fb326..dc50116 100644 --- a/src/map.rs +++ b/src/map.rs @@ -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 -- cgit v1.2.3