From ca141c800cac766005f6e4933fdc8b4b212c24de Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 18 Sep 2023 18:34:48 -0700 Subject: [PATCH] debug print instructions --- src/body.rs | 5 +++-- src/instruction.rs | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/body.rs b/src/body.rs index 20a1e6d8..9576bfeb 100644 --- a/src/body.rs +++ b/src/body.rs @@ -1,5 +1,6 @@ use crate::{instruction::{InstructionEmitter, InstructionConsumer, TimedInstruction}, zeroes::zeroes2}; +#[derive(Debug)] pub enum PhysicsInstruction { CollisionStart(RelativeCollision), CollisionEnd(RelativeCollision), @@ -112,7 +113,7 @@ pub struct PhysicsState { pub jump_trying: bool, } -#[derive(Clone,Copy,Hash,Eq,PartialEq)] +#[derive(Debug,Clone,Copy,Hash,Eq,PartialEq)] pub enum AabbFace{ Right,//+X Top, @@ -258,7 +259,7 @@ impl Model { //need non-face (full model) variant for CanCollide false objects //OR have a separate list from contacts for model intersection -#[derive(Clone,Eq,Hash,PartialEq)] +#[derive(Debug,Clone,Eq,Hash,PartialEq)] pub struct RelativeCollision { face: TreyMeshFace,//just an id model: u32,//using id to avoid lifetimes diff --git a/src/instruction.rs b/src/instruction.rs index 9ac38699..ece33d3a 100644 --- a/src/instruction.rs +++ b/src/instruction.rs @@ -1,3 +1,4 @@ +#[derive(Debug)] pub struct TimedInstruction { pub time: crate::body::TIME, pub instruction: I,