aboutsummaryrefslogtreecommitdiff
path: root/src/map_data.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/map_data.rs')
-rw-r--r--src/map_data.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map_data.rs b/src/map_data.rs
index 852d236..fa3a389 100644
--- a/src/map_data.rs
+++ b/src/map_data.rs
@@ -13,6 +13,7 @@ use std::path::Path;
pub struct MapData {
rooms: Vec<Rect<f32>>,
walls: Vec<(Vec2<f32>, Vec2<f32>)>,
+ icons: Vec<(usize, Vec2<f32>)>,
}
impl MapData {
@@ -20,6 +21,7 @@ impl MapData {
Self {
rooms: Vec::new(),
walls: Vec::new(),
+ icons: Vec::new(),
}
}
@@ -37,6 +39,7 @@ impl MapData {
*/
self.rooms.append(&mut data.rooms);
self.walls.append(&mut data.walls);
+ self.icons.append(&mut data.icons);
Ok(())
}
@@ -72,4 +75,11 @@ impl MapData {
pub fn walls_mut(&mut self) -> &mut Vec<(Vec2<f32>, Vec2<f32>)> {
&mut self.walls
}
+
+ pub fn icons(&self) -> &Vec<(usize, Vec2<f32>)> {
+ &self.icons
+ }
+ pub fn icons_mut(&mut self) -> &mut Vec<(usize, Vec2<f32>)> {
+ &mut self.icons
+ }
}