From 10a479876f12221a20390697c3874b71c07af73a Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 3 Apr 2013 02:38:12 -0500 Subject: move the high-level stuff to a separate module --- test/rl.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'test/rl.rs') diff --git a/test/rl.rs b/test/rl.rs index f8e8afe..e7c0643 100644 --- a/test/rl.rs +++ b/test/rl.rs @@ -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, +fn draw_map (term: &mut Term, color: Option, 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, } } -fn draw_character (term: &mut term::Term, color: Option, +fn draw_character (term: &mut Term, color: Option, x: uint, y: uint) { term.move(x, y); match color { @@ -25,7 +26,7 @@ fn draw_character (term: &mut term::Term, color: Option, term.move(x, y); } -fn draw_ground (term: &mut term::Term, color: Option, +fn draw_ground (term: &mut Term, color: Option, 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; -- cgit v1.2.3-54-g00ecf