46 lines
1.6 KiB
Ada
46 lines
1.6 KiB
Ada
-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
|
|
--
|
|
-- GNU General Public Licence (version 3 or later)
|
|
|
|
with core, ui, faction, chad;
|
|
|
|
package body chad is
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
sprite : array (enumeration) of core.sprite;
|
|
|
|
pepe_the_frog : core.sprite;
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
procedure configure is
|
|
begin
|
|
core.echo (core.comment, "Configuring chad components...");
|
|
--
|
|
pepe_the_frog := core.import_sprite ("./sprite/unit/pepe_the_frog.png", 4, 6);
|
|
--
|
|
for index in enumeration loop
|
|
--~sprite (index) := core.import_sprite ("./sprite/chad/" & core.lowercase (enumeration'image (index)) & ".png", 4, 6);
|
|
null;
|
|
end loop;
|
|
end configure;
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
procedure draw (index : in enumeration; x, y : in integer) is
|
|
begin
|
|
core.draw (sprite (index), x, y);
|
|
end draw;
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
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;
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
end chad;
|