pub enum SpriteKind {
Show 21 variants
Character,
Campfire,
LogSeat,
Telescope,
Lantern,
Spellbook,
CampStove,
CoffeeMug,
FallenHat,
BookClosed,
GuitarRest,
Bucket,
KiteRest,
StonePile,
Easel,
Snowman,
Basket,
PicnicBasket,
ChessTable,
PracticeWall,
SkisRest,
}Expand description
What a sprite instance shows.
Variants§
Character
The character (placeholder pixel map in M1).
Campfire
LogSeat
Unattended variant: an empty log seat by the fire.
Telescope
Lantern
Spellbook
CampStove
CoffeeMug
FallenHat
BookClosed
GuitarRest
Bucket
KiteRest
StonePile
Easel
Snowman
Basket
PicnicBasket
ChessTable
PracticeWall
SkisRest
Implementations§
Source§impl SpriteKind
impl SpriteKind
Sourcepub const BEFORE_CHARACTER: usize = 12
pub const BEFORE_CHARACTER: usize = 12
How many of ALL reserve their colours before the
character’s in a palette. Kinds added later go after them, so the
palette indices of scenes made before stay the same.
Sourcepub const ALL: [SpriteKind; 21]
pub const ALL: [SpriteKind; 21]
Every kind, so palettes can reserve all sprite colours up front. New kinds go at the end.
Sourcepub fn box_size(self) -> (u32, u32)
pub fn box_size(self) -> (u32, u32)
Layout box in sprite pixels. The character’s box is the drawn art’s (body plus arms, feet included), not the placeholder’s.
pub fn map(self) -> &'static PixelMap
Trait Implementations§
Source§impl Clone for SpriteKind
impl Clone for SpriteKind
impl Copy for SpriteKind
Source§impl Debug for SpriteKind
impl Debug for SpriteKind
Source§impl<'de> Deserialize<'de> for SpriteKind
impl<'de> Deserialize<'de> for SpriteKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SpriteKind
Source§impl PartialEq for SpriteKind
impl PartialEq for SpriteKind
Source§impl Serialize for SpriteKind
impl Serialize for SpriteKind
impl StructuralPartialEq for SpriteKind
Auto Trait Implementations§
impl Forget for SpriteKind
impl Freeze for SpriteKind
impl Move for SpriteKind
impl RefUnwindSafe for SpriteKind
impl Send for SpriteKind
impl Sync for SpriteKind
impl Unpin for SpriteKind
impl UnsafeUnpin for SpriteKind
impl UnwindSafe for SpriteKind
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