diff --git a/src/debug.rs b/src/debug.rs index 5323b07..b6de505 100644 --- a/src/debug.rs +++ b/src/debug.rs @@ -31,50 +31,7 @@ fn debug_panel_ui( .show( ctx, |ui| { - if debug.freecam { - ui.label("Cam x"); - ui.add(egui::DragValue::new(&mut game.camera_offset.x)); - ui.label("Cam y"); - ui.add(egui::DragValue::new(&mut game.camera_offset.y)); - let co = game.camera_offset; - ui.label( - format!( - "Cam Depth: {}", LengthDisp(co.y as f32 - WorldPos::SURFACE - as f32) - ), - ); - ui.label( - format!( - "Cam offset from center: {}", LengthDisp(co.x as f32 - - WorldPos::CENTER as f32) - ), - ); - } else { - ui.label( - format!( - "Player Depth: {}", LengthDisp(game.world.player.feet_y() as - f32 - WorldPos::SURFACE as f32) - ), - ); - ui.label( - format!( - "Player offset from center: {}", LengthDisp(game.world.player - .col_en.en.pos.x as f32 - WorldPos::CENTER as f32) - ), - ); - ui.label( - format!( - "Hspeed: {} ({} km/h)", game.world.player.hspeed, - px_per_frame_to_km_h(game.world.player.hspeed) - ), - ); - ui.label( - format!( - "Vspeed: {} ({} km/h)", game.world.player.vspeed, - px_per_frame_to_km_h(game.world.player.vspeed) - ), - ); - } + ui.label("Music volume"); let mut vol = res.surf_music.volume(); ui.add(egui::DragValue::new(&mut vol)); diff --git a/src/tiles.rs b/src/tiles.rs index de3b43b..c90b74a 100644 --- a/src/tiles.rs +++ b/src/tiles.rs @@ -22,13 +22,13 @@ impl Clone for TileId { } impl Debug for TileId { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_tuple("TileId").field(&self.0).finish() + loop {} } } impl TileId { pub fn empty(&self) -> bool { - self.0 == 0 + loop {} } pub const EMPTY: Self = Self(0, PhantomData); }