WIP: cleaning : space ridges & grids OK > let's do the arrows, now...

This commit is contained in:
Jean Sirmai 2023-10-23 18:34:40 +02:00
parent fbe0852a26
commit 8309eb1e57
Signed by: jean
GPG Key ID: FB3115C340E057E3
2 changed files with 15 additions and 13 deletions

View File

@ -684,10 +684,10 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
int rand(void); int rand(void);
void srand(unsigned int seed); // printf ("Valeur max : %d\n", RAND_MAX); min + rand() % (max+1 - min); void srand(unsigned int seed); // printf ("Valeur max : %d\n", RAND_MAX); min + rand() % (max+1 - min);
int arbitrary = 3; int arbitrary = 7;
int space_X = 2,// + rand() % arbitrary, int space_X = 1 + rand() % arbitrary,
space_Y = 1,// + rand() % arbitrary, space_Y = 1 + rand() % arbitrary,
space_Z = 1;// + rand() % arbitrary; space_Z = 1 + rand() % arbitrary;
int density_max = space_X * space_Y * space_Z; int density_max = space_X * space_Y * space_Z;
int max = fmax(space_X, space_Y); max = fmax(max, space_Z); int max = fmax(space_X, space_Y); max = fmax(max, space_Z);
@ -777,17 +777,17 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
/* S P A C E */ /* S P A C E */
if (1) printf("buffer_lines_size before writing 12 space_ridges_lines : %d (x 2 = %d)\n", buffer_lines_size, buffer_lines_size * 2); if (1) printf("buffer_lines_size before writing 12 space_ridges_lines : %d (* 2 = %d)\n", buffer_lines_size / 2, buffer_lines_size);
write_space_ridges_lines (); write_space_ridges_lines ();
if (1) printf("buffer_lines_size after writing 12 space_ridges_lines : %d (x 2 = %d)\n\n", buffer_lines_size, buffer_lines_size * 2); if (1) printf("buffer_lines_size after writing 12 space_ridges_lines : %d (* 2 = %d)\n\n", buffer_lines_size / 2, buffer_lines_size);
if (1) printf("buffer_lines_size before writing_space_faces_lines : %d (x 2 = %d)\n", buffer_lines_size, buffer_lines_size * 2); if (1) printf("buffer_lines_size before writing_space_faces_lines : %d (* 2 = %d)\n", buffer_lines_size / 2, buffer_lines_size);
/* write_grids_on_space_faces_lines (buffer_lines_size, space_X, space_Y, space_Z); */ write_grids_on_space_faces_lines (buffer_lines_size, space_X, space_Y, space_Z);
graphics_write_line (8, 9); /* graphics_write_line (8, 9); */
graphics_write_line (9, 10); /* graphics_write_line (9, 10); */
graphics_write_line (10, 11); /* graphics_write_line (10, 11); */
graphics_write_line (11, 8); /* graphics_write_line (11, 8); */
if (1) printf("buffer_lines_size after writing_space_faces_lines : %d (x 2 = %d)\n\n", buffer_lines_size, buffer_lines_size * 2); if (1) printf("buffer_lines_size after writing_space_faces_lines : %d (* 2 = %d)\n\n", buffer_lines_size / 2, buffer_lines_size);
/* A R R O W S */ /* A R R O W S */

View File

@ -119,6 +119,8 @@ long write_grids_on_space_faces_vertex (long x, long y, long z)
long write_grids_on_space_faces_lines (long offset_vertex, long x, long y, long z) long write_grids_on_space_faces_lines (long offset_vertex, long x, long y, long z)
{ {
offset_vertex = offset_vertex / 3;
for (int i = 0; i < x - 1; i ++) { for (int i = 0; i < x - 1; i ++) {
/* graphics_write_line (offset_vertex + i * 4 + 0, offset_vertex + i * 4 + 1); */ /* graphics_write_line (offset_vertex + i * 4 + 0, offset_vertex + i * 4 + 1); */