2019-03-04 02:18:57 -08:00
|
|
|
use maraiah::{durandal::image::*,
|
|
|
|
marathon::*,
|
|
|
|
rozinante::{color::*, draw::*}};
|
2019-03-02 15:26:55 -08:00
|
|
|
|
2019-03-02 17:49:35 -08:00
|
|
|
pub fn draw_map_none<D, I>(d: &D, im: &I)
|
|
|
|
where D: DrawArea<NativeImage = I>,
|
|
|
|
I: CacheImage
|
2019-03-02 15:26:55 -08:00
|
|
|
{
|
2019-03-02 17:49:35 -08:00
|
|
|
d.clear(Color16::new(0, 0, 0));
|
2019-03-02 15:26:55 -08:00
|
|
|
|
2019-03-02 17:49:35 -08:00
|
|
|
d.image((d.w() / 2 - im.w() / 2, d.h() / 2 - im.h() / 2), im);
|
2019-03-02 15:26:55 -08:00
|
|
|
|
2019-03-02 17:49:35 -08:00
|
|
|
d.rect(Rect{x: 0, y: 0, w: d.w(), h: 18}, CR_DARK_RED);
|
2019-03-02 21:45:04 -08:00
|
|
|
d.text((4, 14), "Map Required To Proceed", CR_RED);
|
2019-03-02 15:26:55 -08:00
|
|
|
|
|
|
|
d.rect(Rect{x: 0, y: d.h() - 18, w: d.w(), h: 18}, CR_DARK_RED);
|
2019-03-02 21:45:04 -08:00
|
|
|
d.text((4, d.h() - 4), "CAS.qterm//CyberAcme Systems Inc.", CR_RED);
|
|
|
|
}
|
|
|
|
|
2019-03-18 05:21:30 -07:00
|
|
|
pub fn new_map() -> MapEditorState
|
2019-03-02 21:45:04 -08:00
|
|
|
{
|
|
|
|
let info = Default::default();
|
|
|
|
|
2019-03-18 05:21:30 -07:00
|
|
|
let ed = MapEditorState{info};
|
2019-03-02 21:45:04 -08:00
|
|
|
|
2019-03-18 05:21:30 -07:00
|
|
|
ed
|
2019-03-02 21:45:04 -08:00
|
|
|
}
|
|
|
|
|
2019-03-18 05:21:30 -07:00
|
|
|
impl Drop for MapEditorState
|
2019-03-02 21:45:04 -08:00
|
|
|
{
|
2019-03-18 05:21:30 -07:00
|
|
|
fn drop(&mut self) {eprintln!("dropping MapEditorState");}
|
2019-03-02 21:45:04 -08:00
|
|
|
}
|
|
|
|
|
2019-03-18 05:21:30 -07:00
|
|
|
pub struct MapEditorState
|
2019-03-02 21:45:04 -08:00
|
|
|
{
|
|
|
|
info: map::Minf,
|
2019-03-02 15:26:55 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
// EOF
|