diff --git a/src/tex.rs b/src/tex.rs index 0869313..4eff56b 100644 --- a/src/tex.rs +++ b/src/tex.rs @@ -70,12 +70,16 @@ struct TexHeader { } pub struct Texture { + /// Width of the texture in pixels pub width: u32, + /// Height of the texture in pixels pub height: u32, + /// Raw RGBA data pub rgba: Vec, } impl Texture { + /// Reads an existing TEX file pub fn from_existing(buffer: ByteSpan) -> Option { let mut cursor = Cursor::new(buffer); let header = TexHeader::read(&mut cursor).unwrap();