diff options
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 |