From 4bfc09dc0879279c203735cb3a7d5a5c1882b748 Mon Sep 17 00:00:00 2001 From: xolatile Date: Sat, 27 Apr 2024 10:01:54 -0400 Subject: [PATCH] Refactored loop, record and declare keyword alignment... --- source/ai.adb | 3 +-- source/ai.ads | 6 ++---- source/attribute.adb | 8 +++----- source/attribute.ads | 9 +++------ source/chad.adb | 3 +-- source/chad.ads | 6 ++---- source/construction.adb | 8 +++----- source/construction.ads | 3 +-- source/core.adb | 54 ++++++++++++++++++++++++------------------------- source/deity.ads | 7 ++----- source/effect.ads | 3 +-- source/faction.ads | 3 +-- source/item.adb | 8 +++----- source/magic.adb | 11 ++++------ source/magic.ads | 3 +-- source/main.adb | 3 +-- source/might.adb | 11 ++++------ source/might.ads | 3 +-- source/resource.adb | 6 ++---- source/resource.ads | 9 +++------ source/skill.adb | 6 ++---- source/skill.ads | 9 +++------ source/ui.adb | 37 +++++++++++++-------------------- source/unit.adb | 14 +++++-------- source/unit.ads | 3 +-- 25 files changed, 91 insertions(+), 145 deletions(-) diff --git a/source/ai.adb b/source/ai.adb index 9d108c4..7c4cb59 100644 --- a/source/ai.adb +++ b/source/ai.adb @@ -63,8 +63,7 @@ package body ai is --~y : integer := (core.window_height - height) / 2; begin --~ui.draw_tiny_menu (x, y, width, height, true); - --~for index in 1 .. actor_count - --~loop + --~for index in 1 .. actor_count loop --~core.write ("Bot" & index'image, x + offset + 0, y * index + offset, ui.glyphs (ui.active)); --~core.write ("T =" & actor_is_thirsty (index)'image, x + offset + 120, y * index + offset, ui.glyphs (ui.active)); --~core.write ("H =" & actor_is_hungry (index)'image, x + offset + 240, y * index + offset, ui.glyphs (ui.active)); diff --git a/source/ai.ads b/source/ai.ads index 9d68b69..76cc799 100644 --- a/source/ai.ads +++ b/source/ai.ads @@ -48,15 +48,13 @@ package ai is -- -- Trickster ? - type action_data is - record + type action_data is record base : data_limit; data : core.procedure_pointer; name : core.short_string; end record; - type actor_data is - record + type actor_data is record name : name_limit; clan : clan_limit; soul : data_limit; diff --git a/source/attribute.adb b/source/attribute.adb index 29f9fc0..ce3e697 100644 --- a/source/attribute.adb +++ b/source/attribute.adb @@ -16,8 +16,7 @@ package body attribute is begin core.echo (core.comment, "Configuring attribute components..."); -- - for index in enumeration - loop + for index in enumeration loop sprite (index) := core.import_sprite ("./sprite/attribute/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1); end loop; end configure; @@ -34,9 +33,8 @@ package body attribute is ui.draw_tiny_menu (move_x, move_y, width, height, true); ui.draw_title_bar (move_x, move_y, width, "Attributes"); -- - for index in enumeration - loop - ui.draw_icon (sprite (index), trait (index).text, move_x + offset, move_y + offset + enumeration'pos (index) * core.icon); + for index in enumeration loop + ui.draw_icon (sprite (index), trait (index).text, move_x + offset, move_y + offset + enumeration'pos (index) * core.icon); ui.write (trait (index).name, move_x + offset + core.icon, move_y + offset + enumeration'pos (index) * core.icon); end loop; end menu; diff --git a/source/attribute.ads b/source/attribute.ads index 38d4b53..8867bfb 100644 --- a/source/attribute.ads +++ b/source/attribute.ads @@ -14,16 +14,13 @@ package attribute is ------------------------------------------------------------------------------------------ - subtype base_limit is natural range 0 .. 12; - - type information is - record + type information is record name : core.short_string; - base : base_limit; + base : natural; text : core.long_string; end record; - type points is array (enumeration) of base_limit; + type points is array (enumeration) of natural; ------------------------------------------------------------------------------------------ diff --git a/source/chad.adb b/source/chad.adb index 566c89d..3a282d9 100644 --- a/source/chad.adb +++ b/source/chad.adb @@ -16,8 +16,7 @@ package body chad is begin core.echo (core.comment, "Configuring chad components..."); -- - for index in enumeration - loop + for index in enumeration loop --~sprite (index) := core.import_sprite ("./sprite/chad/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1); null; end loop; diff --git a/source/chad.ads b/source/chad.ads index 5cef101..9163443 100644 --- a/source/chad.ads +++ b/source/chad.ads @@ -14,8 +14,7 @@ package chad is ------------------------------------------------------------------------------------------ - type information is - record + type information is record name : core.short_string; kind : faction.enumeration; bonus_attribute : attribute.enumeration; @@ -23,8 +22,7 @@ package chad is bonus_resource : resource.enumeration; end record; - type data is - record + type data is record index : enumeration; attributes : attribute.points; skills : skill.points; diff --git a/source/construction.adb b/source/construction.adb index 16fc894..f2bc1df 100644 --- a/source/construction.adb +++ b/source/construction.adb @@ -16,11 +16,9 @@ package body construction is begin core.echo (core.comment, "Configuring construction components..."); -- - for index in enumeration - loop - declare - folder : constant string := core.lowercase (faction.enumeration'image (trait (index).kind)); - file : constant string := core.lowercase (enumeration'image (index)); + for index in enumeration loop + declare folder : constant string := core.lowercase (faction.enumeration'image (trait (index).kind)); + file : constant string := core.lowercase (enumeration'image (index)); begin sprite (index) := core.import_sprite ("./sprite/construction/" & folder & "/" & file & ".png", trait (index).frames, 1); end; diff --git a/source/construction.ads b/source/construction.ads index 5abaa2a..5d8f8f8 100644 --- a/source/construction.ads +++ b/source/construction.ads @@ -14,8 +14,7 @@ package construction is ------------------------------------------------------------------------------------------ - type information is - record + type information is record name : core.short_string; kind : faction.enumeration; price : resource.points; diff --git a/source/core.adb b/source/core.adb index b8d2d91..fc2cd91 100644 --- a/source/core.adb +++ b/source/core.adb @@ -53,13 +53,13 @@ package body core is -- put ("["); case status is - when failure => terminal (red, bold); put ("Failure"); - when warning => terminal (yellow, bold); put ("Warning"); - when success => terminal (green, bold); put ("Success"); - when comment => terminal (grey, bold); put ("Comment"); - when import => terminal (cyan, bold); put (" <-- "); - when export => terminal (blue, bold); put (" --> "); - end case; terminal; + when failure => terminal (red, bold); put ("Failure"); terminal; + when warning => terminal (yellow, bold); put ("Warning"); terminal; + when success => terminal (green, bold); put ("Success"); terminal; + when comment => terminal (grey, bold); put ("Comment"); terminal; + when import => terminal (cyan, bold); put (" <-- "); terminal; + when export => terminal (blue, bold); put (" --> "); terminal; + end case; put ("] "); -- put_line (text); @@ -105,8 +105,9 @@ package body core is function clip (value, minimum, maximum : in integer) return integer is begin - if value < minimum then return minimum; end if; - if value > maximum then return maximum; end if; + if value < minimum then return minimum; end if; + if value > maximum then return maximum; end if; + -- return value; end clip; @@ -200,8 +201,7 @@ package body core is function lowercase (text : in string) return string is result : string (1 .. text'length); begin - for index in text'range - loop + for index in text'range loop if text (index) in 'A' .. 'Z' then result (index) := character'val (character'pos (text (index)) + 32); else @@ -315,22 +315,22 @@ package body core is when 65 .. 90 => signal_mode := signal - 65 + signal_code'pos (signal_a); when 320 .. 329 => signal_mode := signal - 320 + signal_code'pos (signal_kp_0); -- - when 0 => signal_mode := signal_code'pos (signal_none); - when 32 => signal_mode := signal_code'pos (signal_space); - when 96 => signal_mode := signal_code'pos (signal_grave); - when 340 => signal_mode := signal_code'pos (signal_left_shift); - when 341 => signal_mode := signal_code'pos (signal_left_control); - when 333 => signal_mode := signal_code'pos (signal_kp_subtract); - when 334 => signal_mode := signal_code'pos (signal_kp_add); - when 256 => signal_mode := signal_code'pos (signal_escape); - when 257 => signal_mode := signal_code'pos (signal_enter); - when 258 => signal_mode := signal_code'pos (signal_tab); - when 259 => signal_mode := signal_code'pos (signal_backspace); - when 262 => signal_mode := signal_code'pos (signal_right); - when 263 => signal_mode := signal_code'pos (signal_left); - when 264 => signal_mode := signal_code'pos (signal_down); - when 265 => signal_mode := signal_code'pos (signal_up); - when others => signal_mode := signal_code'pos (signal_none); + when 0 => signal_mode := signal_code'pos (signal_none); + when 32 => signal_mode := signal_code'pos (signal_space); + when 96 => signal_mode := signal_code'pos (signal_grave); + when 340 => signal_mode := signal_code'pos (signal_left_shift); + when 341 => signal_mode := signal_code'pos (signal_left_control); + when 333 => signal_mode := signal_code'pos (signal_kp_subtract); + when 334 => signal_mode := signal_code'pos (signal_kp_add); + when 256 => signal_mode := signal_code'pos (signal_escape); + when 257 => signal_mode := signal_code'pos (signal_enter); + when 258 => signal_mode := signal_code'pos (signal_tab); + when 259 => signal_mode := signal_code'pos (signal_backspace); + when 262 => signal_mode := signal_code'pos (signal_right); + when 263 => signal_mode := signal_code'pos (signal_left); + when 264 => signal_mode := signal_code'pos (signal_down); + when 265 => signal_mode := signal_code'pos (signal_up); + when others => signal_mode := signal_code'pos (signal_none); end case; -- ray.begin_drawing; diff --git a/source/deity.ads b/source/deity.ads index f389738..013cec5 100644 --- a/source/deity.ads +++ b/source/deity.ads @@ -15,12 +15,9 @@ package deity is ------------------------------------------------------------------------------------------ - subtype piety_limit is integer range -30 .. 30; - - type information is - record + type information is record name : core.short_string; - base : piety_limit; + base : integer; end record; ------------------------------------------------------------------------------------------ diff --git a/source/effect.ads b/source/effect.ads index 3f214a4..d8581a7 100644 --- a/source/effect.ads +++ b/source/effect.ads @@ -14,8 +14,7 @@ package effect is ------------------------------------------------------------------------------------------ - type information is - record + type information is record name : core.short_string; make : boolean; end record; diff --git a/source/faction.ads b/source/faction.ads index 4c5613f..695bee3 100644 --- a/source/faction.ads +++ b/source/faction.ads @@ -15,8 +15,7 @@ package faction is ------------------------------------------------------------------------------------------ - type information is - record + type information is record name : core.short_string; bonus_attribute : attribute.enumeration; bonus_skill : skill.enumeration; diff --git a/source/item.adb b/source/item.adb index fdbd320..36cb81d 100644 --- a/source/item.adb +++ b/source/item.adb @@ -16,11 +16,9 @@ package body item is begin core.echo (core.comment, "Configuring item components..."); -- - for index in enumeration - loop - declare - folder : constant string := core.lowercase (slot'image (trait (index).kind)); - file : constant string := core.lowercase (enumeration'image (index)); + for index in enumeration loop + declare folder : constant string := core.lowercase (slot'image (trait (index).kind)); + file : constant string := core.lowercase (enumeration'image (index)); begin sprite (index) := core.import_sprite ("./sprite/item/" & folder & "/" & file & ".png", 4, 6); end; diff --git a/source/magic.adb b/source/magic.adb index 0e5c2bf..211af19 100644 --- a/source/magic.adb +++ b/source/magic.adb @@ -20,11 +20,9 @@ package body magic is begin core.echo (core.comment, "Configuring magic components..."); -- - for index in enumeration - loop - declare - folder : constant string := core.lowercase (school'image (trait (index).kind)); - file : constant string := core.lowercase (enumeration'image (index)); + for index in enumeration loop + declare folder : constant string := core.lowercase (school'image (trait (index).kind)); + file : constant string := core.lowercase (enumeration'image (index)); begin view_sprite (index) := core.import_sprite ("./sprite/magic/" & folder & "/" & file & ".png", 1, 1); icon_sprite (index) := core.import_sprite ("./sprite/magic/icon/" & file & ".png", 1, 1); @@ -63,8 +61,7 @@ package body magic is ui.draw_tiny_menu (move_x, move_y, width, height, true); ui.draw_title_bar (move_x, move_y, width, "Magic Abilities"); -- - for index in enumeration - loop + for index in enumeration loop icon (index, move_x + offset + school'pos (trait (index).kind) * 168, move_y + offset + next (school'pos (trait (index).kind)) * core.icon); ui.write (trait (index).name, move_x + offset + school'pos (trait (index).kind) * 168 + core.icon, move_y + offset + next (school'pos (trait (index).kind)) * core.icon); -- diff --git a/source/magic.ads b/source/magic.ads index e2f1ab4..a5dc2e9 100644 --- a/source/magic.ads +++ b/source/magic.ads @@ -43,8 +43,7 @@ package magic is subtype level_limit is natural range 0 .. 6; - type information is - record + type information is record name : core.short_string; kind : school; level : level_limit; diff --git a/source/main.adb b/source/main.adb index 02cf344..673f661 100644 --- a/source/main.adb +++ b/source/main.adb @@ -54,8 +54,7 @@ procedure main is core.overlay; end if; -- - for index in 1 .. menu_limit - loop + for index in 1 .. menu_limit loop case menu_stack (index) is when menu_none => null; when menu_attribute => attribute.menu (100, 100, false); diff --git a/source/might.adb b/source/might.adb index c5fc029..77b313c 100644 --- a/source/might.adb +++ b/source/might.adb @@ -20,11 +20,9 @@ package body might is begin core.echo (core.comment, "Configuring might components..."); -- - for index in enumeration - loop - declare - folder : constant string := core.lowercase (school'image (trait (index).kind)); - file : constant string := core.lowercase (enumeration'image (index)); + for index in enumeration loop + declare folder : constant string := core.lowercase (school'image (trait (index).kind)); + file : constant string := core.lowercase (enumeration'image (index)); begin view_sprite (index) := core.import_sprite ("./sprite/might/" & folder & "/" & file & ".png", 1, 1); icon_sprite (index) := core.import_sprite ("./sprite/might/icon/" & file & ".png", 1, 1); @@ -63,8 +61,7 @@ package body might is ui.draw_tiny_menu (move_x, move_y, width, height, true); ui.draw_title_bar (move_x, move_y, width, "Might Abilities"); -- - for index in enumeration - loop + for index in enumeration loop icon (index, move_x + offset + school'pos (trait (index).kind) * 168, move_y + offset + next (school'pos (trait (index).kind)) * core.icon); ui.write (trait (index).name, move_x + offset + school'pos (trait (index).kind) * 168 + core.icon, move_y + offset + next (school'pos (trait (index).kind)) * core.icon); -- diff --git a/source/might.ads b/source/might.ads index c540043..1146a05 100644 --- a/source/might.ads +++ b/source/might.ads @@ -42,8 +42,7 @@ package might is subtype level_limit is natural range 0 .. 6; - type information is - record + type information is record name : core.short_string; kind : school; level : level_limit; diff --git a/source/resource.adb b/source/resource.adb index 8facc0b..d4ba8b3 100644 --- a/source/resource.adb +++ b/source/resource.adb @@ -16,8 +16,7 @@ package body resource is begin core.echo (core.comment, "Configuring resource components..."); -- - for index in enumeration - loop + for index in enumeration loop sprite (index) := core.import_sprite ("./sprite/resource/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1); end loop; end configure; @@ -34,8 +33,7 @@ package body resource is ui.draw_tiny_menu (move_x, move_y, width, height, true); ui.draw_title_bar (move_x, move_y, width, "Resources"); -- - for index in enumeration - loop + for index in enumeration loop ui.draw_icon (sprite (index), trait (index).text, move_x + offset, move_y + offset + enumeration'pos (index) * core.icon); ui.write (trait (index).name, move_x + offset + core.icon, move_y + offset + enumeration'pos (index) * core.icon); end loop; diff --git a/source/resource.ads b/source/resource.ads index e14046a..d7b7951 100644 --- a/source/resource.ads +++ b/source/resource.ads @@ -14,16 +14,13 @@ package resource is ------------------------------------------------------------------------------------------ - subtype base_limit is natural range 0 .. 144000; - - type information is - record + type information is record name : core.short_string; - base : base_limit; + base : natural; text : core.long_string; end record; - type points is array (enumeration) of base_limit; + type points is array (enumeration) of natural; ------------------------------------------------------------------------------------------ diff --git a/source/skill.adb b/source/skill.adb index af06213..9ea2b89 100644 --- a/source/skill.adb +++ b/source/skill.adb @@ -16,8 +16,7 @@ package body skill is begin core.echo (core.comment, "Configuring skill components..."); -- - for index in enumeration - loop + for index in enumeration loop sprite (index) := core.import_sprite ("./sprite/skill/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1); end loop; end configure; @@ -35,8 +34,7 @@ package body skill is ui.draw_tiny_menu (move_x, move_y, width, height, true); ui.draw_title_bar (move_x, move_y, width, "Skills"); -- - for index in enumeration - loop + for index in enumeration loop ui.draw_icon (sprite (index), trait (index).text, move_x + 216 * (enumeration'pos (index) mod column) + offset, move_y + core.icon * (enumeration'pos (index) / column) + offset); ui.write (trait (index).name, move_x + 216 * (enumeration'pos (index) mod column) + offset + core.icon, move_y + core.icon * (enumeration'pos (index) / column) + offset); end loop; diff --git a/source/skill.ads b/source/skill.ads index c8be987..f56f0bb 100644 --- a/source/skill.ads +++ b/source/skill.ads @@ -15,16 +15,13 @@ package skill is ------------------------------------------------------------------------------------------ - subtype base_limit is natural range 0 .. 36; - - type information is - record + type information is record name : core.short_string; - base : base_limit; + base : natural; text : core.long_string; end record; - type points is array (enumeration) of base_limit; + type points is array (enumeration) of natural; ------------------------------------------------------------------------------------------ diff --git a/source/ui.adb b/source/ui.adb index 1f73b0c..b8f235b 100644 --- a/source/ui.adb +++ b/source/ui.adb @@ -44,8 +44,7 @@ package body ui is procedure draw_horizontally (index : in enumeration; x, y, width : in integer) is base : constant integer := sprite (active, index).width; begin - for move in 0 .. width / base - 1 - loop + for move in 0 .. width / base - 1 loop draw (index, x + move * base, y); end loop; -- @@ -57,8 +56,7 @@ package body ui is procedure draw_vertically (index : in enumeration; x, y, height : in integer) is base : constant integer := sprite (active, index).height; begin - for move in 0 .. height / base - 1 - loop + for move in 0 .. height / base - 1 loop draw (index, x, y + move * base); end loop; -- @@ -73,18 +71,15 @@ package body ui is crop_width : integer := width mod base_width; crop_height : integer := height mod base_height; begin - for move_y in 0 .. height / base_height - 1 - loop - for move_x in 0 .. width / base_width - 1 - loop + for move_y in 0 .. height / base_height - 1 loop + for move_x in 0 .. width / base_width - 1 loop draw (index, x + move_x * base_width, y + move_y * base_height); end loop; -- crop (index, x + width - crop_width, y + move_y * base_height, 0, 0, crop_width, base_height); end loop; -- - for move_x in 0 .. width / base_width - 1 - loop + for move_x in 0 .. width / base_width - 1 loop crop (index, x + move_x * base_width, y + height - crop_height, 0, 0, base_width, crop_height); end loop; -- @@ -98,8 +93,7 @@ package body ui is begin glyphs (index) := core.import_font ("./sprite/ui/" & folder_path & "/font.png", (if index = default then 16 else 24), 0); -- - for this in enumeration - loop + for this in enumeration loop sprite (index, this) := core.import_sprite ("./sprite/ui/" & folder_path & core.lowercase (enumeration'image (this)) & ".png", 1, 1); end loop; end load_ui; @@ -120,7 +114,6 @@ package body ui is core.zoom := 1; core.draw (data, x, y); core.zoom := 2; - -- end draw_icon; ------------------------------------------------------------------------------------------ @@ -220,11 +213,10 @@ package body ui is draw_background (main_background, x + offset, y + offset, width - 2 * offset, height - 2 * offset); end if; -- - declare - upper : constant integer := width - sprite (active, corner_upper_left).width - sprite (active, corner_upper_right).width; - lower : constant integer := width - sprite (active, corner_lower_left).width - sprite (active, corner_lower_right).width; - left : constant integer := height - sprite (active, corner_upper_left).height - sprite (active, corner_lower_left).height; - right : constant integer := height - sprite (active, corner_upper_right).height - sprite (active, corner_lower_right).height; + declare upper : constant integer := width - sprite (active, corner_upper_left).width - sprite (active, corner_upper_right).width; + lower : constant integer := width - sprite (active, corner_lower_left).width - sprite (active, corner_lower_right).width; + left : constant integer := height - sprite (active, corner_upper_left).height - sprite (active, corner_lower_left).height; + right : constant integer := height - sprite (active, corner_upper_right).height - sprite (active, corner_lower_right).height; begin draw_horizontally (border_upper, x + sprite (active, corner_upper_left).width, y, upper); draw_horizontally (border_lower, x + sprite (active, corner_lower_left).width, y + height - sprite (active, border_lower).height, lower); @@ -256,11 +248,10 @@ package body ui is draw_background (main_background, x + offset, y + offset, width - 2 * offset, height - 2 * offset); end if; -- - declare - upper : constant integer := width - sprite (active, tiny_corner_upper_left).width - sprite (active, tiny_corner_upper_right).width; - lower : constant integer := width - sprite (active, tiny_corner_lower_left).width - sprite (active, tiny_corner_lower_right).width; - left : constant integer := height - sprite (active, tiny_corner_upper_left).height - sprite (active, tiny_corner_lower_left).height; - right : constant integer := height - sprite (active, tiny_corner_upper_right).height - sprite (active, tiny_corner_lower_right).height; + declare upper : constant integer := width - sprite (active, tiny_corner_upper_left).width - sprite (active, tiny_corner_upper_right).width; + lower : constant integer := width - sprite (active, tiny_corner_lower_left).width - sprite (active, tiny_corner_lower_right).width; + left : constant integer := height - sprite (active, tiny_corner_upper_left).height - sprite (active, tiny_corner_lower_left).height; + right : constant integer := height - sprite (active, tiny_corner_upper_right).height - sprite (active, tiny_corner_lower_right).height; begin draw_horizontally (tiny_border_upper, x + sprite (active, tiny_corner_upper_left).width, y, upper); draw_horizontally (tiny_border_lower, x + sprite (active, tiny_corner_lower_left).width, y + height - sprite (active, tiny_border_lower).height, lower); diff --git a/source/unit.adb b/source/unit.adb index 4542861..75dbc3e 100644 --- a/source/unit.adb +++ b/source/unit.adb @@ -21,11 +21,9 @@ package body unit is begin core.echo (core.comment, "Configuring unit components..."); -- - for index in enumeration - loop - declare - folder : constant string := core.lowercase (faction.enumeration'image (trait (index).kind)); - file : constant string := core.lowercase (enumeration'image (index)); + for index in enumeration loop + declare folder : constant string := core.lowercase (faction.enumeration'image (trait (index).kind)); + file : constant string := core.lowercase (enumeration'image (index)); begin sprite (index) := core.import_sprite ("./sprite/unit/" & folder & "/" & file & ".png", 4, 6); icon_sprite (index) := core.import_sprite ("./sprite/unit/icon/" & file & ".png", 1, 1); @@ -71,8 +69,7 @@ package body unit is ui.draw_tiny_menu (move_x, move_y, width, height, true); ui.draw_title_bar (move_x, move_y, width, "Units"); -- - for index in enumeration - loop + for index in enumeration loop move := faction.enumeration'pos (trait (index).kind) * 168; -- icon (index, move_x + offset + move, move_y + offset + (enumeration'pos (index) mod 14) * core.icon); @@ -104,8 +101,7 @@ package body unit is --~ui.write (trait (index).attributes (data)'image, move_x + view_width + 12 + offset + core.icon, move_y + offset + move); --~end loop; -- - for animate in animation - loop + for animate in animation loop draw (index, animate, move_x + offset + animation'pos (animate) * (sprite (index).width + 8), move_y + offset + 8 + core.icon * attribute.count); ui.draw_icon_menu (trait (index).text, move_x + offset + animation'pos (animate) * (sprite (index).width + 8), move_y + offset + 8 + core.icon * attribute.count, sprite (index).width, sprite (index).height); end loop; diff --git a/source/unit.ads b/source/unit.ads index 60f3e7d..d133560 100644 --- a/source/unit.ads +++ b/source/unit.ads @@ -18,8 +18,7 @@ package unit is ------------------------------------------------------------------------------------------ - type information is - record + type information is record name : core.short_string; kind : faction.enumeration; attributes : attribute.points;