Unfinished grid changes...
This commit is contained in:
parent
118f087170
commit
2978693b9d
@ -241,31 +241,55 @@ package body core is
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw_squared_grid (x, y, width, height : in integer) is
|
||||
offset_x : constant integer := x + base / 2 + (width mod base) / 2;
|
||||
offset_y : constant integer := y + base / 2 + (height mod base) / 2;
|
||||
crop_height : constant integer := ((height + base) / 2) mod base;
|
||||
crop_offset : constant integer := y - ((y + height) 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;
|
||||
--~crop_height : constant integer := ((height + base) / 2) mod base;
|
||||
--~crop_offset : constant integer := y - ((y + height) mod base) / 2;
|
||||
--~middle : constant vector_2 := (width / 2 + x, height / 2 + y);
|
||||
offset : constant vector_2 := (((width - base) / 2) mod base, ((height - base) / 2) mod base);
|
||||
repeat : constant vector_2 := (2 * (((width - base) / 2) / base) + 1, 2 * (((height - base) / 2) / base) + 1);
|
||||
--~blabla : constant integer := y + height - ((height - base) / 2) mod base;
|
||||
--~next : integer;
|
||||
begin
|
||||
for vertical in 0 .. width / base - 1
|
||||
loop
|
||||
line ((offset_x + vertical * base, y), (0, crop_height));
|
||||
end loop;
|
||||
--
|
||||
for horizontal in 0 .. height / base - 1
|
||||
loop
|
||||
line ((x, offset_y + horizontal * base), (width, 0));
|
||||
--
|
||||
for vertical in 0 .. width / base - 1
|
||||
loop
|
||||
line ((offset_x + vertical * base - base / 2, crop_offset + 2 * base * (horizontal / 2) + base), (0, base));
|
||||
line ((offset_x + vertical * base, crop_offset + 2 * base * (horizontal / 2)), (0, base));
|
||||
end loop;
|
||||
end loop;
|
||||
--
|
||||
for vertical in 0 .. width / base - 1
|
||||
loop
|
||||
line ((offset_x + vertical * base, crop_offset + 2 * base * ((height / base) / 2)), (0, crop_height));
|
||||
end loop;
|
||||
--~for vertical in 0 .. width / base - 1
|
||||
--~loop
|
||||
--~line ((offset_x + vertical * base, y), (0, crop_height));
|
||||
--~end loop;
|
||||
--~--
|
||||
--~for horizontal in 0 .. height / base - 1
|
||||
--~loop
|
||||
--~line ((x, offset_y + horizontal * base), (width, 0));
|
||||
--~--
|
||||
--~for vertical in 0 .. width / base - 1
|
||||
--~loop
|
||||
--~line ((offset_x + vertical * base - base / 2, crop_offset + 2 * base * (horizontal / 2) + base), (0, base));
|
||||
--~line ((offset_x + vertical * base, crop_offset + 2 * base * (horizontal / 2)), (0, base));
|
||||
--~end loop;
|
||||
--~end loop;
|
||||
--~--
|
||||
--~for vertical in 0 .. width / base - 1
|
||||
--~loop
|
||||
--~line ((offset_x + vertical * base, crop_offset + 2 * base * ((height / base) / 2)), (0, crop_height));
|
||||
--~end loop;
|
||||
--~--
|
||||
--~--
|
||||
--~--
|
||||
-- upper crop
|
||||
--~next := middle.x - base / 2; while next > x loop line ((next, y ), (0, ((height + base) / 2) mod base)); next := next - base; end loop;
|
||||
--~next := middle.x + base / 2; while next < x + width loop line ((next, y ), (0, ((height + base) / 2) mod base)); next := next + base; end loop;
|
||||
-- horizontal full
|
||||
for txen in 0 .. repeat.y loop line ((x, y + offset.y + txen * base), (width, 0)); end loop;
|
||||
for txen in 0 .. repeat.x loop line ((x + offset.x + txen * base, y), (0, height)); end loop;
|
||||
--~next := middle.y - base / 2; while next > y loop line ((x, next ), (width, 0 )); next := next - base; end loop;
|
||||
--~next := middle.y + base / 2; while next < y + height loop line ((x, next ), (width, 0 )); next := next + base; end loop;
|
||||
-- middle side
|
||||
--~next := middle.x - base / 2; while next > x loop line ((next, (height - base) / 2 + y), (0, base )); next := next - base; end loop;
|
||||
--~next := middle.x + base / 2; while next < x + width loop line ((next, (height - base) / 2 + y), (0, base )); next := next + base; end loop;
|
||||
-- lower crop
|
||||
--~next := (width - base) / 2 + x; while next > x loop line ((next, blabla ), (0, ((height + base) / 2) mod base)); next := next - base; end loop;
|
||||
--~next := (width + base) / 2 + x; while next < x + width loop line ((next, blabla ), (0, ((height + base) / 2) mod base)); next := next + base; end loop;
|
||||
--~next := (width - base) / 2 + x; while next > x loop line ((x, next), (width, 0)); next := next - base; end loop;
|
||||
--~next := (width + base) / 2 + x; while next < width loop line ((x, next), (width, 0)); next := next + base; end loop;
|
||||
end draw_squared_grid;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
@ -21,9 +21,9 @@ procedure main is
|
||||
|
||||
begin
|
||||
|
||||
for index in attribute.codex loop put_line (attribute.trait (index).name & integer'image (player.attributes (index))); end loop;
|
||||
for index in skill.codex loop put_line (skill.trait (index).name & integer'image (player.skills (index))); end loop;
|
||||
for index in resource.codex loop put_line (resource.trait (index).name & integer'image (player.resources (index))); end loop;
|
||||
--~for index in attribute.codex loop put_line (attribute.trait (index).name & integer'image (player.attributes (index))); end loop;
|
||||
--~for index in skill.codex loop put_line (skill.trait (index).name & integer'image (player.skills (index))); end loop;
|
||||
--~for index in resource.codex loop put_line (resource.trait (index).name & integer'image (player.resources (index))); end loop;
|
||||
|
||||
core.configure;
|
||||
ui.configure;
|
||||
@ -95,11 +95,11 @@ begin
|
||||
--~construction.draw (this, 128 * (construction.codex'pos (this) mod 12) + 32, 128 * (construction.codex'pos (this) / 12) + 32);
|
||||
--~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_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;
|
||||
|
@ -106,7 +106,7 @@ void render_string (char * string, int x, int y, int colour, char monospace) {
|
||||
}
|
||||
|
||||
void render_vector (int x1, int y1, int x2, int y2) {
|
||||
DrawLine (x1, y1, x2, y2, RED);
|
||||
DrawLine (x1, y1, x2, y2, BLACK);
|
||||
}
|
||||
|
||||
void engine_configure (void) {
|
||||
|
Loading…
Reference in New Issue
Block a user