From 6b8e9ddb651e0146def705675bdda0539586e5c3 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Fri, 27 Oct 2023 12:31:27 +0200 Subject: [PATCH] WIP: Success. Let address (line 906) be 0, 1, 2 or 3 and enjoy (now, a lot of cleaning to do) --- src/graphics/graphics.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/graphics/graphics.c b/src/graphics/graphics.c index 44231ca..8d6fc96 100644 --- a/src/graphics/graphics.c +++ b/src/graphics/graphics.c @@ -903,13 +903,13 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void) 0,//rand() % space_Y, // y 0);//rand() % space_Z); // z - int address = 3; + int address = 0; - if (1) printf("buffer_lines_0_arrow = %d address = %d buffer_lines_size = %d >>>", buffer_lines_0_arrow, address, buffer_lines_size); - buffer_lines_origin [(long) buffer_lines_0_arrow + address * 2 + 0] = buffer_lines_origin[(long) buffer_lines_size - 2]; - buffer_lines_origin [(long) buffer_lines_0_arrow + address * 2 + 1] = buffer_lines_origin[(long) buffer_lines_size - 1]; + if (1) printf("buffer_lines_0_arrow = %d address = %d buffer_lines_size = %d >>>", buffer_lines_0_arrow, address, buffer_lines_size); + /* buffer_lines_origin [(long) buffer_lines_0_arrow + address * 2 + 0] = buffer_lines_origin[(long) buffer_lines_size - 2]; */ + /* buffer_lines_origin [(long) buffer_lines_0_arrow + address * 2 + 1] = buffer_lines_origin[(long) buffer_lines_size - 1]; */ - buffer_lines_size -= 2; + /* buffer_lines_size -= 2; */ void *new_arrows_lines_ptr = g_realloc(buffer_lines_origin, buffer_lines_size * sizeof(GLfloat)); if (new_arrows_lines_ptr) buffer_lines_origin = new_arrows_lines_ptr; @@ -920,7 +920,6 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void) buffer_vertex_origin [(long) buffer_vertex_0_arrow + address * 6 + 0] = buffer_vertex_origin[(long) buffer_vertex_size - 6]; buffer_vertex_origin [(long) buffer_vertex_0_arrow + address * 6 + 1] = buffer_vertex_origin[(long) buffer_vertex_size - 5]; buffer_vertex_origin [(long) buffer_vertex_0_arrow + address * 6 + 2] = buffer_vertex_origin[(long) buffer_vertex_size - 4]; - buffer_vertex_origin [(long) buffer_vertex_0_arrow + address * 6 + 3] = buffer_vertex_origin[(long) buffer_vertex_size - 3]; buffer_vertex_origin [(long) buffer_vertex_0_arrow + address * 6 + 4] = buffer_vertex_origin[(long) buffer_vertex_size - 2]; buffer_vertex_origin [(long) buffer_vertex_0_arrow + address * 6 + 5] = buffer_vertex_origin[(long) buffer_vertex_size - 1];