1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-07-22 08:37:46 +00:00

Add SqPackFileType enum

This commit is contained in:
Joshua Goins 2025-03-06 16:20:29 -05:00
parent 75aee9e9d8
commit 1c04657822

View file

@ -11,14 +11,24 @@ use crate::crc::Jamcrc;
use binrw::binrw;
use binrw::BinRead;
/// The type of this SqPack file.
#[binrw]
#[br(magic = b"SqPack\0\0")]
#[brw(repr = u8)]
enum SqPackFileType {
/// Dat files.
Data = 0x1,
// Index/Index2 files.
Index = 0x2,
}
#[binrw]
#[brw(magic = b"SqPack\0\0")]
pub struct SqPackHeader {
platform_id: Platform,
#[br(pad_before = 3)]
#[brw(pad_before = 3)]
size: u32,
version: u32,
file_type: u32,
file_type: SqPackFileType,
}
#[binrw]