2025-02-23 16:03:08 -05:00
|
|
|
use crate::Property;
|
2025-02-23 15:25:50 -05:00
|
|
|
use crate::common::read_string_with_length;
|
2025-02-19 19:34:13 -05:00
|
|
|
use binrw::binrw;
|
|
|
|
|
|
|
|
#[binrw]
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct SetEntry {
|
2025-02-23 15:25:50 -05:00
|
|
|
#[br(parse_with = read_string_with_length)]
|
2025-02-19 19:34:13 -05:00
|
|
|
#[bw(ignore)]
|
|
|
|
pub unk_name: String,
|
|
|
|
|
2025-02-23 15:25:50 -05:00
|
|
|
#[br(parse_with = read_string_with_length)]
|
2025-02-19 19:34:13 -05:00
|
|
|
#[bw(ignore)]
|
|
|
|
pub unk_type: String,
|
|
|
|
|
|
|
|
#[br(args { magic: &unk_type })]
|
2025-02-23 16:03:08 -05:00
|
|
|
pub key: Property,
|
2025-02-19 19:34:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#[binrw]
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct SetProperty {
|
|
|
|
pub unk: u32,
|
2025-02-23 15:25:50 -05:00
|
|
|
|
|
|
|
#[br(pad_before = 4, parse_with = read_string_with_length)]
|
2025-02-19 19:34:13 -05:00
|
|
|
#[bw(ignore)]
|
|
|
|
pub key_name: String,
|
|
|
|
|
|
|
|
#[br(pad_before = 5)]
|
|
|
|
pub num_set_entries: u32,
|
|
|
|
|
2025-02-23 14:43:10 -05:00
|
|
|
#[br(count = num_set_entries)]
|
2025-02-19 19:34:13 -05:00
|
|
|
pub entries: Vec<SetEntry>,
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: write test
|