Moving onto menus again...
This commit is contained in:
parent
c05eafca94
commit
603a5025fe
@ -199,67 +199,34 @@ package body core is
|
|||||||
procedure draw_squared_grid (x, y, width, height : in integer) is
|
procedure draw_squared_grid (x, y, width, height : in integer) is
|
||||||
offset_x : constant integer := x + base / 2 + (width mod base) / 2;
|
offset_x : constant integer := x + base / 2 + (width mod base) / 2;
|
||||||
offset_y : constant integer := y + base / 2 + (height mod base) / 2;
|
offset_y : constant integer := y + base / 2 + (height mod base) / 2;
|
||||||
line_h : constant integer := height / base - 1;
|
|
||||||
line_v1 : constant integer := width / base;
|
|
||||||
line_v2 : constant integer := width / base - 1;
|
|
||||||
crop_height : constant integer := ((height + base) / 2) mod base;
|
crop_height : constant integer := ((height + base) / 2) mod base;
|
||||||
full_vector : integer := 0;
|
crop_offset : constant integer := y - ((y + height) mod base) / 2;
|
||||||
--~horizontal : integer := 0;
|
|
||||||
--~vertical : integer := 0;
|
|
||||||
--~offset : integer := (if (height / base - 1) mod 2 = 1 then 16 else 0);
|
|
||||||
begin
|
begin
|
||||||
for vertical in 0 .. line_v2
|
for vertical in 0 .. width / base - 1
|
||||||
loop
|
loop
|
||||||
--~render_vector (offset_x + vertical * base, y, offset_x + vertical * base, y + crop_height);
|
|
||||||
line ((offset_x + vertical * base, y), (0, crop_height));
|
line ((offset_x + vertical * base, y), (0, crop_height));
|
||||||
end loop;
|
end loop;
|
||||||
--
|
--
|
||||||
--~while horizontal < y + height - base - offset
|
for horizontal in 0 .. height / base - 1
|
||||||
--~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
|
loop
|
||||||
--~render_vector (x, offset_y + horizontal * base, x + width, offset_y + horizontal * base);
|
|
||||||
line ((x, offset_y + horizontal * base), (width, 0));
|
line ((x, offset_y + horizontal * base), (width, 0));
|
||||||
--
|
--
|
||||||
for vertical in 0 .. line_v1
|
for vertical in 0 .. width / base
|
||||||
loop
|
loop
|
||||||
full_vector := y + 2 * base * (horizontal / 2) - ((y + height) mod base) / 2;
|
line ((offset_x + vertical * base - base / 2, crop_offset + 2 * base * (horizontal / 2) + base), (0, base));
|
||||||
--
|
|
||||||
--~render_vector (offset_x + vertical * base - base / 2, full_vector + base, offset_x + vertical * base - base / 2, full_vector + 2 * base);
|
|
||||||
line ((offset_x + vertical * base - base / 2, full_vector + base), (0, base));
|
|
||||||
end loop;
|
end loop;
|
||||||
--
|
--
|
||||||
if horizontal > 1 then
|
if horizontal > 1 then
|
||||||
for vertical in 0 .. line_v2
|
for vertical in 0 .. width / base - 1
|
||||||
loop
|
loop
|
||||||
full_vector := y + 2 * base * (horizontal / 2) - ((y + height) mod base) / 2;
|
line ((offset_x + vertical * base, crop_offset + 2 * base * (horizontal / 2)), (0, base));
|
||||||
--
|
|
||||||
--~render_vector (offset_x + vertical * base, full_vector, offset_x + vertical * base, full_vector + base);
|
|
||||||
line ((offset_x + vertical * base, full_vector), (0, base));
|
|
||||||
end loop;
|
end loop;
|
||||||
end if;
|
end if;
|
||||||
end loop;
|
end loop;
|
||||||
--
|
--
|
||||||
for vertical in 0 .. width / base - 1
|
for vertical in 0 .. width / base - 1
|
||||||
loop
|
loop
|
||||||
full_vector := y + 2 * base * ((height / base) / 2) - ((y + height) mod base) / 2;
|
line ((offset_x + vertical * base, crop_offset + 2 * base * ((height / base) / 2)), (0, crop_height));
|
||||||
--
|
|
||||||
--~render_vector (offset_x + vertical * base, full_vector, offset_x + vertical * base, full_vector + crop_height);
|
|
||||||
line ((offset_x + vertical * base, full_vector), (0, crop_height));
|
|
||||||
end loop;
|
end loop;
|
||||||
end draw_squared_grid;
|
end draw_squared_grid;
|
||||||
|
|
||||||
|
@ -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_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);
|
||||||
--
|
--
|
||||||
--~ui.draw_menu (0, 0, preview_width, preview_height, false);
|
ui.draw_menu (0, 0, preview_width, preview_height, false);
|
||||||
--~ui.draw_tiny_menu (preview_width, 0, side_panel, preview_height, true);
|
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.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;
|
--~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);
|
core.draw_state_box (preview_width + 32, 32);
|
||||||
--
|
--
|
||||||
--~menu.draw (menu.attribute_information, 100, 100);
|
menu.draw (menu.attribute_information, 100, 100);
|
||||||
--~menu.draw (menu.resource_information, 600, 100);
|
menu.draw (menu.resource_information, 600, 100);
|
||||||
end loop gameplay;
|
end loop gameplay;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user