Skip to content

Commit 201ec8a

Browse files
committed
Update for Rust 1.0.0 and newest tcod
1 parent c2d4501 commit 201ec8a

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

Cargo.lock

Lines changed: 17 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
name = "dwemthys"
44
version = "0.0.1"
55
authors = ["jmcfarland"]
6-
build = "sh .build.sh"
76

87
[dependencies.tcod]
98

src/main.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
extern crate tcod;
2-
use tcod::{Console, background_flag, key_code, Special};
2+
use tcod::Key::Special;
3+
use tcod::{Console, BackgroundFlag, KeyCode};
34

45
fn main() {
56
let mut con = Console::init_root(80, 50, "libtcod Rust tutorial", false);
67
let mut exit = false;
78
while !(Console::window_closed() || exit) {
89
con.clear();
9-
con.put_char(40, 25, '@', background_flag::Set);
10+
con.put_char(40, 25, '@', BackgroundFlag::Set);
1011
Console::flush();
1112
let keypress = Console::wait_for_keypress(true);
1213
match keypress.key {
13-
Special(key_code::Escape) => exit = true,
14+
Special(KeyCode::Escape) => exit = true,
1415
_ => {}
1516
}
1617
}

0 commit comments

Comments
 (0)