gsa 0.2.1

Game development library modelled after an imaginary console
Documentation
use glam::IVec2;
use std::fmt::{Display, Formatter};

/// Sprite which will be displayed on screen, unless tile=0
#[derive(Default, Copy, Clone)]
pub struct Sprite {
    /// Position on screen
    pub pos: IVec2,
    /// Tile index
    pub tile: u16,
    /// Priority, this sprite will be drawn above map of idx priority
    pub priority: u8,
}

impl Display for Sprite {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(
            f,
            "[pos: {}, tile: {}, priority: {}]",
            self.pos, self.tile, self.priority
        )
    }
}