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.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use {
    crate::parse::formats::standard::*,
    std::fmt::{Display, Formatter, Result}
};

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

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