From 4a1e26e5be5212ebfc9992eb249138decbe2086d Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 31 Dec 2024 16:59:50 -0800 Subject: [PATCH] use padding instead of magic --- src/v1.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/v1.rs b/src/v1.rs index 887caa3..07bc82d 100644 --- a/src/v1.rs +++ b/src/v1.rs @@ -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)]