small addition (yellow cubes at the center)

This commit is contained in:
Alexandre 2024-07-10 12:15:56 +02:00
parent 0b08e44c4b
commit 9c72cb51e8
5 changed files with 11 additions and 0 deletions

BIN
a.out

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1047,6 +1047,17 @@ let generate_structure_1 hash mem ch_x ch_y ch_z =
dyn_append filled {cube = create_cube ((chx+w)*chunk_size) ((chy+h)*chunk_size) ((chz+d)*chunk_size) chunk_size; red = 250; green = 128; blue = 64}; dyn_append filled {cube = create_cube ((chx+w)*chunk_size) ((chy+h)*chunk_size) ((chz+d)*chunk_size) chunk_size; red = 250; green = 128; blue = 64};
Hashtbl.add hash (chx+w, chy+h, chz+d) filled; Hashtbl.add hash (chx+w, chy+h, chz+d) filled;
end end
else if w = 0 && h = 0 && d = 0 then begin
let filled = dyn_create {cube = create_cube 0 0 0 1; red = 33; green = 33; blue = 22} in
for i = 0 to chunk_size -1 do
for j = 0 to chunk_size -1 do
for k = 0 to chunk_size -1 do
dyn_append filled {cube = create_cube (chx*chunk_size+i) (chy*chunk_size+j) (chz*chunk_size+k) 1; red = 250; green = 250; blue = 64};
done
done
done;
Hashtbl.add hash (chx+w, chy+h, chz+d) filled;
end
else begin else begin
Hashtbl.add hash (chx+w, chy+h, chz+d) empty; Hashtbl.add hash (chx+w, chy+h, chz+d) empty;
end; end;

BIN
display.o

Binary file not shown.