Minor refactoring of deity data...

This commit is contained in:
Ognjen Milan Robovic 2024-05-15 06:38:53 -04:00
parent a974a96f72
commit 7ba21d2a81
5 changed files with 8 additions and 6 deletions

View File

@ -161,7 +161,7 @@ package body core is
this.states := states;
--
if this.width = 0 or this.height = 0 then
echo (failure, "Sprite not imported: " & file_path);
echo (warning, "Sprite not imported: " & file_path);
end if;
--
return this;

View File

@ -17,15 +17,15 @@ package body deity is
core.echo (core.comment, "Configuring deity components...");
--
for index in enumeration loop
sprite (index) := core.import_sprite ("./sprite/deity/" & core.uppercase (enumeration'image (index)) & ".png", 4, 1);
sprite (index) := core.import_sprite ("./sprite/deity/" & enumeration'image (index) & ".png", 4, 1);
end loop;
end configure;
------------------------------------------------------------------------------------------
procedure draw (value : in enumeration; x, y : in integer) is
procedure draw (index : in enumeration; x, y : in integer) is
begin
null;
core.draw (sprite (index), x, y);
end draw;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@ -45,7 +45,7 @@ package deity is
procedure configure;
procedure draw (value : in enumeration; x, y : in integer);
procedure draw (index : in enumeration; x, y : in integer);
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@ -5,7 +5,7 @@
pragma ada_2012;
--~with core, ui, effect, attribute, skill, resource, faction, might, magic, equipment, unit, construction, chad, deity, world, ai;
with core, ui, effect, attribute, skill, resource, faction, material, magic, equipment, unit, construction, chad, world;
with core, ui, effect, attribute, skill, resource, faction, deity, material, magic, equipment, unit, construction, chad, world;
with ada.strings.unbounded;
use ada.strings.unbounded;
@ -198,6 +198,7 @@ begin
material.configure;
equipment.configure;
unit.configure;
deity.configure;
construction.configure;
chad.configure;
world.configure;
@ -307,6 +308,7 @@ begin
--~might.menu (0, 0, true);
--
chad.draw_alice;
deity.draw (deity.AEZORA, 300, 300);
--
ui.write (framerate'image, window_width - 5 * core.icon + 3, window_height - 27);
--

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB