about summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-07-06T19·32-0400
committerGriffin Smith <root@gws.fyi>2019-07-06T19·32-0400
commit78a52142d191d25a74cb2124d5cca8a69d51ba7f (patch)
treedd023a823bae6cc427e32a497bd68db85bbfab4b /src/main.rs
parentde081d7b1d0b791b2e61f9cde7369ea11647e0ae (diff)
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.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 24d1bbba29ca..f2c3d00f96d7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -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() {