From ae6f151f48d924094f17f3846afe192ee37807c4 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Wed, 11 Oct 2023 18:52:15 +0200 Subject: [PATCH] =?UTF-8?q?WIP:=20et=20un=20petit=20paquet=203*3*3=20bien?= =?UTF-8?q?=20emball=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/grid.c | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/src/graphics/grid.c b/src/graphics/grid.c index ca17bb4..f3649c1 100644 --- a/src/graphics/grid.c +++ b/src/graphics/grid.c @@ -52,7 +52,7 @@ void write_space_ridges (long x, long y, long z) void write_marks_along_space_ridges (long x, long y, long z) { - float i, j, k, vx, vy, vz, max = fmax(x, y); int kin = 0; + float i, j, k, vx, vy, vz, max = fmax(x, y); max = fmax(max, z); for (i = 0; i <= x; i++) @@ -76,12 +76,9 @@ void write_marks_along_space_ridges (long x, long y, long z) || (j == 0 && k == z && i > 0 && i < x) || (j == y && k == 0 && i > 0 && i < x) || (j == y && k == z && i > 0 && i < x) - ) { - kin ++; - graphics_write_vertex (vx, vy, vz); - } + ) + graphics_write_vertex (vx, vy, vz); }; -printf("n = %d\n", kin); int vertex_offset = 8; @@ -97,35 +94,30 @@ printf("n = %d\n", kin); graphics_write_line (vertex_offset + 10, vertex_offset + 11); // graphics_write_line (vertex_offset + 14, vertex_offset + 15); // - graphics_write_line (vertex_offset + 18, vertex_offset + 19); // - graphics_write_line (vertex_offset + 20, vertex_offset + 21); // + graphics_write_line (vertex_offset + 12, vertex_offset + 14); // + graphics_write_line (vertex_offset + 13, vertex_offset + 15); // graphics_write_line (vertex_offset + 16, vertex_offset + 22); // graphics_write_line (vertex_offset + 17, vertex_offset + 23); // - /* graphics_write_line (buffer_lines_offset + 20, buffer_lines_offset + 21); */ - /* graphics_write_line (buffer_lines_offset + 22, buffer_lines_offset + 23); */ + graphics_write_line (vertex_offset + 18, vertex_offset + 19); // + graphics_write_line (vertex_offset + 20, vertex_offset + 21); // - /* graphics_write_line (buffer_lines_offset + 1, buffer_lines_offset + 21); */ - /* graphics_write_line (buffer_lines_offset + 2, buffer_lines_offset + 22); */ + graphics_write_line (vertex_offset + 0, vertex_offset + 16); // + graphics_write_line (vertex_offset + 1, vertex_offset + 17); // - /* graphics_write_line (buffer_lines_offset + 0, buffer_lines_offset + 20); */ - /* graphics_write_line (buffer_lines_offset + 3, buffer_lines_offset + 23); */ - - /* graphics_write_line (buffer_lines_offset + 17, buffer_lines_offset + 25); */ - /* graphics_write_line (buffer_lines_offset + 18, buffer_lines_offset + 26); */ - - /* graphics_write_line (buffer_lines_offset + 5, buffer_lines_offset + 25); */ - /* graphics_write_line (buffer_lines_offset + 6, buffer_lines_offset + 26); */ + graphics_write_line (vertex_offset + 2, vertex_offset + 18); // + graphics_write_line (vertex_offset + 3, vertex_offset + 19); // + // + graphics_write_line (vertex_offset + 4, vertex_offset + 20); // + graphics_write_line (vertex_offset + 5, vertex_offset + 21); // - /* graphics_write_line (buffer_lines_offset + 5, buffer_lines_offset + 25); */ - /* graphics_write_line (buffer_lines_offset + 6, buffer_lines_offset + 26); */ - - /* graphics_write_line (buffer_lines_offset + 0, buffer_lines_offset + 1); */ - /* graphics_write_line (buffer_lines_offset + 1, buffer_lines_offset + 2); */ - + graphics_write_line (vertex_offset + 6, vertex_offset + 22); // + graphics_write_line (vertex_offset + 7, vertex_offset + 23); // + graphics_write_line (vertex_offset + 8, vertex_offset + 10); // + graphics_write_line (vertex_offset + 9, vertex_offset + 11); // }