From aebec6e9b095149252bf1e4642c211ae98efdf84 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 18 Oct 2022 01:55:30 +0200 Subject: a --- src/camera-offset.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/camera-offset.cpp') diff --git a/src/camera-offset.cpp b/src/camera-offset.cpp index 0bf51c3f..63de0b8b 100644 --- a/src/camera-offset.cpp +++ b/src/camera-offset.cpp @@ -12,11 +12,10 @@ with_shifted_camera_offset::with_shifted_camera_offset(tile_shader& shader, shor _shader{shader}, _offset{shader.camera_offset()} { - const auto offset = _offset + tile_shader::project({float(x)*TILE_MAX_DIM*TILE_SIZE[0]*.5f, - float(y)*TILE_MAX_DIM*TILE_SIZE[1]*.5f, + const auto offset = _offset + tile_shader::project({-double(x)*TILE_MAX_DIM*dTILE_SIZE[0], + double(y)*TILE_MAX_DIM*dTILE_SIZE[1], 0}); _shader.set_camera_offset(offset); - ASSERT(std::abs(offset[0]) < 1 << 24 && std::abs(offset[1]) < 1 << 24); } with_shifted_camera_offset::~with_shifted_camera_offset() -- cgit v1.2.3