mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 12:25:02 +01:00
more
This commit is contained in:
parent
c5a1baba26
commit
d10e464104
2 changed files with 0 additions and 46 deletions
24
src/tiles.rs
24
src/tiles.rs
|
|
@ -25,7 +25,6 @@ pub enum Mid {}
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum Fg {}
|
pub enum Fg {}
|
||||||
|
|
||||||
|
|
||||||
pub trait TileLayer {
|
pub trait TileLayer {
|
||||||
/// Definitions specific to this layer
|
/// Definitions specific to this layer
|
||||||
type SpecificDef;
|
type SpecificDef;
|
||||||
|
|
@ -43,28 +42,6 @@ impl TileLayer for Fg {
|
||||||
type SpecificDef = ();
|
type SpecificDef = ();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type BgTileId = TileId<Bg>;
|
|
||||||
pub type MidTileId = TileId<Mid>;
|
|
||||||
pub type FgTileId = TileId<Fg>;
|
|
||||||
|
|
||||||
impl BgTileId {
|
|
||||||
pub const DIRT: Self = Self(1, PhantomData);
|
|
||||||
pub const STONE: Self = Self(2, PhantomData);
|
|
||||||
}
|
|
||||||
|
|
||||||
impl MidTileId {
|
|
||||||
pub const DIRT: Self = Self(1, PhantomData);
|
|
||||||
pub const STONE: Self = Self(2, PhantomData);
|
|
||||||
pub const TORCH: Self = Self(3, PhantomData);
|
|
||||||
pub const PLATFORM: Self = Self(4, PhantomData);
|
|
||||||
pub const PANZERIUM: Self = Self(5, PhantomData);
|
|
||||||
pub const UNBREAKANIUM: Self = Self(6, PhantomData);
|
|
||||||
}
|
|
||||||
|
|
||||||
impl FgTileId {
|
|
||||||
pub const COAL: Self = Self(1, PhantomData);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Inspect)]
|
#[derive(Serialize, Deserialize, Inspect)]
|
||||||
pub struct TileDef<Layer: TileLayer>
|
pub struct TileDef<Layer: TileLayer>
|
||||||
where
|
where
|
||||||
|
|
@ -101,7 +78,6 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, Inspect, Clone, Copy)]
|
#[derive(Serialize, Deserialize, Debug, Inspect, Clone, Copy)]
|
||||||
pub struct TileBb {
|
pub struct TileBb {
|
||||||
pub x: u8,
|
pub x: u8,
|
||||||
|
|
|
||||||
22
tiles.rs
22
tiles.rs
|
|
@ -42,28 +42,6 @@ impl TileLayer for Fg {
|
||||||
type SpecificDef = ();
|
type SpecificDef = ();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type BgTileId = TileId<Bg>;
|
|
||||||
pub type MidTileId = TileId<Mid>;
|
|
||||||
pub type FgTileId = TileId<Fg>;
|
|
||||||
|
|
||||||
impl BgTileId {
|
|
||||||
pub const DIRT: Self = Self(1, PhantomData);
|
|
||||||
pub const STONE: Self = Self(2, PhantomData);
|
|
||||||
}
|
|
||||||
|
|
||||||
impl MidTileId {
|
|
||||||
pub const DIRT: Self = Self(1, PhantomData);
|
|
||||||
pub const STONE: Self = Self(2, PhantomData);
|
|
||||||
pub const TORCH: Self = Self(3, PhantomData);
|
|
||||||
pub const PLATFORM: Self = Self(4, PhantomData);
|
|
||||||
pub const PANZERIUM: Self = Self(5, PhantomData);
|
|
||||||
pub const UNBREAKANIUM: Self = Self(6, PhantomData);
|
|
||||||
}
|
|
||||||
|
|
||||||
impl FgTileId {
|
|
||||||
pub const COAL: Self = Self(1, PhantomData);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Inspect)]
|
#[derive(Serialize, Deserialize, Inspect)]
|
||||||
pub struct TileDef<Layer: TileLayer>
|
pub struct TileDef<Layer: TileLayer>
|
||||||
where
|
where
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue