diff --git a/assets/levels/00.level b/assets/levels/00.level new file mode 100644 index 0000000..dd88375 --- /dev/null +++ b/assets/levels/00.level @@ -0,0 +1,9 @@ +############ +# # ### +# SVHD G LE# +# # ### +# # ## #### +# # K # +# C S # +# # # +######### diff --git a/screenshot.png b/screenshot.png index ea3e0a1..b81346c 100644 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/src/entity/mod.rs b/src/entity/mod.rs index c6dae7c..47cc98a 100644 --- a/src/entity/mod.rs +++ b/src/entity/mod.rs @@ -373,6 +373,15 @@ pub(crate) fn make_camera(world: &mut World, level_handle: &Handle) - level.dimensions }; + let x_cam_dim: f32 = { + let initial: f32 = (16 * size_x).into(); + initial * 1.4 + }; + let y_cam_dim: f32 = { + let initial: f32 = (9 * size_y).into(); + initial * 1.4 + }; + let (x_adjust, y_adjust): (f32, f32) = ( (size_x * GRID_SIZE / 2).into(), (size_y * GRID_SIZE / 2).into(), @@ -380,7 +389,7 @@ pub(crate) fn make_camera(world: &mut World, level_handle: &Handle) - world .create_entity() - .with(Camera::standard_2d(1280.0/8.0, 720.0/8.0)) + .with(Camera::standard_2d(x_cam_dim, y_cam_dim)) .with({ // I just want to call Transform::from_xyz(x, y, z)... let mut transform = Transform::default();