summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-17 22:34:08 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-17 22:34:08 +0200
commit2ce80cb4a85cc47dc10f0b70839b2d0f2381cca8 (patch)
tree25f81746e4302651e3a7561a8e6b7aa851219635 /src
parentdefb979b7a1e56214ec4cd20151c210bd1bbcec8 (diff)
a
Diffstat (limited to 'src')
-rw-r--r--src/camera-offset.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/camera-offset.cpp b/src/camera-offset.cpp
index 3087cf13..0bf51c3f 100644
--- a/src/camera-offset.cpp
+++ b/src/camera-offset.cpp
@@ -12,8 +12,8 @@ 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],
- float(y)*TILE_MAX_DIM*TILE_SIZE[1],
+ 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,
0});
_shader.set_camera_offset(offset);
ASSERT(std::abs(offset[0]) < 1 << 24 && std::abs(offset[1]) < 1 << 24);