2024-04-25 00:27:13 -04:00
|
|
|
-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
|
|
|
|
--
|
|
|
|
-- GNU General Public Licence (version 3 or later)
|
|
|
|
|
2024-02-22 03:29:04 -05:00
|
|
|
with core, ui, faction, chad;
|
|
|
|
|
|
|
|
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-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-04-27 10:01:54 -04:00
|
|
|
for index in enumeration loop
|
2024-04-26 16:05:48 -04:00
|
|
|
--~sprite (index) := core.import_sprite ("./sprite/chad/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1);
|
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;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
end chad;
|