From c9431f34e543dc0e6bf564e4ada9574072e92918 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 25 Feb 2023 21:47:56 +0100 Subject: convert to magnum vectors and use shorter syntax --- src/camera-offset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/camera-offset.cpp') diff --git a/src/camera-offset.cpp b/src/camera-offset.cpp index 1c77659c..15401bb0 100644 --- a/src/camera-offset.cpp +++ b/src/camera-offset.cpp @@ -13,7 +13,7 @@ with_shifted_camera_offset::with_shifted_camera_offset(tile_shader& shader, chun fm_assert(shader.depth_offset() == 0.f); constexpr auto chunk_size = TILE_MAX_DIM20d*dTILE_SIZE; - const auto offset = _camera + tile_shader::project(Vector3d(c.x, c.y, 0) * chunk_size); + const auto offset = _camera + tile_shader::project(Vector3d(Vector2d(c), 0) * chunk_size); const auto len_x = (float)(last.x - first.x), cx = (float)(c.x - first.x), cy = (float)(c.y - first.y); const float depth_offset = shader.depth_tile_size*(cy*TILE_MAX_DIM*len_x*TILE_MAX_DIM + cx*TILE_MAX_DIM); -- cgit v1.2.3