mirror of
https://codeberg.org/icewind/vmdl.git
synced 2026-06-03 16:44:11 +02:00
fix stripheader
This commit is contained in:
parent
5e276ed38e
commit
dda97e9856
2 changed files with 4 additions and 4 deletions
|
|
@ -186,7 +186,7 @@ impl StripGroup {
|
||||||
Ok(reader.read_le()?)
|
Ok(reader.read_le()?)
|
||||||
})
|
})
|
||||||
.collect::<Result<_>>()?,
|
.collect::<Result<_>>()?,
|
||||||
flags: header.flags,
|
flags: dbg!(header).flags,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -204,7 +204,7 @@ impl Strip {
|
||||||
Ok(Strip {
|
Ok(Strip {
|
||||||
vertices: header.vertex_indexes(),
|
vertices: header.vertex_indexes(),
|
||||||
indices: header.index_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 {
|
pub fn indices(&self) -> impl Iterator<Item = [usize; 3]> + 'static {
|
||||||
if self.flags.contains(StripFlags::IS_TRI_STRIP) {
|
if self.flags.contains(StripFlags::IS_TRI_STRIP) {
|
||||||
dbg!("strip");
|
|
||||||
let offset = self.indices.start;
|
let offset = self.indices.start;
|
||||||
Either::Left((0..self.indices.len()).map(move |i| {
|
Either::Left((0..self.indices.len()).map(move |i| {
|
||||||
let cw = i & 1;
|
let cw = i & 1;
|
||||||
|
|
|
||||||
|
|
@ -153,12 +153,13 @@ pub struct StripHeader {
|
||||||
index_offset: i32,
|
index_offset: i32,
|
||||||
vertex_count: i32,
|
vertex_count: i32,
|
||||||
vertex_offset: i32,
|
vertex_offset: i32,
|
||||||
|
pub bone_count: u16,
|
||||||
pub flags: StripFlags,
|
pub flags: StripFlags,
|
||||||
bone_state_change_count: i32,
|
bone_state_change_count: i32,
|
||||||
bone_state_change_offset: 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! {
|
bitflags! {
|
||||||
#[derive(BinRead)]
|
#[derive(BinRead)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue