From 3a29f20df76467a149129fb5a789b0bf4c143b85 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Wed, 26 Jul 2023 19:38:28 +0200 Subject: [PATCH] =?UTF-8?q?WIP:=20la=20cata=20(je=20n'arrive=20pas=20?= =?UTF-8?q?=C3=A0=20dessiner=20cette=20f..=20matrice=20!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/buffers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/graphics/buffers.c b/src/graphics/buffers.c index bf7a250..42f57d8 100644 --- a/src/graphics/buffers.c +++ b/src/graphics/buffers.c @@ -365,9 +365,9 @@ static bool compute_space_3D (long x, } } - for (int u = 0; u < y; u ++){ - for (int w = 0; w < z; w ++){ - calcul = step_z * w + step_y * u; + for (int u = 0; u < z; u ++){ + for (int w = 0; w < y; w ++){ + calcul = step_y * w + step_z * u; *(lines_origin + lines_buffer_size) = calcul; lines_buffer_size += 1; *(lines_origin + lines_buffer_size) = calcul + step_x * (x - 1); lines_buffer_size += 1; }