PartialEq test
This commit is contained in:
40
src/v0.rs
40
src/v0.rs
@@ -33,7 +33,7 @@ fn write_trey_double(value:&f64)->u64{
|
||||
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct Vector2{
|
||||
#[br(map=read_trey_float)]
|
||||
#[bw(map=write_trey_float)]
|
||||
@@ -44,7 +44,7 @@ pub struct Vector2{
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct Vector3{
|
||||
#[br(map=read_trey_float)]
|
||||
#[bw(map=write_trey_float)]
|
||||
@@ -134,7 +134,7 @@ impl<A,B> PartialOrd<Timed<B>> for Timed<A>
|
||||
// input
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct InputEvent{
|
||||
#[br(try_map=GameControls::try_from_bits)]
|
||||
#[bw(map=GameControls::bits)]
|
||||
@@ -167,7 +167,7 @@ impl TickInfo{
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct OutputEvent{
|
||||
#[br(try_map=TickInfo::try_from_bits)]
|
||||
#[bw(map=TickInfo::bits)]
|
||||
@@ -202,7 +202,7 @@ pub enum SoundType{
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct SoundEvent{
|
||||
pub sound_type:SoundType,
|
||||
/// Roblox enum
|
||||
@@ -212,13 +212,13 @@ pub struct SoundEvent{
|
||||
// world
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct WorldEventReset{
|
||||
pub position:Vector3,
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct WorldEventButton{
|
||||
pub button_id:u32,
|
||||
// This field does not exist in the final struct and
|
||||
@@ -230,7 +230,7 @@ pub struct WorldEventButton{
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct WorldEventSetTime{
|
||||
#[br(map=read_trey_double)]
|
||||
#[bw(map=write_trey_double)]
|
||||
@@ -242,7 +242,7 @@ pub struct WorldEventSetTime{
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct WorldEventSetPaused{
|
||||
#[br(map=|paused:u32|paused!=0)]
|
||||
#[bw(map=|&paused:&bool|paused as u32)]
|
||||
@@ -254,7 +254,7 @@ pub struct WorldEventSetPaused{
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub enum WorldEvent{
|
||||
#[brw(magic=0u32)]
|
||||
Reset(WorldEventReset),
|
||||
@@ -269,7 +269,7 @@ pub enum WorldEvent{
|
||||
// gravity
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct GravityEvent{
|
||||
pub gravity:Vector3,
|
||||
}
|
||||
@@ -351,14 +351,14 @@ pub enum FlagReason{
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct RunEventPrepare{
|
||||
pub mode:ModeID,
|
||||
pub style:Style,
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct RunEventZone{
|
||||
pub mode:ModeID,
|
||||
#[br(temp)]
|
||||
@@ -368,7 +368,7 @@ pub struct RunEventZone{
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct RunEventClear{
|
||||
pub mode:ModeSpec,
|
||||
#[br(temp)]
|
||||
@@ -378,21 +378,21 @@ pub struct RunEventClear{
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct RunEventFlag{
|
||||
pub mode:ModeSpec,
|
||||
pub flag_reason:FlagReason,
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct RunEventPractice{
|
||||
pub mode:ModeSpec,
|
||||
pub state_id:u32,
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub enum RunEvent{
|
||||
#[brw(magic=0u32)]
|
||||
Prepare(RunEventPrepare),
|
||||
@@ -422,7 +422,7 @@ pub enum CameraEventType{
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct CameraEvent{
|
||||
pub camera_event_type:CameraEventType,
|
||||
pub value:Vector3,
|
||||
@@ -446,7 +446,7 @@ pub enum SettingType{
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
#[derive(Debug,Clone)]
|
||||
#[derive(Debug,Clone,PartialEq)]
|
||||
pub struct SettingEvent{
|
||||
pub setting_type:SettingType,
|
||||
#[br(map=read_trey_double)]
|
||||
@@ -455,7 +455,7 @@ pub struct SettingEvent{
|
||||
}
|
||||
|
||||
/// A segment of event timelines.
|
||||
#[derive(Default)]
|
||||
#[derive(Default,PartialEq)]
|
||||
pub struct Block{
|
||||
pub input_events:Vec<Timed<InputEvent>>,
|
||||
pub output_events:Vec<Timed<OutputEvent>>,
|
||||
|
||||
Reference in New Issue
Block a user