Tested and updated squared grid drawing...
This commit is contained in:
parent
7a9b47592f
commit
593b4b8517
@ -196,12 +196,11 @@ package body core is
|
|||||||
line_v1 : constant integer := width / base;
|
line_v1 : constant integer := width / base;
|
||||||
line_v2 : constant integer := width / base - 1;
|
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;
|
full_vector : integer := 0;
|
||||||
begin
|
begin
|
||||||
for vertical in 0 .. line_v2
|
for vertical in 0 .. line_v2
|
||||||
loop
|
loop
|
||||||
render_vector (offset_x + vertical * base, y, offset_x + vertical * base, y + crop_height);
|
render_vector (offset_x + vertical * base, y, offset_x + vertical * base, y + crop_height);
|
||||||
--~render_vector (offset_x + vertical * base - base / 2, y, offset_x + vertical * base - base / 2, y + crop_height);
|
|
||||||
end loop;
|
end loop;
|
||||||
--
|
--
|
||||||
for horizontal in 0 .. line_h
|
for horizontal in 0 .. line_h
|
||||||
@ -214,6 +213,7 @@ package body core is
|
|||||||
--
|
--
|
||||||
render_vector (offset_x + vertical * base - base / 2, full_vector + base, offset_x + vertical * base - base / 2, full_vector + 2 * base);
|
render_vector (offset_x + vertical * base - base / 2, full_vector + base, offset_x + vertical * base - base / 2, full_vector + 2 * base);
|
||||||
end loop;
|
end loop;
|
||||||
|
--
|
||||||
if horizontal > 1 then
|
if horizontal > 1 then
|
||||||
for vertical in 0 .. line_v2
|
for vertical in 0 .. line_v2
|
||||||
loop
|
loop
|
||||||
|
@ -19,6 +19,12 @@ procedure main is
|
|||||||
-- Ada Augusta King
|
-- Ada Augusta King
|
||||||
-- Marina Ann Hantzis
|
-- Marina Ann Hantzis
|
||||||
|
|
||||||
|
side_panel : integer := 480;
|
||||||
|
preview_x : integer := 24;
|
||||||
|
preview_y : integer := 24;
|
||||||
|
preview_width : integer := 1800 - side_panel;
|
||||||
|
preview_height : integer := 900;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
core.configure;
|
core.configure;
|
||||||
@ -48,7 +54,10 @@ begin
|
|||||||
--~delay duration (0.333);
|
--~delay duration (0.333);
|
||||||
--~end if;
|
--~end if;
|
||||||
--
|
--
|
||||||
world.draw (24, 24, core.window_width - 480 - 48, core.window_height - 48, core.cursor_mode = 2);
|
if core.signal_mode = core.signal_code'pos (core.signal_a) then side_panel := side_panel + 60; end if;
|
||||||
|
if core.signal_mode = core.signal_code'pos (core.signal_d) then side_panel := side_panel - 60; end if;
|
||||||
|
preview_width := 1800 - side_panel;
|
||||||
|
world.draw (preview_x, preview_y, preview_width - 2 * preview_x, preview_height - 2 * preview_y, core.cursor_mode = 2);
|
||||||
--
|
--
|
||||||
if core.signal_mode = core.signal_code'pos (core.signal_left) then core.camera.x := core.camera.x - 1; end if;
|
if core.signal_mode = core.signal_code'pos (core.signal_left) then core.camera.x := core.camera.x - 1; end if;
|
||||||
if core.signal_mode = core.signal_code'pos (core.signal_right) then core.camera.x := core.camera.x + 1; end if;
|
if core.signal_mode = core.signal_code'pos (core.signal_right) then core.camera.x := core.camera.x + 1; end if;
|
||||||
@ -81,11 +90,11 @@ begin
|
|||||||
--~construction.draw (this, 128 * (construction.codex'pos (this) mod 12) + 32, 128 * (construction.codex'pos (this) / 12) + 32);
|
--~construction.draw (this, 128 * (construction.codex'pos (this) mod 12) + 32, 128 * (construction.codex'pos (this) / 12) + 32);
|
||||||
--~end loop;
|
--~end loop;
|
||||||
--
|
--
|
||||||
core.draw_central_grid (24, 24, core.window_width - 480 - 48, core.window_height - 48);
|
core.draw_central_grid (preview_x, preview_y, preview_width - 2 * preview_x, preview_height - 2 * preview_y);
|
||||||
core.draw_squared_grid (24, 24, core.window_width - 480 - 48, core.window_height - 48);
|
core.draw_squared_grid (preview_x, preview_y, preview_width - 2 * preview_x, preview_height - 2 * preview_y);
|
||||||
--
|
--
|
||||||
--~ui.draw_menu (0, 0, core.window_width - 480, core.window_height, false);
|
ui.draw_menu (0, 0, preview_width, preview_height, false);
|
||||||
--~ui.draw_tiny_menu (core.window_width - 480, 0, 480, core.window_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;
|
||||||
@ -100,7 +109,7 @@ begin
|
|||||||
--~for index in resource.codex loop resource.draw (index, 32 * resource.codex'pos (index) + 64, 96); end loop;
|
--~for index in resource.codex loop resource.draw (index, 32 * resource.codex'pos (index) + 64, 96); end loop;
|
||||||
--~for index in skill.codex loop skill.draw (index, 32 * skill.codex'pos (index) + 64, 128); end loop;
|
--~for index in skill.codex loop skill.draw (index, 32 * skill.codex'pos (index) + 64, 128); end loop;
|
||||||
--
|
--
|
||||||
core.draw_state_box (1352, 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);
|
||||||
|
Loading…
Reference in New Issue
Block a user