expand on id types with enums
This commit is contained in:
parent
a78be6b79a
commit
9f0505cdc9
94
src/v1.rs
94
src/v1.rs
@ -69,8 +69,29 @@ pub struct TimedOutputEvent{
|
||||
// sound
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
pub enum SoundType{
|
||||
#[brw(magic=101u32)]
|
||||
TrackGround,
|
||||
#[brw(magic=102u32)]
|
||||
TrackLadder,
|
||||
#[brw(magic=103u32)]
|
||||
TrackWater,
|
||||
#[brw(magic=104u32)]
|
||||
TrackAir,
|
||||
#[brw(magic=201u32)]
|
||||
JumpGround,
|
||||
#[brw(magic=202u32)]
|
||||
JumpLadder,
|
||||
#[brw(magic=301u32)]
|
||||
SmashGround,
|
||||
#[brw(magic=302u32)]
|
||||
SmashWall,
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
pub struct SoundEvent{
|
||||
pub sound_type:u32,
|
||||
pub sound_type:SoundType,
|
||||
/// Roblox enum
|
||||
pub material:u32,
|
||||
}
|
||||
#[binrw]
|
||||
@ -163,10 +184,51 @@ pub enum RunEventType{
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
pub enum Mode{
|
||||
#[brw(magic=0i32)]
|
||||
Main,
|
||||
#[brw(magic=1i32)]
|
||||
Bonus,
|
||||
#[brw(magic=-1i32)]
|
||||
All,
|
||||
#[brw(magic=-2i32)]
|
||||
Invalid,
|
||||
#[brw(magic=-3i32)]
|
||||
InProgress,
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
pub enum FlagReason{
|
||||
#[brw(magic=0u32)]
|
||||
Anticheat,
|
||||
#[brw(magic=1u32)]
|
||||
StyleChange,
|
||||
#[brw(magic=2u32)]
|
||||
Clock,
|
||||
#[brw(magic=3u32)]
|
||||
Pause,
|
||||
#[brw(magic=4u32)]
|
||||
Flying,
|
||||
#[brw(magic=5u32)]
|
||||
Gravity,
|
||||
#[brw(magic=6u32)]
|
||||
Timescale,
|
||||
#[brw(magic=7u32)]
|
||||
Timetravel,
|
||||
#[brw(magic=8u32)]
|
||||
Teleport,
|
||||
#[brw(magic=9u32)]
|
||||
Practice,
|
||||
// b"data"
|
||||
#[brw(magic=1635017060u32)]
|
||||
None,
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
pub struct RunEvent{
|
||||
run_event_type:RunEventType,
|
||||
mode_id:i32,
|
||||
flag_reason_id:u32,
|
||||
mode:Mode,
|
||||
flag_reason:FlagReason,
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
@ -179,8 +241,16 @@ pub struct TimedRunEvent{
|
||||
// camera
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
pub enum CameraEventType{
|
||||
#[brw(magic=0u32)]
|
||||
CameraPunch,
|
||||
#[brw(magic=1u32)]
|
||||
Transform,
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
pub struct CameraEvent{
|
||||
pub camera_event_id:u32,
|
||||
pub camera_event_type:CameraEventType,
|
||||
pub value:Vector3,
|
||||
}
|
||||
#[binrw]
|
||||
@ -194,8 +264,22 @@ pub struct TimedCameraEvent{
|
||||
// setting
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
pub enum SettingType{
|
||||
#[brw(magic=0u32)]
|
||||
FieldOfView,
|
||||
#[brw(magic=1u32)]
|
||||
Sensitivity,
|
||||
#[brw(magic=2u32)]
|
||||
VerticalSensitivityMultiplier,
|
||||
#[brw(magic=3u32)]
|
||||
AbsoluteSensitivity,
|
||||
#[brw(magic=4u32)]
|
||||
TurnSpeed,
|
||||
}
|
||||
#[binrw]
|
||||
#[brw(little)]
|
||||
pub struct SettingEvent{
|
||||
pub setting_id:u32,
|
||||
pub setting_type:SettingType,
|
||||
#[br(map=read_trey_double)]
|
||||
pub value:f64,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user