function set_arrow() ready to be used
This commit is contained in:
parent
603153293b
commit
168fa977a2
|
@ -603,10 +603,11 @@ static void show_user_action(GLuint *arrows, int arrows_nb, int address, int req
|
|||
|
||||
if (address >= 0 && current_weight == requested_weight){
|
||||
printf("arrow (%d,%d,%d,%d) found at address %d;\n\
|
||||
current_weight == requested_weight => END",\
|
||||
requested_weight == current_weight => END",\
|
||||
arrows[address + 1], arrows[address + 2], arrows[address + 3], arrows[address + 4], address/5); return;}
|
||||
|
||||
if (address == -1 && requested_weight == 0) {printf("no such arrow found (%d,%d,%d,%d) && requested weight == 0 => END",\
|
||||
if (address == -1 && requested_weight == 0) {printf("no such arrow found (%d,%d,%d,%d)\n\
|
||||
requested weight == 0 => END",\
|
||||
arrows[address + 1], arrows[address + 2], arrows[address + 3], arrows[address + 4]); return;}
|
||||
}
|
||||
|
||||
|
@ -624,12 +625,15 @@ static void show_buffers_states(int space_X, int space_Y, int space_Z, int arrow
|
|||
printf("\n - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
|
||||
printf("\n buffer_vertex_offset_after grids = %6d\t%6d = (x+1)*(y+1)*(z+1); <--> (x,y,z = %d,%d,%d)",\
|
||||
offset_after_grids, (space_X + 1)*(space_Y + 1)*(space_Z + 1), space_X, space_Y, space_Z);
|
||||
|
||||
printf("\n buffer_vertex_offset_after arrows = %6d\t%6d = %d + %d; <--> %d = 12 x %d (there are %d cubes)",\
|
||||
offset_after_arrows, offset_after_arrows, offset_after_grids,\
|
||||
difference, difference, difference / 12, difference / 12);
|
||||
|
||||
printf("\n buffer_lines_offset after cubes = %6d\t%6d = 2 * (%dx%d + %dx%d + %dx%d); <--> 2 * (x*y + x*z + y*z)",\
|
||||
buffer_lines_size_after_cubes, ((space_X+1) * (space_Y+1) + (space_X+1) * (space_Z+1) + (space_Y+1) * (space_Z+1)) * 2,
|
||||
space_X+1, space_Y+1, space_X+1, space_Z+1, space_Y+1, space_Z+1);
|
||||
|
||||
printf("\n buffer_lines_offset after arrows = %6d\t%6d = %d + %d; <--> %d = (3 + 4) x 2 x %d (arrows_nb = %d)\n",\
|
||||
buffer_lines_size, buffer_lines_size, buffer_lines_size_after_cubes,\
|
||||
buffer_lines_size - buffer_lines_size_after_cubes, arrows_nb * 14, arrows_nb, arrows_nb);
|
||||
|
@ -815,7 +819,7 @@ void main_test_graphics (void)
|
|||
}
|
||||
|
||||
show_buffers_states(space_X, space_Y, space_Z, arrows_nb,
|
||||
offset_after_grids, buffer_vertex_size,
|
||||
buffer_lines_size_after_cubes, buffer_lines_size);
|
||||
offset_after_grids, buffer_vertex_size,
|
||||
buffer_lines_size_after_cubes, buffer_lines_size);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue