summaryrefslogtreecommitdiff
path: root/src/tileset.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tileset.rs')
-rw-r--r--src/tileset.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tileset.rs b/src/tileset.rs
index dcd5e9a..df7045d 100644
--- a/src/tileset.rs
+++ b/src/tileset.rs
@@ -57,6 +57,16 @@ impl Tileset {
properties.push(Property::new(tile_id, property_elements));
}
+ let invisible: Vec<usize> = properties
+ .iter()
+ .filter(|p| p.visible == Some(false))
+ .map(|p| p.tile_id)
+ .collect();
+
+ for i in invisible {
+ *tiles.get_mut(&i).unwrap() = Rect::zero();
+ }
+
Tileset { tiles, properties }
}