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:
parent
de081d7b1d
commit
78a52142d1
8 changed files with 267 additions and 59 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue