#[non_exhaustive]pub struct Looks<'a> {
pub palette: &'a Palette,
pub terrains: &'a dyn Terrains,
pub lights: &'a Lighting,
}Expand description
What a skin paints a scene with besides the scene itself: the palette,
the game’s terrains and the lights a map may be in. Build it with
Looks::new (ADR-0039).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.palette: &'a PaletteThe colors.
terrains: &'a dyn TerrainsThe game’s terrains.
lights: &'a LightingThe lights, by the name a map’s look gives
(MapLook::light).
Implementations§
Source§impl<'a> Looks<'a>
impl<'a> Looks<'a>
Sourcepub const fn new(
palette: &'a Palette,
terrains: &'a dyn Terrains,
lights: &'a Lighting,
) -> Self
pub const fn new( palette: &'a Palette, terrains: &'a dyn Terrains, lights: &'a Lighting, ) -> Self
The looks of palette’s colors, the game’s terrains and its
lights.
Sourcepub fn named(&self, name: &str, fallback: EngineColor) -> Rgb
pub fn named(&self, name: &str, fallback: EngineColor) -> Rgb
The palette’s color called name, or the engine’s fallback
(a palette checked against the game’s colors has every name the
game uses, so this only guards against a bug).
Sourcepub fn range(&self, kind: RangeName) -> Rgb
pub fn range(&self, kind: RangeName) -> Rgb
The color a range of kind tints its tiles with: the palette’s of
its name.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Looks<'a>
impl<'a> !Send for Looks<'a>
impl<'a> !Sync for Looks<'a>
impl<'a> !UnwindSafe for Looks<'a>
impl<'a> Freeze for Looks<'a>
impl<'a> Unpin for Looks<'a>
impl<'a> UnsafeUnpin for Looks<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more