From b95a77b6b37ba1103c7a62d5d20586b16ccf0333 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Thu, 9 Mar 2023 00:42:21 -0500 Subject: [PATCH] [-] Remove debug --- tngame-rs/src/main.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tngame-rs/src/main.rs b/tngame-rs/src/main.rs index 60a152b..3e334e6 100644 --- a/tngame-rs/src/main.rs +++ b/tngame-rs/src/main.rs @@ -1,7 +1,6 @@ #![feature(let_chains)] -use std::{env}; -use std::arch::asm; +use std::{env, io}; use std::io::Write; use std::ops::DerefMut; use std::string::ToString; @@ -197,6 +196,12 @@ impl Mutes { let (w, h) = termion::terminal_size().unwrap(); width = w as i32; height = h as i32; + if env::var("TN_DEBUG").is_ok() { + println!("Terminal size: {}x{}", width, height); + // Press enter to continue + let mut input = String::new(); + io::stdin().read_line(&mut input).unwrap(); + } } // Initialize the buffers @@ -426,14 +431,6 @@ async fn pull_input(mt: Arc>, cn: &Consts) -> Result<()> { let str = String::from_utf8_lossy(&buf[..n]).to_string(); - // Print bytes for debug - for i in 0..n { - for e in std::ascii::escape_default(buf[i]) { - print!("{}", e as char); - } - } - // print!("\r\n"); - { let mut mt = mt.lock().await; let mut move_x = |amount: i32| {