Redoing squared grid loops, testing...

This commit is contained in:
Ognjen Milan Robovic 2024-02-19 14:10:00 -05:00
parent 6a17c4c197
commit fbb99ad4aa
2 changed files with 24 additions and 4 deletions

View File

@ -197,12 +197,31 @@ package body core is
line_v2 : constant integer := width / base - 1;
crop_height : constant integer := ((height + base) / 2) mod base;
full_vector : integer := 0;
--~horizontal : integer := 0;
--~vertical : integer := 0;
--~offset : integer := (if (height / base - 1) mod 2 = 1 then 16 else 0);
begin
for vertical in 0 .. line_v2
loop
render_vector (offset_x + vertical * base, y, offset_x + vertical * base, y + crop_height);
end loop;
--
--~while horizontal < y + height - base - offset
--~loop
--~render_vector (x, offset_y + horizontal, x + width, offset_y + horizontal);
--~--
--~offset := (if offset = 0 then 16 else 0);
--~--
--~horizontal := horizontal + base;
--~vertical := 0;
--~--
--~while vertical < x + width - base - offset
--~loop
--~render_vector (offset_x + vertical + offset, horizontal - base / 2 + 1, offset_x + vertical + offset, horizontal + base / 2 + 1);
--~--
--~vertical := vertical + base;
--~end loop;
--~end loop;
for horizontal in 0 .. line_h
loop
render_vector (x, offset_y + horizontal * base, x + width, offset_y + horizontal * base);
@ -223,6 +242,7 @@ package body core is
end loop;
end if;
end loop;
--
for vertical in 0 .. width / base - 1
loop
full_vector := y + 2 * base * ((height / base) / 2) - ((y + height) mod base) / 2;

View File

@ -93,8 +93,8 @@ begin
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);
--
ui.draw_menu (0, 0, preview_width, preview_height, false);
ui.draw_tiny_menu (preview_width, 0, side_panel, preview_height, true);
--~ui.draw_menu (0, 0, preview_width, preview_height, false);
--~ui.draw_tiny_menu (preview_width, 0, side_panel, preview_height, true);
--
--~for this in magic.blow_away .. magic.thunderclap loop magic.draw (this, 112 * (magic.codex'pos (this) - magic.codex'pos (magic.chain_magic_arrow)) - 60, 112 * 0 + 64); end loop;
--~for this in magic.agony_mass .. magic.weakness loop magic.draw (this, 112 * (magic.codex'pos (this) - magic.codex'pos (magic.thunderclap)) - 60, 112 * 1 + 64); end loop;
@ -111,8 +111,8 @@ begin
--
core.draw_state_box (preview_width + 32, 32);
--
menu.draw (menu.attribute_information, 100, 100);
menu.draw (menu.resource_information, 600, 100);
--~menu.draw (menu.attribute_information, 100, 100);
--~menu.draw (menu.resource_information, 600, 100);
end loop gameplay;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------