rltk setup

This commit is contained in:
Ben Morrison 2019-09-11 03:41:24 -04:00
parent d0a648bee5
commit 6443047b9b
Signed by: gbmor
GPG Key ID: 8F192E4720BB0DAC
3 changed files with 1498 additions and 3 deletions

1482
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,7 @@ keywords = ["game", "roguelike", "comedy", "satire"]
license = "GPLv3"
[dependencies]
regex = "1"
rltk = { git = "https://github.com/thebracket/rltk_rs" }
[profile.release]
opt-level = 3

View File

@ -1,3 +1,16 @@
fn main() {
println!("Hello, world!");
use rltk::{Console, GameState, Rltk};
struct State {}
impl GameState for State {
fn tick(&mut self, context: &mut Rltk) {
context.cls();
context.print(1, 1, "MORTAL WOMBAT MFERS");
}
}
fn main() {
let context =
Rltk::init_simple8x8(80, 50, "Mortal Wombat", "resources");
let gamestate = State {};
rltk::main_loop(context, gamestate);
}