Browse Source

Remove some old bad code

Getty Ritter 4 years ago
parent
commit
45745201ae
4 changed files with 2 additions and 11 deletions
  1. 1 1
      src/consts.rs
  2. 0 3
      src/game.rs
  3. 1 1
      src/resources.rs
  4. 0 6
      src/types.rs

+ 1 - 1
src/consts.rs

@@ -10,4 +10,4 @@ pub const BOARD_HEIGHT: usize = 12;
 pub const WINDOW_WIDTH: f32 = BOARD_WIDTH as f32 * (TILE_SIZE * SCALE);
 pub const WINDOW_HEIGHT: f32 = BOARD_HEIGHT as f32 * (TILE_SIZE * SCALE);
 pub const SCALE: f32 = 3.0;
-pub const TILED_TRUE: tiled::PropertyValue = tiled::PropertyValue::BoolValue(true);
+pub const TILED_FALSE: tiled::PropertyValue = tiled::PropertyValue::BoolValue(false);

+ 0 - 3
src/game.rs

@@ -1,8 +1,5 @@
-// use sdl2::keyboard as sdl;
-
 /// The shared values that the game state needs, mostly contained in
 /// the specs ECS world
 pub struct MyGame {
     pub world: specs::World,
-    // pub keys: std::collections::HashSet<sdl::Keycode>,
 }

+ 1 - 1
src/resources.rs

@@ -57,7 +57,7 @@ pub fn world_from_file<P: AsRef<Path>>(w: &mut specs::World, path: P) {
                     let u = ((n - 1) % 32) as u8;
                     let v = ((n - u as u32 - 1) / 32) as u8;
                     let is_blocking = tilesets[0].tiles[(n-1) as usize].properties["pass"]
-                        == tiled::PropertyValue::BoolValue(false);
+                        == consts::TILED_FALSE;
                     let mut e = w
                         .create_entity_unchecked()
                         .with(Position { x, y })

+ 0 - 6
src/types.rs

@@ -1,7 +1 @@
-pub type BPhase = ncollide2d::broad_phase::DBVTBroadPhase<
-    f32,
-    ncollide2d::bounding_volume::AABB<f32>,
-    specs::Entity,
->;
-pub type NPhase = ncollide2d::narrow_phase::NarrowPhase<f32, ()>;
 pub type World = ncollide2d::world::CollisionWorld<f32, specs::Entity>;