Revised general information structures...
This commit is contained in:
parent
a1f4786720
commit
4dc8fb61ad
@ -3,5 +3,6 @@ subroutine fairy_synchronize (level)
|
||||
implicit none
|
||||
integer, intent (in) :: level
|
||||
write (*, '(a)', advance='no') "Heyo Fortran!"
|
||||
print *
|
||||
|
||||
end subroutine fairy_synchronize
|
||||
|
@ -10,7 +10,7 @@ package body attribute is
|
||||
begin
|
||||
for index in codex
|
||||
loop
|
||||
icon (index) := core.load_sprite ("./sprite/attribute/" & core.lowercase (codex'image (index)) & ".png", 1, 1);
|
||||
sprite (index) := core.load_sprite ("./sprite/attribute/" & core.lowercase (codex'image (index)) & ".png", 1, 1);
|
||||
end loop;
|
||||
end configure;
|
||||
|
||||
@ -18,9 +18,15 @@ package body attribute is
|
||||
|
||||
procedure draw (index : in codex; x, y : in integer) is
|
||||
begin
|
||||
core.draw (icon (index), x, y);
|
||||
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 icon (index : in integer) return core.sprite is begin return sprite (codex'val (index)); end icon;
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end attribute;
|
||||
|
@ -23,7 +23,7 @@ package attribute is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
icon : sprite_array;
|
||||
sprite : sprite_array;
|
||||
|
||||
count : constant natural := codex'pos (codex'last) + 1;
|
||||
|
||||
@ -40,6 +40,10 @@ package attribute is
|
||||
|
||||
procedure draw (index : in codex; x, y : in integer);
|
||||
|
||||
function name (index : in integer) return core.short_string;
|
||||
function base (index : in integer) return base_limit;
|
||||
function icon (index : in integer) return core.sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end attribute;
|
||||
|
@ -131,7 +131,7 @@ package body core is
|
||||
|
||||
procedure debug (text : in string) is
|
||||
begin
|
||||
put_line (text);
|
||||
put_line ("> " & text);
|
||||
end debug;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
@ -30,11 +30,16 @@ package body menu is
|
||||
trait (resource_information) := ("Resource Information ", resource.count, 10, 400, 64, new element_array (0 .. resource.count - 1));
|
||||
trait (none) := ("-- ", 2, 10, 0, 0, new element_array (0 .. 1));
|
||||
--
|
||||
for index in attribute.codex
|
||||
for index in 0 .. attribute.count - 1
|
||||
loop
|
||||
trait (attribute_information).elements (attribute.codex'pos (index)) := make_button (attribute.codex'pos (index), attribute.trait (index).name, attribute.icon (index));
|
||||
trait (attribute_information).elements (index) := make_button (index, attribute.name (index), attribute.icon (index));
|
||||
end loop;
|
||||
--
|
||||
--~for index in attribute.codex
|
||||
--~loop
|
||||
--~trait (attribute_information).elements (attribute.codex'pos (index)) := make_button (attribute.codex'pos (index), attribute.trait (index).name, attribute.icon (index));
|
||||
--~end loop;
|
||||
--
|
||||
for index in skill.codex
|
||||
loop
|
||||
trait (skill_information).elements (skill.codex'pos (index)) := make_button (skill.codex'pos (index), skill.trait (index).name, skill.icon (index));
|
||||
|
Loading…
Reference in New Issue
Block a user