fix stripheader

This commit is contained in:
Robin Appelman 2022-03-12 16:07:20 +01:00
commit dda97e9856
2 changed files with 4 additions and 4 deletions

View file

@ -186,7 +186,7 @@ impl StripGroup {
Ok(reader.read_le()?)
})
.collect::<Result<_>>()?,
flags: header.flags,
flags: dbg!(header).flags,
})
}
}
@ -204,7 +204,7 @@ impl Strip {
Ok(Strip {
vertices: header.vertex_indexes(),
indices: header.index_indexes(),
flags: header.flags,
flags: dbg!(header).flags,
})
}
@ -214,7 +214,6 @@ impl Strip {
pub fn indices(&self) -> impl Iterator<Item = [usize; 3]> + 'static {
if self.flags.contains(StripFlags::IS_TRI_STRIP) {
dbg!("strip");
let offset = self.indices.start;
Either::Left((0..self.indices.len()).map(move |i| {
let cw = i & 1;

View file

@ -153,12 +153,13 @@ pub struct StripHeader {
index_offset: i32,
vertex_count: i32,
vertex_offset: i32,
pub bone_count: u16,
pub flags: StripFlags,
bone_state_change_count: i32,
bone_state_change_offset: i32,
}
static_assertions::const_assert_eq!(size_of::<StripHeader>(), 25);
static_assertions::const_assert_eq!(size_of::<StripHeader>(), 27);
bitflags! {
#[derive(BinRead)]