34 lines
1.5 KiB
Ada
34 lines
1.5 KiB
Ada
with core, ui, skill;
|
|
|
|
use skill;
|
|
|
|
package body skill is
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
procedure configure is
|
|
begin
|
|
for index in codex
|
|
loop
|
|
sprite (index) := core.load_sprite ("./sprite/skill/" & 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;
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
function name (index : in integer) return core.short_string is begin return trait (codex'val (index)).name; end name;
|
|
function base (index : in integer) return base_limit is begin return trait (codex'val (index)).base; end base;
|
|
function level (index : in integer) return level_limit is begin return trait (codex'val (index)).level; end level;
|
|
function icon (index : in integer) return core.sprite is begin return sprite (codex'val (index)); end icon;
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
end skill;
|