xhads/source/material.adb

34 lines
1.2 KiB
Ada
Raw Normal View History

2024-05-12 20:15:36 -04:00
-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
--
-- GNU General Public Licence (version 3 or later)
with core, ui;
package body material is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sprite : array (enumeration) of core.sprite;
------------------------------------------------------------------------------------------
procedure configure is
begin
core.echo (core.comment, "Configuring material components...");
--
for index in enumeration loop
sprite (index) := core.import_sprite (core.folder & "/game/material/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1);
2024-05-12 20:15:36 -04:00
end loop;
end configure;
------------------------------------------------------------------------------------------
procedure draw (index : in enumeration; x, y : in integer) is
begin
core.draw (sprite (index), x, y);
end draw;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end material;