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:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user