35 lines
1.2 KiB
Ada
35 lines
1.2 KiB
Ada
with core, ui, attribute;
|
|
|
|
use attribute;
|
|
|
|
package body attribute is
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
type sprite_array is array (codex) of core.sprite;
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
icon : sprite_array;
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
procedure configure is
|
|
begin
|
|
for index in codex
|
|
loop
|
|
icon (index) := core.load_sprite ("./sprite/attribute/" & core.lowercase (codex'image (index)) & ".png", 1, 1);
|
|
end loop;
|
|
end configure;
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
procedure draw (index : in codex; x, y : in integer) is
|
|
begin
|
|
core.draw (icon (index), x, y);
|
|
end draw;
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
end attribute;
|