xhads/source/skill.adb

40 lines
1.4 KiB
Ada

with core, ui, skill;
use skill;
package body skill is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
type sprite_array is array (codex) of core.sprite;
------------------------------------------------------------------------------------------
icon : sprite_array;
------------------------------------------------------------------------------------------
procedure configure is
begin
for index in codex
loop
declare
folder : constant string := core.lowercase (ui.style'image (ui.active));
file : constant string := core.lowercase (codex'image (index));
begin
icon (index) := core.load_sprite ("./sprite/menu/" & folder & "/skill/" & file & ".png", 1, 1);
end;
end loop;
end configure;
------------------------------------------------------------------------------------------
procedure draw (index : in codex; x, y : in integer) is
begin
core.draw (icon (index), x, y);
end draw;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end skill;