2024-04-25 00:27:13 -04:00
|
|
|
-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
|
|
|
|
--
|
|
|
|
-- GNU General Public Licence (version 3 or later)
|
|
|
|
|
2024-05-11 00:28:50 -04:00
|
|
|
with core, ui, attribute, skill, resource, faction;
|
2024-02-22 03:29:04 -05:00
|
|
|
|
|
|
|
package body chad is
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
2024-04-26 16:05:48 -04:00
|
|
|
sprite : array (enumeration) of core.sprite;
|
2024-04-23 16:19:29 -04:00
|
|
|
|
2024-05-01 14:41:55 -04:00
|
|
|
pepe_the_frog : core.sprite;
|
2024-05-03 05:28:44 -04:00
|
|
|
alice_the_mad : core.sprite;
|
2024-05-01 14:41:55 -04:00
|
|
|
|
2024-04-23 16:19:29 -04:00
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
2024-02-22 03:29:04 -05:00
|
|
|
procedure configure is
|
|
|
|
begin
|
2024-03-11 08:42:25 -04:00
|
|
|
core.echo (core.comment, "Configuring chad components...");
|
|
|
|
--
|
2024-05-01 14:41:55 -04:00
|
|
|
pepe_the_frog := core.import_sprite ("./sprite/unit/pepe_the_frog.png", 4, 6);
|
2024-05-03 05:28:44 -04:00
|
|
|
alice_the_mad := core.import_sprite ("./sprite/unit/alice_the_mad.png", 4, 6);
|
2024-05-01 14:41:55 -04:00
|
|
|
--
|
2024-04-27 10:01:54 -04:00
|
|
|
for index in enumeration loop
|
2024-05-01 14:41:55 -04:00
|
|
|
--~sprite (index) := core.import_sprite ("./sprite/chad/" & core.lowercase (enumeration'image (index)) & ".png", 4, 6);
|
2024-02-22 03:29:04 -05:00
|
|
|
null;
|
|
|
|
end loop;
|
|
|
|
end configure;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
2024-04-26 16:05:48 -04:00
|
|
|
procedure draw (index : in enumeration; x, y : in integer) is
|
2024-02-22 03:29:04 -05:00
|
|
|
begin
|
|
|
|
core.draw (sprite (index), x, y);
|
|
|
|
end draw;
|
|
|
|
|
2024-05-01 14:41:55 -04:00
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
2024-05-11 00:28:50 -04:00
|
|
|
procedure draw_data (player : in data; x, y : in integer) is
|
|
|
|
begin
|
2024-05-11 00:49:15 -04:00
|
|
|
attribute.draw_points (player.attributes, x, y, true);
|
|
|
|
skill.draw_points (player.skills, x + core.icon * 3, y, true);
|
2024-05-11 00:28:50 -04:00
|
|
|
end draw_data;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
2024-05-01 14:41:55 -04:00
|
|
|
procedure draw_pepe is
|
|
|
|
begin
|
|
|
|
core.draw (pepe_the_frog, (core.window_width - core.base) / 2, (core.window_height - core.base) / 2);
|
|
|
|
end draw_pepe;
|
|
|
|
|
2024-05-03 05:28:44 -04:00
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
procedure draw_alice is
|
|
|
|
begin
|
|
|
|
core.draw (alice_the_mad, (core.window_width - core.base) / 2, (core.window_height - core.base) / 2);
|
|
|
|
end draw_alice;
|
|
|
|
|
2024-02-22 03:29:04 -05:00
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
end chad;
|