mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-14 11:45:01 +01:00
more
This commit is contained in:
parent
ed51ba2b9c
commit
c5a1baba26
2 changed files with 2 additions and 56 deletions
30
tiles.rs
30
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<Layer>(pub u16, PhantomData<Layer>);
|
||||
|
||||
|
|
@ -20,13 +18,6 @@ impl<Layer> Debug for TileId<Layer> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<Layer> TileId<Layer> {
|
||||
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<Self> {
|
||||
loop {}
|
||||
}
|
||||
}
|
||||
|
||||
impl Mid {
|
||||
pub fn unknown_def() -> TileDef<Self> {
|
||||
loop {}
|
||||
}
|
||||
}
|
||||
|
||||
impl Fg {
|
||||
pub fn unknown_def() -> TileDef<Self> {
|
||||
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue