summaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-04-12 16:57:47 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-04-12 16:57:47 +0200
commit945dbbf8070ace647bb94da16c2c9f56690287be (patch)
treedfaea763a7e3c6abd0d37fd6de6b1532ca4c5c48 /main
parent506f87c554153eb0bbc3bc9e4fb0f26792f8bfca (diff)
a
Diffstat (limited to 'main')
-rw-r--r--main/draw.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/draw.cpp b/main/draw.cpp
index 063da14d..db3bbd0c 100644
--- a/main/draw.cpp
+++ b/main/draw.cpp
@@ -130,8 +130,8 @@ void main_impl::draw_world() noexcept
{
GL::Renderer::setDepthMask(true);
- for (int16_t y = miny; y <= maxy; y++)
- for (int16_t x = minx; x <= maxx; x++)
+ for (int16_t y = maxy; y >= miny; y--)
+ for (int16_t x = maxx; x >= minx; x--)
{
const chunk_coords_ pos{x, y, z};
auto* c_ = _world.at(pos);
@@ -148,8 +148,8 @@ void main_impl::draw_world() noexcept
GL::Renderer::setDepthMask(false);
- for (int16_t y = miny; y <= maxy; y++)
- for (int16_t x = minx; x <= maxx; x++)
+ for (int16_t y = maxy; y >= miny; y--)
+ for (int16_t x = maxx; x >= minx; x--)
{
const chunk_coords_ pos{x, y, z};
auto* c_ = _world.at(pos);