diff --git a/src/camera.rs b/src/camera.rs index 0a5f8e8..0ec379f 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -72,7 +72,7 @@ pub fn render_camera(ecs: &World, ctx: &mut Rltk) { if map.visible_tiles[idx] { draw = true; } else { - fg = fg.mul(crate::map::NON_VISIBLE_MULTIPLIER); + fg = fg.mul(crate::config::colours::NON_VISIBLE_MULTIPLIER); // We don't darken BG, because get_tile_renderables_for_id handles this. } diff --git a/src/map/colours.rs b/src/config/colours.rs similarity index 100% rename from src/map/colours.rs rename to src/config/colours.rs diff --git a/src/config/entity.rs b/src/config/entity.rs index 3580bda..7e5605b 100644 --- a/src/config/entity.rs +++ b/src/config/entity.rs @@ -1,4 +1,3 @@ -// prettier-ignore #[rustfmt::skip] pub const DEFAULT_VIEWSHED_STANDARD: i32 = 16; // Standard viewshed radius for almost all entities. diff --git a/src/map/glyphs.rs b/src/config/glyphs.rs similarity index 100% rename from src/map/glyphs.rs rename to src/config/glyphs.rs diff --git a/src/config/mod.rs b/src/config/mod.rs index e8c3d6a..8bd5f63 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -1 +1,3 @@ pub mod entity; +pub mod colours; +pub mod glyphs; diff --git a/src/map/mod.rs b/src/map/mod.rs index 238828c..6478ebf 100644 --- a/src/map/mod.rs +++ b/src/map/mod.rs @@ -1,8 +1,6 @@ use rltk::{ Algorithm2D, BaseMap, Point }; use serde::{ Deserialize, Serialize }; use std::collections::HashSet; -pub mod colours; -mod glyphs; mod tiletype; pub use tiletype::{ tile_cost, tile_opaque, tile_walkable, TileType }; mod interval_spawning_system; @@ -10,7 +8,6 @@ pub use interval_spawning_system::try_spawn_interval; pub mod dungeon; pub use dungeon::{ level_transition, MasterDungeonMap }; pub mod themes; -pub use colours::NON_VISIBLE_MULTIPLIER; // FIXME: If the map size gets too small, entities stop being rendered starting from the right. // i.e. on a map size of 40*40, only entities to the left of the player are rendered. diff --git a/src/map/themes.rs b/src/map/themes.rs index 8c52488..d2788c9 100644 --- a/src/map/themes.rs +++ b/src/map/themes.rs @@ -1,4 +1,6 @@ -use super::{ colours::*, glyphs::*, Map, Point, TileType }; +use super::{ Map, Point, TileType }; +use crate::config::glyphs::*; +use crate::config::colours::*; use rltk::prelude::*; use std::ops::{ Add, Mul };