aboutsummaryrefslogtreecommitdiff
path: root/src/map_data.rs
diff options
context:
space:
mode:
authorArne Dußin2020-11-06 00:53:46 +0100
committerArne Dußin2020-11-06 00:53:46 +0100
commit625d00bb0e9a374e7ecf4b91fde599307199f3b6 (patch)
tree3dfdcc544c5b29f1f49d09a374d129bd825ade56 /src/map_data.rs
parent6d5db404416b93d22438efd45c7df7be2cc67d11 (diff)
downloadgraf_karto-625d00bb0e9a374e7ecf4b91fde599307199f3b6.tar.gz
graf_karto-625d00bb0e9a374e7ecf4b91fde599307199f3b6.zip
Add icon tool
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
+ }
}