41 lines
1.5 KiB
Ada
41 lines
1.5 KiB
Ada
with core, item;
|
|
|
|
use item;
|
|
|
|
package body item is
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
type sprite_array is array (codex) of core.sprite;
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
sprite : 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/ui/item/" & folder & "/" & file & ".png", 1, 1);
|
|
--~end;
|
|
sprite (index) := core.load_sprite ("sprite/ui/item/" & 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 (sprite (index), x, y);
|
|
end draw;
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
end item;
|