get rid of rozinante
parent
d9ca7a3866
commit
7bc56dc171
|
@ -50,6 +50,5 @@
|
|||
#[macro_use]
|
||||
pub mod durandal;
|
||||
pub mod marathon;
|
||||
pub mod rozinante;
|
||||
|
||||
// EOF
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
//! Library for GUI programs.
|
||||
|
||||
pub mod color;
|
||||
pub mod draw;
|
||||
pub mod editor;
|
||||
|
||||
// EOF
|
|
@ -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
|
|
@ -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
|
|
@ -1,7 +0,0 @@
|
|||
//! Map editor handling.
|
||||
|
||||
pub mod record;
|
||||
pub mod screen;
|
||||
pub mod session;
|
||||
|
||||
// EOF
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue