From 7bc56dc171bb2b55c62c0e49ff44eab56d5f9086 Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Wed, 15 May 2019 17:55:03 -0400 Subject: [PATCH] get rid of rozinante --- source/lib.rs | 1 - source/rozinante.rs | 7 --- source/rozinante/color.rs | 8 ---- source/rozinante/draw.rs | 69 ------------------------------ source/rozinante/editor.rs | 7 --- source/rozinante/editor/record.rs | 18 -------- source/rozinante/editor/screen.rs | 12 ------ source/rozinante/editor/session.rs | 20 --------- 8 files changed, 142 deletions(-) delete mode 100644 source/rozinante.rs delete mode 100644 source/rozinante/color.rs delete mode 100644 source/rozinante/draw.rs delete mode 100644 source/rozinante/editor.rs delete mode 100644 source/rozinante/editor/record.rs delete mode 100644 source/rozinante/editor/screen.rs delete mode 100644 source/rozinante/editor/session.rs diff --git a/source/lib.rs b/source/lib.rs index c119932..842c7d2 100644 --- a/source/lib.rs +++ b/source/lib.rs @@ -50,6 +50,5 @@ #[macro_use] pub mod durandal; pub mod marathon; -pub mod rozinante; // EOF diff --git a/source/rozinante.rs b/source/rozinante.rs deleted file mode 100644 index 260c5eb..0000000 --- a/source/rozinante.rs +++ /dev/null @@ -1,7 +0,0 @@ -//! Library for GUI programs. - -pub mod color; -pub mod draw; -pub mod editor; - -// EOF diff --git a/source/rozinante/color.rs b/source/rozinante/color.rs deleted file mode 100644 index 790c9ee..0000000 --- a/source/rozinante/color.rs +++ /dev/null @@ -1,8 +0,0 @@ -//! Color presets. - -use crate::durandal::image::Color16; - -pub const RED: Color16 = Color16::new(0xFFFF, 0, 0); -pub const DARK_RED: Color16 = Color16::new(0x4700, 0, 0); - -// EOF diff --git a/source/rozinante/draw.rs b/source/rozinante/draw.rs deleted file mode 100644 index 54292a5..0000000 --- a/source/rozinante/draw.rs +++ /dev/null @@ -1,69 +0,0 @@ -//! GUI drawing capabilities. - -use crate::durandal::image::Color; - -/// An image possibly cached into a native driver's memory. -pub trait CacheImage -{ - /// The width of the image. - fn w(&self) -> Coord; - - /// The width of the image. - fn h(&self) -> Coord; -} - -/// A native vector drawing area. -pub trait DrawArea -{ - /// The native `CacheImage` type for this `DrawArea`. - type NativeImage: CacheImage; - - /// The width of the entire area. - fn w(&self) -> Coord; - - /// The height of the entire area. - fn h(&self) -> Coord; - - /// Fills the entire screen with `cr`. Will also default all settings. - fn clear(&mut self, cr: impl Color); - - /// Changes the width for lines. The default is `1`. - fn line_width(&mut self, width: u8); - - /// Draws a line from `p1` to `p2` with color `cr`. - fn line(&mut self, p1: Point, p2: Point, cr: impl Color); - - /// Draws a rectangle `rect` of color `cr`. - fn rect(&mut self, rect: Rect, cr: impl Color); - - /// Draws the Unicode `text` at `pos` stroked with color `cr`. - fn text(&mut self, pos: Point, text: &str, cr: impl Color); - - /// Draws `im` at `pos`, starting from the top left column. - fn image(&mut self, pos: Point, im: &Self::NativeImage); -} - -/// A type capable of representing any coordinate on any axis. -pub type Coord = i32; - -/// A 2-dimensional point. -pub type Point = (Coord, Coord); - -/// A 2-dimensional rectangle. -#[derive(Copy, Clone, Debug)] -pub struct Rect -{ - /// The horizontal coordinate to start at, from the left. - pub x: Coord, - - /// The vertical coordinate to start at, from the top. - pub y: Coord, - - /// The width of the rectangle. - pub w: Coord, - - /// The height of the rectangle. - pub h: Coord, -} - -// EOF diff --git a/source/rozinante/editor.rs b/source/rozinante/editor.rs deleted file mode 100644 index 9b3dae3..0000000 --- a/source/rozinante/editor.rs +++ /dev/null @@ -1,7 +0,0 @@ -//! Map editor handling. - -pub mod record; -pub mod screen; -pub mod session; - -// EOF diff --git a/source/rozinante/editor/record.rs b/source/rozinante/editor/record.rs deleted file mode 100644 index 1f9abc9..0000000 --- a/source/rozinante/editor/record.rs +++ /dev/null @@ -1,18 +0,0 @@ -//! Map editor records, or saved client state. - -use crate::marathon::map; - -impl Default for Record -{ - #[inline] - fn default() -> Self {Self{info: map::minf::Minf::default()}} -} - -/// Copyable, versioned map state. -#[derive(Clone, Debug)] -pub struct Record -{ - pub info: map::minf::Minf, -} - -// EOF diff --git a/source/rozinante/editor/screen.rs b/source/rozinante/editor/screen.rs deleted file mode 100644 index 10c7425..0000000 --- a/source/rozinante/editor/screen.rs +++ /dev/null @@ -1,12 +0,0 @@ -//! Map editor screen, or current UI state. - -pub trait Screen -{ - /// Opens the editor with a new map. - fn open_new(&mut self); - - /// Opens the editor with a new map. - fn open_buf(&mut self, b: &[u8]); -} - -// EOF diff --git a/source/rozinante/editor/session.rs b/source/rozinante/editor/session.rs deleted file mode 100644 index 3470694..0000000 --- a/source/rozinante/editor/session.rs +++ /dev/null @@ -1,20 +0,0 @@ -//! Map editor session, or current client state. - -impl Session -{ - /// Opens the editor with a new map. - fn open_new(&mut self) - { - } - - /// Opens the editor with a new map. - fn open_buf(&mut self, b: &[u8]) - { - } -} - -struct Session -{ -} - -// EOF