Finished prototype hexagonal grid...

This commit is contained in:
Ognjen Milan Robovic 2024-02-24 10:33:14 -05:00
parent 3c528c784e
commit 910480a2d4
2 changed files with 5 additions and 6 deletions

View File

@ -281,19 +281,18 @@ package body core is
for step in 0 .. repeat.y
loop
if step mod 2 = 1 then
for next in 0 .. repeat.x
for next in 0 .. repeat.x - 1
loop
line ((x + offset.x + base / 2 + next * base, y + offset.y + step * base + base / 4), (-base / 2, -base / 2));
line ((x + offset.x + base / 2 + next * base, y + offset.y + step * base + base / 4), ( base / 2, -base / 2));
end loop;
else
for next in 0 .. repeat.x
for next in 0 .. repeat.x - 1
loop
line ((x + offset.x + base + next * base, y + offset.y + step * base + base / 4), (-base / 2, -base / 2));
line ((x + offset.x + base + next * base, y + offset.y + step * base + base / 4), ( base / 2, -base / 2));
line ((x + offset.x + base / 2 + next * base, y + offset.y + step * base - base / 4), (-base / 2, base / 2));
line ((x + offset.x + base / 2 + next * base, y + offset.y + step * base - base / 4), ( base / 2, base / 2));
end loop;
end if;
--~line ((x + offset.x + 3 * base / 2, y + offset.y + next * base + base / 4), (-base / 2, -base / 2));
end loop;
--
if repeat.y mod 4 = 1 then

View File

@ -98,7 +98,7 @@ begin
--~end loop;
--
core.draw_central_grid (preview_x, preview_y, preview_width - 2 * preview_x, preview_height - 2 * preview_y);
--~core.draw_squared_grid (preview_x, preview_y, preview_width - 2 * preview_x, preview_height - 2 * preview_y);
core.draw_squared_grid (preview_x, preview_y, preview_width - 2 * preview_x, preview_height - 2 * preview_y);
core.draw_hexagon_grid (preview_x, preview_y, preview_width - 2 * preview_x, preview_height - 2 * preview_y);
--
--~ui.draw_menu (0, 0, preview_width, preview_height, false);