From edf5278e379ebf2bc1dea2999a9da85f08d1ec02 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 21 Feb 2024 04:12:35 -0800 Subject: [PATCH] debug --- src/gameplay_modes.rs | 6 +++--- src/gameplay_style.rs | 24 ++++++++++++------------ src/integer.rs | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/gameplay_modes.rs b/src/gameplay_modes.rs index 5a15174..e9ea2ca 100644 --- a/src/gameplay_modes.rs +++ b/src/gameplay_modes.rs @@ -50,12 +50,12 @@ pub enum StageElementBehaviour{ Checkpoint,//this is a combined behaviour for Ordered & Unordered in case a model is used multiple times or for both. } -#[derive(Clone,Copy,Hash,id::Id,Eq,PartialEq)] +#[derive(Clone,Copy,Debug,Hash,id::Id,Eq,PartialEq)] pub struct CheckpointId(u32); impl CheckpointId{ pub const FIRST:Self=Self(0); } -#[derive(Clone,Copy,Hash,id::Id,Eq,PartialEq,Ord,PartialOrd)] +#[derive(Clone,Copy,Debug,Hash,id::Id,Eq,PartialEq,Ord,PartialOrd)] pub struct StageId(u32); impl StageId{ pub const FIRST:Self=Self(0); @@ -120,7 +120,7 @@ pub enum Zone{ Finish, Anticheat, } -#[derive(Clone,Copy,Hash,id::Id,Eq,PartialEq,Ord,PartialOrd)] +#[derive(Clone,Copy,Debug,Hash,id::Id,Eq,PartialEq,Ord,PartialOrd)] pub struct ModeId(u32); impl ModeId{ pub const MAIN:Self=Self(0); diff --git a/src/gameplay_style.rs b/src/gameplay_style.rs index 367b226..3e6fda0 100644 --- a/src/gameplay_style.rs +++ b/src/gameplay_style.rs @@ -3,7 +3,7 @@ const VALVE_SCALE:Planar64=Planar64::raw(1<<28);// 1/16 use crate::integer::{Time,Ratio64,Planar64,Planar64Vec3}; use crate::controls_bitflag::Controls; -#[derive(Clone)] +#[derive(Clone,Debug)] pub struct StyleModifiers{ //controls which are allowed to pass into gameplay (usually all) pub controls_mask:Controls, @@ -37,14 +37,14 @@ impl std::default::Default for StyleModifiers{ } } -#[derive(Clone)] +#[derive(Clone,Debug)] pub enum JumpCalculation{ Capped,//roblox Energy,//new Linear,//source } -#[derive(Clone)] +#[derive(Clone,Debug)] pub enum JumpImpulse{ FromTime(Time),//jump time is invariant across mass and gravity changes FromHeight(Planar64),//jump height is invariant across mass and gravity changes @@ -70,7 +70,7 @@ impl JumpImpulse{ } } -#[derive(Clone)] +#[derive(Clone,Debug)] pub struct ControlsActivation{ //allowed keys controls_mask:Controls, @@ -158,7 +158,7 @@ impl ControlsActivation{ //Backwards } -#[derive(Clone)] +#[derive(Clone,Debug)] pub struct StrafeSettings{ enable:ControlsActivation, mv:Planar64, @@ -184,7 +184,7 @@ impl StrafeSettings{ } } -#[derive(Clone)] +#[derive(Clone,Debug)] pub struct PropulsionSettings{ magnitude:Planar64, } @@ -194,7 +194,7 @@ impl PropulsionSettings{ } } -#[derive(Clone)] +#[derive(Clone,Debug)] pub struct JumpSettings{ //information used to calculate jump power impulse:JumpImpulse, @@ -214,12 +214,12 @@ impl JumpSettings{ } } -#[derive(Clone)] +#[derive(Clone,Debug)] pub struct AccelerateSettings{ accel:Planar64, topspeed:Planar64, } -#[derive(Clone)] +#[derive(Clone,Debug)] pub struct WalkSettings{ accelerate:AccelerateSettings, static_friction:Planar64, @@ -265,7 +265,7 @@ impl WalkSettings{ } } -#[derive(Clone)] +#[derive(Clone,Debug)] pub struct LadderSettings{ accelerate:AccelerateSettings, //how close to pushing directly into/out of the ladder normal @@ -308,7 +308,7 @@ impl LadderSettings{ } } -#[derive(Clone)] +#[derive(Clone,Debug)] pub enum HitboxMesh{ Box,//source Cylinder,//roblox @@ -318,7 +318,7 @@ pub enum HitboxMesh{ //DualCone, } -#[derive(Clone)] +#[derive(Clone,Debug)] pub struct Hitbox{ pub halfsize:Planar64Vec3, pub mesh:HitboxMesh, diff --git a/src/integer.rs b/src/integer.rs index 99066f0..7305737 100644 --- a/src/integer.rs +++ b/src/integer.rs @@ -91,7 +91,7 @@ const fn gcd(mut a:u64,mut b:u64)->u64{ }; a } -#[derive(Clone,Copy,Hash)] +#[derive(Clone,Copy,Debug,Hash)] pub struct Ratio64{ num:i64, den:u64, @@ -259,7 +259,7 @@ impl std::ops::Div for Ratio64{ } } } -#[derive(Clone,Copy,Hash)] +#[derive(Clone,Copy,Debug,Hash)] pub struct Ratio64Vec2{ pub x:Ratio64, pub y:Ratio64,