no stupid Bool thing
This commit is contained in:
parent
40a4920b12
commit
c3e5696a83
21
src/v1.rs
21
src/v1.rs
@ -16,23 +16,6 @@ fn trey_double(f:f64)->f64{
|
|||||||
f64::from_bits(m|(e<<52)|(s<<63))
|
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]
|
#[binrw]
|
||||||
#[brw(little)]
|
#[brw(little)]
|
||||||
pub struct Vector2{
|
pub struct Vector2{
|
||||||
@ -124,7 +107,9 @@ pub struct WorldEventSetTime{
|
|||||||
#[binrw]
|
#[binrw]
|
||||||
#[brw(little)]
|
#[brw(little)]
|
||||||
pub struct WorldEventSetPaused{
|
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")]
|
#[brw(magic=b"quatdata")]
|
||||||
__:(),
|
__:(),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user