From c5a1baba268fe2f69119b916328017cc3d758144 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Mon, 17 Apr 2023 22:07:58 +0200 Subject: [PATCH] more --- src/tiles.rs | 28 +--------------------------- tiles.rs | 30 +----------------------------- 2 files changed, 2 insertions(+), 56 deletions(-) diff --git a/src/tiles.rs b/src/tiles.rs index 61f8d49..2130ac4 100644 --- a/src/tiles.rs +++ b/src/tiles.rs @@ -1,10 +1,8 @@ -use std::{fmt::Debug, marker::PhantomData, ops::Index}; +use std::{fmt::Debug, marker::PhantomData}; use egui_inspect::{derive::Inspect, Inspect}; use serde::{Deserialize, Serialize}; -use crate::{math::TILE_SIZE, texture_atlas::RectMap}; - #[derive(Inspect, PartialEq, Eq)] pub struct TileId(pub u16, PhantomData); @@ -20,13 +18,6 @@ impl Debug for TileId { } } -impl TileId { - pub fn empty(&self) -> bool { - loop {} - } - pub const EMPTY: Self = Self(0, PhantomData); -} - #[derive(Debug)] pub enum Bg {} #[derive(Debug)] @@ -34,23 +25,6 @@ pub enum Mid {} #[derive(Debug)] pub enum Fg {} -impl Bg { - pub fn unknown_def() -> TileDef { - loop {} - } -} - -impl Mid { - pub fn unknown_def() -> TileDef { - loop {} - } -} - -impl Fg { - pub fn unknown_def() -> TileDef { - loop {} - } -} pub trait TileLayer { /// Definitions specific to this layer diff --git a/tiles.rs b/tiles.rs index 61f8d49..179788e 100644 --- a/tiles.rs +++ b/tiles.rs @@ -1,10 +1,8 @@ -use std::{fmt::Debug, marker::PhantomData, ops::Index}; +use std::{fmt::Debug, marker::PhantomData}; use egui_inspect::{derive::Inspect, Inspect}; use serde::{Deserialize, Serialize}; -use crate::{math::TILE_SIZE, texture_atlas::RectMap}; - #[derive(Inspect, PartialEq, Eq)] pub struct TileId(pub u16, PhantomData); @@ -20,13 +18,6 @@ impl Debug for TileId { } } -impl TileId { - pub fn empty(&self) -> bool { - loop {} - } - pub const EMPTY: Self = Self(0, PhantomData); -} - #[derive(Debug)] pub enum Bg {} #[derive(Debug)] @@ -34,24 +25,6 @@ pub enum Mid {} #[derive(Debug)] pub enum Fg {} -impl Bg { - pub fn unknown_def() -> TileDef { - loop {} - } -} - -impl Mid { - pub fn unknown_def() -> TileDef { - loop {} - } -} - -impl Fg { - pub fn unknown_def() -> TileDef { - loop {} - } -} - pub trait TileLayer { /// Definitions specific to this layer type SpecificDef; @@ -127,7 +100,6 @@ where } } - #[derive(Serialize, Deserialize, Debug, Inspect, Clone, Copy)] pub struct TileBb { pub x: u8,