use padding instead of magic

This commit is contained in:
Quaternions 2024-12-31 16:59:50 -08:00
parent dd8cf2544d
commit 4a1e26e5be

View File

@ -90,26 +90,23 @@ pub struct WorldEventReset{
#[binrw]
#[brw(little)]
pub struct WorldEventButton{
#[br(pad_after=8)]
pub button_id:u32,
#[brw(magic=b"quatdata")]
__:(),
}
#[binrw]
#[brw(little)]
pub struct WorldEventSetTime{
#[br(map=read_trey_double)]
#[br(pad_after=4)]
pub time:f64,
#[brw(magic=b"data")]
__:(),
}
#[binrw]
#[brw(little)]
pub struct WorldEventSetPaused{
#[br(map=|paused:u32|paused!=0)]
#[bw(map=|paused:&bool|*paused as u32)]
#[br(pad_after=8)]
pub paused:bool,
#[brw(magic=b"quatdata")]
__:(),
}
#[binrw]
#[brw(little)]