mirror of
https://github.com/redstrate/Physis.git
synced 2025-05-05 18:27:46 +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:
parent
475fa3b9aa
commit
b7ab90e811
1 changed files with 5 additions and 5 deletions
|
@ -29,11 +29,11 @@ pub struct SegementDescriptor {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[binrw]
|
#[binrw]
|
||||||
#[brw(repr = u8)]
|
#[brw(repr = u32)]
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum IndexType {
|
pub enum IndexType {
|
||||||
Index1,
|
Index1 = 0,
|
||||||
Index2,
|
Index2 = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[binrw]
|
#[binrw]
|
||||||
|
@ -49,12 +49,12 @@ pub struct SqPackIndexHeader {
|
||||||
|
|
||||||
unknown_descriptor: SegementDescriptor,
|
unknown_descriptor: SegementDescriptor,
|
||||||
|
|
||||||
|
#[brw(pad_after = 4)]
|
||||||
folder_descriptor: SegementDescriptor,
|
folder_descriptor: SegementDescriptor,
|
||||||
|
|
||||||
#[brw(pad_size_to = 4)]
|
|
||||||
pub(crate) index_type: IndexType,
|
pub(crate) index_type: IndexType,
|
||||||
|
|
||||||
#[brw(pad_before = 656)]
|
#[brw(pad_before = 652)]
|
||||||
#[brw(pad_after = 44)]
|
#[brw(pad_after = 44)]
|
||||||
// The SHA1 of the bytes immediately before this
|
// The SHA1 of the bytes immediately before this
|
||||||
sha1_hash: [u8; 20],
|
sha1_hash: [u8; 20],
|
||||||
|
|
Loading…
Add table
Reference in a new issue