no stupid Bool thing

This commit is contained in:
Quaternions 2024-12-31 04:20:10 -08:00
parent 40a4920b12
commit c3e5696a83

View File

@ -16,23 +16,6 @@ fn trey_double(f:f64)->f64{
f64::from_bits(m|(e<<52)|(s<<63))
}
#[binrw]
#[brw(little)]
#[derive(Clone,Copy,Debug)]
pub enum Bool{
#[brw(magic=0u32)]
False,
#[brw(magic=1u32)]
True,
}
impl Into<bool> for Bool{
fn into(self)->bool{
match self{
Bool::False=>false,
Bool::True=>true,
}
}
}
#[binrw]
#[brw(little)]
pub struct Vector2{
@ -124,7 +107,9 @@ pub struct WorldEventSetTime{
#[binrw]
#[brw(little)]
pub struct WorldEventSetPaused{
pub paused:Bool,
#[br(map=|paused:u32|paused!=0)]
#[bw(map=|paused:&bool|*paused as u32)]
pub paused:bool,
#[brw(magic=b"quatdata")]
__:(),
}