Remove some old bad code
Getty Ritter
5 years ago
10 | 10 |
pub const WINDOW_WIDTH: f32 = BOARD_WIDTH as f32 * (TILE_SIZE * SCALE);
|
11 | 11 |
pub const WINDOW_HEIGHT: f32 = BOARD_HEIGHT as f32 * (TILE_SIZE * SCALE);
|
12 | 12 |
pub const SCALE: f32 = 3.0;
|
13 | |
pub const TILED_TRUE: tiled::PropertyValue = tiled::PropertyValue::BoolValue(true);
|
| 13 |
pub const TILED_FALSE: tiled::PropertyValue = tiled::PropertyValue::BoolValue(false);
|
1 | |
// use sdl2::keyboard as sdl;
|
2 | |
|
3 | 1 |
/// The shared values that the game state needs, mostly contained in
|
4 | 2 |
/// the specs ECS world
|
5 | 3 |
pub struct MyGame {
|
6 | 4 |
pub world: specs::World,
|
7 | |
// pub keys: std::collections::HashSet<sdl::Keycode>,
|
8 | 5 |
}
|
57 | 57 |
let u = ((n - 1) % 32) as u8;
|
58 | 58 |
let v = ((n - u as u32 - 1) / 32) as u8;
|
59 | 59 |
let is_blocking = tilesets[0].tiles[(n-1) as usize].properties["pass"]
|
60 | |
== tiled::PropertyValue::BoolValue(false);
|
| 60 |
== consts::TILED_FALSE;
|
61 | 61 |
let mut e = w
|
62 | 62 |
.create_entity_unchecked()
|
63 | 63 |
.with(Position { x, y })
|
1 | |
pub type BPhase = ncollide2d::broad_phase::DBVTBroadPhase<
|
2 | |
f32,
|
3 | |
ncollide2d::bounding_volume::AABB<f32>,
|
4 | |
specs::Entity,
|
5 | |
>;
|
6 | |
pub type NPhase = ncollide2d::narrow_phase::NarrowPhase<f32, ()>;
|
7 | 1 |
pub type World = ncollide2d::world::CollisionWorld<f32, specs::Entity>;
|