rltk setup
This commit is contained in:
parent
d0a648bee5
commit
6443047b9b
1482
Cargo.lock
generated
Normal file
1482
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -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
|
||||
|
|
17
src/main.rs
17
src/main.rs
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user