1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-05-05 10:17:45 +00:00

Fix Index2 parsing

This was a mess-up from a previous refactor, reading files from Index2
should work again!
This commit is contained in:
Joshua Goins 2025-04-28 22:33:52 -04:00
parent 475fa3b9aa
commit b7ab90e811

View file

@ -29,11 +29,11 @@ pub struct SegementDescriptor {
}
#[binrw]
#[brw(repr = u8)]
#[brw(repr = u32)]
#[derive(Debug, PartialEq)]
pub enum IndexType {
Index1,
Index2,
Index1 = 0,
Index2 = 2,
}
#[binrw]
@ -49,12 +49,12 @@ pub struct SqPackIndexHeader {
unknown_descriptor: SegementDescriptor,
#[brw(pad_after = 4)]
folder_descriptor: SegementDescriptor,
#[brw(pad_size_to = 4)]
pub(crate) index_type: IndexType,
#[brw(pad_before = 656)]
#[brw(pad_before = 652)]
#[brw(pad_after = 44)]
// The SHA1 of the bytes immediately before this
sha1_hash: [u8; 20],