nomap 0.2.1

A parser for the `.map` file format used by Quake 1 & 2 as well as Half-Life 1, implemented using the nom parsing framework.
use {
    crate::parse::formats::valve::*,
    std::fmt::{Display, Formatter, Result}
};

impl Display for Scale {
    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
        write!(f, "{} {}", self.u, self.v)
    }
}

impl Display for Axis {
    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
        write!(f, "[ {} {} ]", self.normal, self.offset)
    }
}

impl Display for Axes {
    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
        write!(f, "{} {}", self.u, self.v)
    }
}

impl Display for TextureAlignment {
    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
        write!(f, "{} {} {}", self.axes, self.rotation, self.scale)
    }
}