diff --git a/source/attribute.adb b/source/attribute.adb deleted file mode 100644 index c307cd6..0000000 --- a/source/attribute.adb +++ /dev/null @@ -1,25 +0,0 @@ --- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic --- --- GNU General Public Licence (version 3 or later) - -with core, ui; - -package body attribute is - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - - procedure draw_points (data : in points; x, y : in integer) is - move_x : integer := x; - begin - for index in enumeration loop - ui.draw_icon (icon (index), -(description (index).text), move_x, y); - ui.draw_text_box (move_x, y + core.icon, core.icon, core.icon); - ui.write (data (index).value'image, move_x + 4, y + core.icon + 8, (255, 255, 255, 255), 15, true); - -- - move_x := move_x + core.icon; - end loop; - end draw_points; - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - -end attribute; diff --git a/source/main.adb b/source/main.adb index 43385ae..1bb03cb 100644 --- a/source/main.adb +++ b/source/main.adb @@ -363,7 +363,18 @@ begin size => 18); end loop; -- - material.draw_points (world.map.chads (1).materials, (preview_width - core.icon * material.count) / 2, core.base + core.icon); + declare move_x : integer := (preview_width - core.icon * material.count) / 2; + begin + for index in material.enumeration loop + if world.map.chads (1).materials (index).value > 0 then + ui.draw_icon (material.icon (index), -(material.description (index).name), move_x, core.base + core.icon); + ui.draw_text_box (move_x, core.base + core.icon + core.icon, core.icon, core.icon); + ui.write (world.map.chads (1).materials (index).value'image, move_x, core.base + core.icon + core.icon + 8, (255, 255, 255, 255), 15, true); + -- + move_x := move_x + core.icon; + end if; + end loop; + end; -- signal_list (core.signal_mode).all; -- diff --git a/source/material.adb b/source/material.adb deleted file mode 100644 index a604017..0000000 --- a/source/material.adb +++ /dev/null @@ -1,29 +0,0 @@ --- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic --- --- GNU General Public Licence (version 3 or later) - -with core, ui; - -package body material is - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - - procedure draw_points (data : in points := (others => (0, 0)); - x : in integer := 0; - y : in integer := 0) is - move_x : integer := x; - begin - for index in enumeration loop - if data (index).value > 0 then - ui.draw_icon (icon (index), -(description (index).name), move_x, y); - ui.draw_text_box (move_x, y + core.icon, core.icon, core.icon); - ui.write (data (index).value'image, move_x, y + core.icon + 8, (255, 255, 255, 255), 15, true); - -- - move_x := move_x + core.icon; - end if; - end loop; - end draw_points; - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - -end material; diff --git a/source/material.ads b/source/material.ads index c192c2c..80bb924 100644 --- a/source/material.ads +++ b/source/material.ads @@ -65,12 +65,6 @@ package material is icon : array (enumeration) of core.sprite; - ------------------------------------------------------------------------------------------ - - procedure draw_points (data : in points := (others => (0, 0)); - x : in integer := 0; - y : in integer := 0); - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ end material; diff --git a/source/resource.adb b/source/resource.adb deleted file mode 100644 index e10d9f1..0000000 --- a/source/resource.adb +++ /dev/null @@ -1,27 +0,0 @@ --- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic --- --- GNU General Public Licence (version 3 or later) - -with core, ui; - -package body resource is - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - - procedure draw_points (data : in points; x, y : in integer) is - frame_width : constant integer := 4 * core.icon; - begin - for index in enumeration loop - ui.draw_icon (icon (index), -(description (index).text), x + (core.icon + frame_width) * enumeration'pos (index), y); - ui.draw_frame (-(description (index).text), x + (core.icon + frame_width) * enumeration'pos (index) + core.icon, y, frame_width, core.icon); - -- - ui.write (text => data (index).value'image & " /" & data (index).limit'image, - x => x + (core.icon + frame_width) * enumeration'pos (index) + core.icon - 1, - y => y + 7, - size => 18); - end loop; - end draw_points; - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - -end resource; diff --git a/source/skill.adb b/source/skill.adb deleted file mode 100644 index 68f1b28..0000000 --- a/source/skill.adb +++ /dev/null @@ -1,35 +0,0 @@ --- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic --- --- GNU General Public Licence (version 3 or later) - -with core, ui; - -package body skill is - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - - procedure draw_points (data : in points := (others => (0, 0)); - x : in integer := 0; - y : in integer := 0) is - move_x : integer := x; - move_y : integer := y; - begin - for index in enumeration loop - if (enumeration'pos (index) + 1) mod (count / 2 + 1) = 0 then - move_x := x + 2 * core.icon + 120; - move_y := y; - end if; - -- - ui.draw_icon (icon (index), -(description (index).text), move_x, move_y); - ui.draw_text_box (move_x + core.icon, move_y, core.icon, core.icon); - ui.write (data (index).value'image, move_x + core.icon, move_y + 8, (255, 255, 255, 255), 15, true); - -- - ui.write (-(description (index).name), move_x + 2 * core.icon + 4, move_y + 8, (255, 255, 255, 255), 15, true); - -- - move_y := move_y + core.icon; - end loop; - end draw_points; - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - -end skill;