Vertex Loading

Added the ability to load vertex data from the WAD. Still needs
some processing to make more robust, but for now is loading data.
This commit is contained in:
2025-03-30 13:55:46 -04:00
parent 16f21694d9
commit ffb7b9d9c7
13 changed files with 137 additions and 22 deletions

View File

@@ -41,3 +41,11 @@ pub fn read_u32_le(bytes: &[u8]) -> u32 {
u32::from_le_bytes(bytes[..4].try_into().unwrap())
}
}
pub fn read_i16_le(bytes: &[u8]) -> i16 {
if bytes.len() < 2 {
0
} else {
i16::from_le_bytes(bytes[..2].try_into().unwrap())
}
}