mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-25 22:07:44 +00:00
Add new unknown vertex type found in Dawntrail benchmark
Not sure what it's used for yet, but needed to be added so parsing doesn't completely fail.
This commit is contained in:
parent
04025e0707
commit
7c3d5a3142
2 changed files with 13 additions and 1 deletions
11
src/model.rs
11
src/model.rs
|
@ -505,6 +505,12 @@ impl MDL {
|
|||
VertexType::ByteFloat4 => {
|
||||
vertices[k as usize].bone_weight = MDL::read_byte_float4(&mut cursor).unwrap();
|
||||
}
|
||||
VertexType::Byte4 => {
|
||||
// TODO: Unimplemented, needed for Dawntrail?
|
||||
}
|
||||
VertexType::Unknown1 => {
|
||||
// TODO: Unimplemented, needed for Dawntrail?
|
||||
}
|
||||
_ => {
|
||||
panic!("Unexpected vertex type for blendweight: {:#?}", element.vertex_type);
|
||||
}
|
||||
|
@ -515,6 +521,9 @@ impl MDL {
|
|||
VertexType::Byte4 => {
|
||||
vertices[k as usize].bone_id = MDL::read_byte4(&mut cursor).unwrap();
|
||||
}
|
||||
VertexType::Unknown1 => {
|
||||
// TODO: Unimplemented, needed for Dawntrail?
|
||||
}
|
||||
_ => {
|
||||
panic!("Unexpected vertex type for blendindice: {:#?}", element.vertex_type);
|
||||
}
|
||||
|
@ -1014,7 +1023,7 @@ impl ModelData {
|
|||
+ self.header.shape_mesh_count as u32 * 12
|
||||
+ self.header.shape_value_count as u32 * 4
|
||||
+ 4 // SubmeshBoneMapSize
|
||||
+ self.submesh_bone_map.len() as u32 * 2
|
||||
//+ self.submesh_bone_map.len() as u32 * 2
|
||||
+ self.padding_amount as u32 + 1 // PaddingAmount and Padding
|
||||
+ (4 * 32) // 4 BoundingBoxes
|
||||
+ (self.header.bone_count as u32 * 32)
|
||||
|
|
|
@ -20,6 +20,9 @@ pub enum VertexType {
|
|||
ByteFloat4 = 8,
|
||||
Half2 = 13,
|
||||
Half4 = 14,
|
||||
|
||||
// Unknown vertex type, I seen them used in BlendIndices in Dawntrail
|
||||
Unknown1 = 17
|
||||
}
|
||||
|
||||
#[binrw]
|
||||
|
|
Loading…
Add table
Reference in a new issue