survivor

graphical action game for the linux terminal
git clone https://git.ce9e.org/survivor.git

commit
c52fe1a81629fd8e117c6f01b1c9c66e1a1a7e2f
parent
37e06e76605eae3634144ed15450cc2c232ceb27
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-04-17 04:29
rm frame rate counter

Diffstat

M src/main.rs 1 -
M src/term.rs 4 +---

2 files changed, 1 insertions, 4 deletions


diff --git a/src/main.rs b/src/main.rs

@@ -133,7 +133,6 @@ fn main() {
  133   133         render_health_bar(&game.player, &mut screen);
  134   134 
  135   135         screen.render();
  136    -1         print!("{:?}", 1.0 / dt);
  137   136 
  138   137         if game.player.health < 0.0 {
  139   138             println!("\nyou died (score: {})", game.player.xp as usize);

diff --git a/src/term.rs b/src/term.rs

@@ -121,7 +121,7 @@ impl Screen {
  121   121     pub fn resize(&mut self) {
  122   122         let (w, h) = get_terminal_size();
  123   123         self.width = w * 2;
  124    -1         self.height = (h - 1) * 3;
   -1   124         self.height = h * 3;
  125   125         self.pixels = vec![vec![[0, 0, 0]; self.width]; self.height];
  126   126     }
  127   127 
@@ -158,8 +158,6 @@ impl Screen {
  158   158                 print!("\n");
  159   159             }
  160   160         }
  161    -1 
  162    -1         ti::sgr0();
  163   161     }
  164   162 }
  165   163