1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-20 11:47:46 +00:00

Begin work for parsing binary havok files

This commit is contained in:
Joshua Goins 2023-08-02 16:28:08 -04:00
parent f036f741a9
commit 52f889bb79

View file

@ -1,7 +1,33 @@
use binrw::{binread, until_eof};
use crate::gamedata::MemoryBuffer; use crate::gamedata::MemoryBuffer;
use glam::Mat4; use glam::Mat4;
use hard_xml::XmlRead; use hard_xml::XmlRead;
#[binread]
struct SKLB_v1 {
unk_offset: i16,
havok_offset: i16
}
#[binread]
struct SKLB_v2 {
unk_offset: i32,
havok_offset: i32
}
#[binread]
#[br(magic = 0x736B6C62i32)]
struct SKLB {
version_one: i16,
version_two: i16,
havok_offset: i32,
#[br(count = havok_offset)]
raw_header: Vec<u8>,
#[br(parse_with = until_eof)]
raw_data: Vec<u8>
}
#[derive(Debug)] #[derive(Debug)]
pub struct Bone { pub struct Bone {
pub name: String, pub name: String,