consts in config files

This commit is contained in:
Llywelwyn 2023-08-23 01:25:53 +01:00
parent c2c7e0bd52
commit 705a6bb1fb
7 changed files with 6 additions and 6 deletions

View file

@ -72,7 +72,7 @@ pub fn render_camera(ecs: &World, ctx: &mut Rltk) {
if map.visible_tiles[idx] { if map.visible_tiles[idx] {
draw = true; draw = true;
} else { } 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. // We don't darken BG, because get_tile_renderables_for_id handles this.
} }

View file

@ -1,4 +1,3 @@
// prettier-ignore
#[rustfmt::skip] #[rustfmt::skip]
pub const DEFAULT_VIEWSHED_STANDARD: i32 = 16; // Standard viewshed radius for almost all entities. pub const DEFAULT_VIEWSHED_STANDARD: i32 = 16; // Standard viewshed radius for almost all entities.

View file

@ -1 +1,3 @@
pub mod entity; pub mod entity;
pub mod colours;
pub mod glyphs;

View file

@ -1,8 +1,6 @@
use rltk::{ Algorithm2D, BaseMap, Point }; use rltk::{ Algorithm2D, BaseMap, Point };
use serde::{ Deserialize, Serialize }; use serde::{ Deserialize, Serialize };
use std::collections::HashSet; use std::collections::HashSet;
pub mod colours;
mod glyphs;
mod tiletype; mod tiletype;
pub use tiletype::{ tile_cost, tile_opaque, tile_walkable, TileType }; pub use tiletype::{ tile_cost, tile_opaque, tile_walkable, TileType };
mod interval_spawning_system; mod interval_spawning_system;
@ -10,7 +8,6 @@ pub use interval_spawning_system::try_spawn_interval;
pub mod dungeon; pub mod dungeon;
pub use dungeon::{ level_transition, MasterDungeonMap }; pub use dungeon::{ level_transition, MasterDungeonMap };
pub mod themes; 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. // 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. // i.e. on a map size of 40*40, only entities to the left of the player are rendered.

View file

@ -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 rltk::prelude::*;
use std::ops::{ Add, Mul }; use std::ops::{ Add, Mul };