diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-04-03 02:38:12 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-04-03 02:38:12 -0500 |
commit | 10a479876f12221a20390697c3874b71c07af73a (patch) | |
tree | b155239ea87f2081b48b9f67edcf07af2efccc59 /test/rl.rs | |
parent | 7ac0735caa05ea48e8ad14ec9120f4fd2b8bdcbd (diff) | |
download | rust-term-10a479876f12221a20390697c3874b71c07af73a.tar.gz rust-term-10a479876f12221a20390697c3874b71c07af73a.zip |
move the high-level stuff to a separate module
Diffstat (limited to 'test/rl.rs')
-rw-r--r-- | test/rl.rs | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1,8 +1,9 @@ extern mod term; -use term::{KeyCharacter,KeyEscape,KeyUp,KeyDown,KeyLeft,KeyRight,KeyF}; +use term::hexes::Term; +use term::hexes::{KeyCharacter,KeyEscape,KeyUp,KeyDown,KeyLeft,KeyRight,KeyF}; use term::info::{Color,ColorRed}; -fn draw_map (term: &mut term::Term, color: Option<Color>, +fn draw_map (term: &mut Term, color: Option<Color>, rows: uint, cols: uint) { match color { Some(c) => term.fg_color(c), @@ -14,7 +15,7 @@ fn draw_map (term: &mut term::Term, color: Option<Color>, } } -fn draw_character (term: &mut term::Term, color: Option<Color>, +fn draw_character (term: &mut Term, color: Option<Color>, x: uint, y: uint) { term.move(x, y); match color { @@ -25,7 +26,7 @@ fn draw_character (term: &mut term::Term, color: Option<Color>, term.move(x, y); } -fn draw_ground (term: &mut term::Term, color: Option<Color>, +fn draw_ground (term: &mut Term, color: Option<Color>, x: uint, y: uint) { term.move(x, y); match color { @@ -39,7 +40,7 @@ fn main () { let (cols, rows) = term::size(); { - let mut term = term::Term(); + let mut term = Term(); let mut (x, y) = (0u, 0u); let mut cursor = true; |