Unfinished work on clipping sub-screen view...
This commit is contained in:
parent
879e1c6067
commit
614a022831
@ -120,15 +120,15 @@ package body core is
|
|||||||
return;
|
return;
|
||||||
end if;
|
end if;
|
||||||
--
|
--
|
||||||
--~if x < u + width - data.width then crop_width := data.width; else crop_width := data.width - (x + data.width) mod (width + u); end if;
|
crop_width := data.width - (if x + data.width > u + width then (x + data.width) mod (u + width) else 0);
|
||||||
--~if x < u + width - data.width then crop_width := data.width; else crop_width := data.width - (x + data.width) mod (width + u); end if;
|
crop_height := data.height - (if y + data.height > v + height then (y + data.height) mod (v + height) else 0);
|
||||||
crop_width := data.width - (if x < u + width - data.width then 0 else (x + data.width) mod (width + u));
|
--
|
||||||
crop_height := data.height - (if y < v + height - data.height then 0 else (y + data.height) mod (height + v));
|
--~crop_u := (if x < u then data.width - u mod (x + data.width) else 0);
|
||||||
crop_u := 0;
|
--~crop_v := (if y < v then data.height - v mod (y + data.height) else 0);
|
||||||
crop_v := 0;
|
--~crop_u := (if x < u and x < u - data.width then data.width - (x + data.width) mod u else 0);
|
||||||
--~if y + data.height < v + height then crop_height := (if y + data.height < height then data.height else data.height - (y + data.height) mod height); end if;
|
--~crop_v := (if y < v and y < v - data.height then data.height - (y + data.height) mod v else 0);
|
||||||
--~if x + data.width > u then crop_u := (x + data.width) mod u; end if;
|
crop_u := (if x < u then u mod x + data.width else 0);
|
||||||
--~if y + data.height > v then crop_v := (y + data.height) mod v; end if;
|
crop_v := (if y < v then v mod y + data.height else 0);
|
||||||
--
|
--
|
||||||
render_sprite (data.index, x, y, crop_u, crop_v, crop_width, crop_height);
|
render_sprite (data.index, x, y, crop_u, crop_v, crop_width, crop_height);
|
||||||
end view;
|
end view;
|
||||||
|
@ -20,10 +20,14 @@ procedure main is
|
|||||||
-- Marina Ann Hantzis
|
-- Marina Ann Hantzis
|
||||||
|
|
||||||
side_panel : integer := 480;
|
side_panel : integer := 480;
|
||||||
preview_x : integer := 24;
|
--~preview_x : integer := 24;
|
||||||
preview_y : integer := 24;
|
--~preview_y : integer := 24;
|
||||||
preview_width : integer := 1800 - side_panel;
|
--~preview_width : integer := 1800 - side_panel;
|
||||||
preview_height : integer := 900;
|
--~preview_height : integer := 900;
|
||||||
|
preview_x : integer := 100;
|
||||||
|
preview_y : integer := 100;
|
||||||
|
preview_width : integer := 800;
|
||||||
|
preview_height : integer := 600;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
@ -99,8 +103,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;
|
||||||
|
Loading…
Reference in New Issue
Block a user