2024-02-16 05:52:11 -05:00
|
|
|
with core, effect, magic;
|
2024-02-15 21:03:09 -05:00
|
|
|
|
|
|
|
use magic;
|
|
|
|
|
|
|
|
package body magic is
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
type sprite_array is array (codex) of core.sprite;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
icon : sprite_array;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
procedure configure is
|
|
|
|
begin
|
2024-03-11 08:42:25 -04:00
|
|
|
core.echo (core.comment, "Configuring magic components...");
|
|
|
|
--
|
2024-02-15 21:03:09 -05:00
|
|
|
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
|
2024-02-16 06:24:49 -05:00
|
|
|
icon (index) := core.load_sprite ("./sprite/magic/" & folder & "/" & file & ".png", 1, 1);
|
2024-02-15 21:03:09 -05:00
|
|
|
end;
|
|
|
|
end loop;
|
|
|
|
end configure;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
procedure draw (index : in codex; x, y : in integer) is
|
|
|
|
begin
|
2024-02-16 05:52:11 -05:00
|
|
|
core.draw (icon (index), x, y);
|
2024-02-15 21:03:09 -05:00
|
|
|
end draw;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
end magic;
|