Make all drawing happen to a viewport

We now have an inner and outer viewport, and entity positions are
relative to the inner one while drawing happens to the outer one.
This commit is contained in:
Griffin Smith 2019-07-06 15:32:38 -04:00
parent de081d7b1d
commit 78a52142d1
8 changed files with 267 additions and 59 deletions

View file

@ -23,6 +23,7 @@ use prettytable::format::consts::FORMAT_BOX_CHARS;
use settings::Settings;
use std::io::{self, StdinLock, StdoutLock};
use std::panic;
use termion::raw::IntoRawMode;
use termion::raw::RawTerminal;
@ -34,8 +35,9 @@ fn init(
w: u16,
h: u16,
) {
panic::set_hook(Box::new(|info| error!("{}", info)));
let game = Game::new(settings, stdout, stdin, w, h);
game.run()
game.run().unwrap()
}
fn main() {