From 7eb11e412f95020576bb502733922c1a1f3d8eb4 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 2 Dec 2023 19:55:50 -0500 Subject: [PATCH] Improve TEX documentation --- src/tex.rs | 4 ++++ 1 file changed, 4 insertions(+) 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();