From 8b11578ed5d2b254c7b0f827170aadac6490434b Mon Sep 17 00:00:00 2001 From: Luis Ferro Date: Tue, 12 Nov 2019 16:07:29 +0100 Subject: Rendering stuff --- src/state.rs | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'src/state.rs') diff --git a/src/state.rs b/src/state.rs index 6dad58e..1f50f1a 100644 --- a/src/state.rs +++ b/src/state.rs @@ -1,7 +1,7 @@ use pancurses::Window; use std::env; -use crate::entities::{Character, Entity}; +use crate::entities::{Character, Entity, Render}; use crate::world::{Dungeon, Generatable, Level}; pub struct State { @@ -27,33 +27,12 @@ impl State { self.character.place(self.current_level().get_start_point()); } - pub fn debug(&self) { - match env::var("DEBUG") { - Ok(_) => { - self.dungeon.debug_levels(); - }, - Err(_) => () - }; - } - pub fn render_level(&self, window: &Window) { self.current_level().render(window); } pub fn show_character(&self, window: &Window) { self.character.render(window); - - // window.mv(window.get_max_y() - 2, 0); - // window.clrtoeol(); - - // window.refresh(); - - // window.addstr(self.character.info() + "\n"); - - // window.mv(self.character.location.1 as i32,self.character.location.0 as i32); - // window.refresh(); - // draw_block(&window, self.character.tile_type); - // window.refresh(); } fn current_level(&self) -> &Level { -- cgit v1.2.3