1use std::io::Cursor;
5
6use crate::ByteSpan;
7use binrw::BinRead;
8use binrw::binread;
9
10#[binread]
11#[derive(Debug)]
12#[brw(little)]
13#[allow(dead_code)]
14struct PhybHeader {
15 version: [u8; 4],
16
17 #[br(if(version[0] > 0))]
19 data_type: u32,
20
21 collision_offset: u32,
22 simulator_offset: u32,
23}
24
25#[derive(Debug)]
26pub struct Phyb {}
27
28impl Phyb {
29 pub fn from_existing(buffer: ByteSpan) -> Option<Self> {
31 let mut cursor = Cursor::new(buffer);
32 PhybHeader::read(&mut cursor).ok()?;
33
34 Some(Phyb {})
35 }
36}