From acdace16824b741948b02da0bcc7d0d059c7f683 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 9 Oct 2022 03:11:56 +0200 Subject: a --- main/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'main/main.cpp') diff --git a/main/main.cpp b/main/main.cpp index 2696dc79..523d16c0 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1,4 +1,6 @@ #include "app.hpp" +#include "tile-defs.hpp" +#include #include #include #include @@ -54,8 +56,11 @@ void app::draw_chunk(chunk& c) void app::draw_wireframe() { + constexpr auto X = TILE_SIZE[0], Y = TILE_SIZE[1]; + constexpr float N = TILE_MAX_DIM/2.f; + const Vector3 center {(float)(X*N), (float)(Y*N), 0}; _shader.set_tint({1.f, 1.f, 0, 1.f}); - _wireframe_quad.draw(_shader, {{10, 10, 0}, {TILE_SIZE[0], TILE_SIZE[1]}}); + _wireframe_quad.draw(_shader, {center, {TILE_SIZE[0], TILE_SIZE[1]}}); _shader.set_tint({1, 1, 1, 1}); } -- cgit v1.2.3