WIP: pas encore ce que je veux mais cohérent. WIP, donc.

This commit is contained in:
Jean Sirmai 2023-10-27 09:28:54 +02:00
parent 111f6b57af
commit 18d3261109
Signed by: jean
GPG Key ID: FB3115C340E057E3
1 changed files with 24 additions and 10 deletions

View File

@ -888,8 +888,8 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
/* if (1) print_user_choices(arrows_ptr, arrows_nb, space_X, space_Y, space_Z, print_arrows_data, 0); */
arrows_nb = set_arrow (arrows_ptr, arrows_nb, space_X, space_Y, space_Z,
0,//rand() % arbitrary + 1, // load / weight
0,//rand() % 6, // site,
1,//rand() % arbitrary + 1, // load / weight
2,//rand() % 6, // site,
0,//rand() % space_X, // x
0,//rand() % space_Y, // y
0);//rand() % space_Z); // z
@ -897,18 +897,32 @@ void __attribute__((optimize("no-unroll-loops"))) main_test_graphics (void)
/* print_user_choices(arrows_ptr, arrows_nb, space_X, space_Y, space_Z, print_arrows_data, 0); */
arrows_nb = set_arrow (arrows_ptr, arrows_nb, space_X, space_Y, space_Z,
rand() % arbitrary + 1, // load / weight
2,//rand() % 6, // site,
1,//rand() % arbitrary + 1, // load / weight
3,//rand() % 6, // site,
0,//rand() % space_X, // x
0,//rand() % space_Y, // y
0);//rand() % space_Z); // z
arrows_nb = set_arrow (arrows_ptr, arrows_nb, space_X, space_Y, space_Z,
0,//rand() % arbitrary + 1, // load / weight
1,//rand() % 6, // site,
0,//rand() % space_X, // x
0,//rand() % space_Y, // y
0);//rand() % space_Z); // z
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 + 1] = buffer_lines_origin[(long) buffer_lines_size - 3];
buffer_lines_origin [(long) buffer_lines_0_arrow + address * 2 + 2] = buffer_lines_origin[(long) 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;
else perror("In experience, can't re_allocate for arrow lines buffer.\n");
if (1) printf(">>> buffer_lines_size = %d\n", buffer_lines_size);
/* arrows_nb = set_arrow (arrows_ptr, arrows_nb, space_X, space_Y, space_Z, */
/* 0,//rand() % arbitrary + 1, // load / weight */
/* 0,//rand() % 6, // site, */
/* 0,//rand() % space_X, // x */
/* 0,//rand() % space_Y, // y */
/* 0);//rand() % space_Z); // z */
/* print_user_choices(arrows_ptr, arrows_nb, space_X, space_Y, space_Z, print_arrows_data, 0); */