summaryrefslogtreecommitdiff
path: root/src/systems/draw.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/systems/draw.rs')
-rw-r--r--src/systems/draw.rs31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/systems/draw.rs b/src/systems/draw.rs
deleted file mode 100644
index 82400e3..0000000
--- a/src/systems/draw.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-
-use specs::{
- ReadStorage,
- Write,
- System,
- Join
-};
-
-use super::super::components::{
- Position,
- Visible
-};
-
-use super::super::resources::{
- TopView
-};
-
-
-pub struct Draw;
-impl <'a> System<'a> for Draw {
-
- type SystemData = (ReadStorage<'a, Position>, ReadStorage<'a, Visible>, Write<'a, TopView>);
-
- fn run(&mut self, (pos, vis, mut view): Self::SystemData) {
- view.cells.clear();
- for (pos, vis) in (&pos, &vis).join(){
- view.cells.entry(*pos).or_insert(Vec::new()).push(vis.clone());
- view.cells.get_mut(pos).unwrap().sort_by(|a, b| b.height.partial_cmp(&a.height).unwrap());
- }
- }
-}