xhads/source/might.adb

40 lines
1.4 KiB
Ada
Raw Normal View History

2024-02-16 05:52:11 -05:00
with core, effect, might;
2024-02-15 21:03:09 -05:00
use might;
package body might 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 (school'image (trait (index).kind));
file : constant string := core.lowercase (codex'image (index));
begin
icon (index) := core.load_sprite ("./sprite/might/" & folder & "/" & file & ".png", 1, 1);
2024-02-15 21:03:09 -05:00
end;
end loop;
end configure;
------------------------------------------------------------------------------------------
procedure draw (value : in codex; x, y : in integer) is
begin
2024-02-16 05:52:11 -05:00
core.draw (icon (value), x, y);
2024-02-15 21:03:09 -05:00
end draw;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end might;