RegenSystem{} for health regen (mana NYI)
This commit is contained in:
parent
6cef899ef6
commit
0169a88091
8 changed files with 86 additions and 16 deletions
|
|
@ -63,12 +63,17 @@ pub fn render_camera(ecs: &World, ctx: &mut Rltk) {
|
|||
if pos.x < max_x && pos.y < max_y && pos.x >= min_x && pos.y >= min_y {
|
||||
let mut draw = false;
|
||||
let mut fg = render.fg;
|
||||
let (_glyph, _fg, bg) = crate::map::themes::get_tile_renderables_for_id(idx, &*map);
|
||||
let mut bg = if render.bg == (RGB { r: 0.0, g: 0.0, b: 0.0 }) {
|
||||
crate::map::themes::get_tile_renderables_for_id(idx, &*map).2
|
||||
} else {
|
||||
render.bg
|
||||
};
|
||||
// Draw entities on visible tiles
|
||||
if map.visible_tiles[idx] {
|
||||
draw = true;
|
||||
} else {
|
||||
fg = fg.mul(0.75);
|
||||
bg = bg.mul(0.75);
|
||||
}
|
||||
// Draw entities with minds within telepath range
|
||||
if map.telepath_tiles[idx] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue