diff --git a/source/attribute.adb b/source/attribute.adb index 23f7552..c303166 100644 --- a/source/attribute.adb +++ b/source/attribute.adb @@ -9,21 +9,21 @@ package body attribute is ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ procedure configure is - procedure enter (data : in out information; minimum, maximum : in integer; name, text : in string) is + procedure definition (index : in enumeration; minimum, maximum : in integer; name, text : in string) is begin - data.base := (minimum, maximum); - data.name := core.unbound (name); - data.text := core.unbound (text); - end enter; + description (index).base := (minimum, maximum); + description (index).name := core.unbound (name); + description (index).text := core.unbound (text); + end definition; -- structure : ui.structure; begin - enter (trait (offense), 1, 12, "Offense", "Offense attribute determines your damage modifier when attacking."); - enter (trait (defense), 1, 12, "Defense", "D-FENS attribute determines how much damage your reflect and receive."); - enter (trait (wisdom), 1, 12, "Wisdom", "Wisdom attribute determines how much mana your chad has."); - enter (trait (stamina), 1, 12, "Stamina", "Stamina attribute determines how fast you recover from being wounded."); - enter (trait (speed), 1, 12, "Speed", "Speed attribute determines how far you can walk per turn."); - enter (trait (reach), 1, 12, "Reach", "Reach attribute determines your range modifier when shooting or casting."); + definition (offense, 1, 12, "Offense", "Offense attribute determines your damage modifier when attacking."); + definition (defense, 1, 12, "Defense", "D-FENS attribute determines how much damage your reflect and receive."); + definition (wisdom, 1, 12, "Wisdom", "Wisdom attribute determines how much mana your chad has."); + definition (stamina, 1, 12, "Stamina", "Stamina attribute determines how fast you recover from being wounded."); + definition (speed, 1, 12, "Speed", "Speed attribute determines how far you can walk per turn."); + definition (reach, 1, 12, "Reach", "Reach attribute determines your range modifier when shooting or casting."); -- core.echo (core.comment, "Configuring attribute components..."); -- @@ -41,7 +41,7 @@ package body attribute is for index in enumeration loop icon (index) := core.import_sprite (core.folder & "/icon/attribute/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1); -- - ui.add_structure_button (icon (index), trait (index).name, trait (index).text); + ui.add_structure_button (icon (index), description (index).name, description (index).text); end loop; end configure; @@ -51,7 +51,7 @@ package body attribute is move_x : integer := x; begin for index in enumeration loop - ui.draw_icon (icon (index), core.bound (trait (index).text), move_x, y); + ui.draw_icon (icon (index), core.bound (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); -- diff --git a/source/attribute.ads b/source/attribute.ads index b571167..1996c82 100644 --- a/source/attribute.ads +++ b/source/attribute.ads @@ -29,7 +29,7 @@ package attribute is count : constant natural := enumeration'pos (enumeration'last) + 1; - trait : array (enumeration) of information; + description : array (enumeration) of information; icon : array (enumeration) of core.sprite; ------------------------------------------------------------------------------------------ diff --git a/source/chad.adb b/source/chad.adb index de36315..8ebc854 100644 --- a/source/chad.adb +++ b/source/chad.adb @@ -51,7 +51,7 @@ package body chad is begin ui.draw_frame ("--", x, y, 360 + 2 * offset, 96 + 2 * offset); -- - ui.draw_sprite (view (player.index), trait (player.index).name, x + offset, y + offset, 0); + ui.draw_sprite (view (player.index), description (player.index).name, x + offset, y + offset, 0); -- ui.draw_tiny_fill_bar (x + view_width + 2 * offset, y + 1 * core.icon + offset, 360 - view_width - offset, float (player.health.value) / float (player.health.limit), (127, 0, 0, 255)); ui.draw_tiny_fill_bar (x + view_width + 2 * offset, y + 2 * core.icon + offset, 360 - view_width - offset, float (player.mana.value) / float (player.mana.limit), (0, 0, 127, 255)); @@ -81,7 +81,7 @@ package body chad is for index_y in 0 .. 3 loop for index_x in 0 .. 5 loop ui.draw_icon (data => equipment.icon (player.items (6 * index_y + index_x)), - text => equipment.trait (player.items (6 * index_y + index_x)).name, + text => equipment.description (player.items (6 * index_y + index_x)).name, x => x + index_x * core.icon, y => y + 96 + 4 * offset + 2 * core.icon + index_y * core.icon); end loop; diff --git a/source/chad.ads b/source/chad.ads index 2c5afd7..57471dc 100644 --- a/source/chad.ads +++ b/source/chad.ads @@ -49,7 +49,7 @@ package chad is count : constant natural := enumeration'pos (enumeration'last) + 1; - trait : constant array (enumeration) of information := ( + description : constant array (enumeration) of information := ( ada => ("Ada Augusta King ", faction.fairy, attribute.defense, skill.diplomacy, resource.metal), richard => ("Richard Martin Stallman ", faction.dwarf, attribute.offense, skill.leadership, resource.wood), ognjen => ("Ognjen Milan Robovic ", faction.kobold, attribute.stamina, skill.archery, resource.leather), diff --git a/source/construction.adb b/source/construction.adb index 829fc4c..9962fc8 100644 --- a/source/construction.adb +++ b/source/construction.adb @@ -13,10 +13,10 @@ package body construction is core.echo (core.comment, "Configuring construction components..."); -- for index in enumeration loop - declare folder : constant string := core.lowercase (faction.enumeration'image (trait (index).kind)); + declare folder : constant string := core.lowercase (faction.enumeration'image (description (index).kind)); file : constant string := core.lowercase (enumeration'image (index)); begin - sprite (index) := core.import_sprite (core.folder & "/game/construction/" & folder & "/" & file & ".png", trait (index).frames, 1); + sprite (index) := core.import_sprite (core.folder & "/game/construction/" & folder & "/" & file & ".png", description (index).frames, 1); end; end loop; end configure; @@ -36,7 +36,7 @@ package body construction is draw (index, x, y); -- if core.cursor_inside (x, y, sprite (index).width, sprite (index).height) and core.cursor_mode = core.cursor_middle and not ui.prioritize then - core.write_text_box (trait (index).name); + core.write_text_box (description (index).name); end if; end draw_plus; diff --git a/source/construction.ads b/source/construction.ads index ed55b3e..58d456f 100644 --- a/source/construction.ads +++ b/source/construction.ads @@ -26,7 +26,7 @@ package construction is count : constant natural := enumeration'pos (enumeration'last) + 1; - trait : constant array (enumeration) of information := ( + description : constant array (enumeration) of information := ( house => ("Dwarf House ", faction.dwarf, (others => 0), 1, effect.none), cottage => ("Fairy Cottage ", faction.fairy, (others => 0), 1, effect.none), shack => ("Gnoll Shack ", faction.gnoll, (others => 0), 1, effect.none), diff --git a/source/deity.ads b/source/deity.ads index 546dc35..fdfb604 100644 --- a/source/deity.ads +++ b/source/deity.ads @@ -28,7 +28,7 @@ package deity is count : constant natural := enumeration'pos (enumeration'last) + 1; - trait : constant array (enumeration) of information := ( + description : constant array (enumeration) of information := ( AEZORA => ("Aezora ", 0, faction.fairy, attribute.offense, skill.archery, resource.gold), MITENA => ("Mitena ", 0, faction.dwarf, attribute.offense, skill.archery, resource.gold), GUAREA => ("Guarea ", 0, faction.gnoll, attribute.offense, skill.archery, resource.gold), diff --git a/source/effect.adb b/source/effect.adb index 15db34f..a37c3a9 100644 --- a/source/effect.adb +++ b/source/effect.adb @@ -24,21 +24,21 @@ package body effect is when modify_attribute => attribute_index := attribute.enumeration'val (data.modifier); player.attributes (attribute_index) := player.attributes (attribute_index) + data.amount; ui.echo ("Player " & (if data.amount < 0 then "lost" else "gained") & integer'image (abs data.amount) & " " - & core.bound (attribute.trait (attribute_index).name) & " attribute points."); + & core.bound (attribute.description (attribute_index).name) & " attribute points."); -- when modify_skill => skill_index := skill.enumeration'val (data.modifier); player.skills (skill_index) := player.skills (skill_index) + data.amount; ui.echo ("Player " & (if data.amount < 0 then "lost" else "gained") & integer'image (abs data.amount) & " " - & core.bound (skill.trait (skill_index).name) & " skill points."); + & core.bound (skill.description (skill_index).name) & " skill points."); -- when modify_resource => resource_index := resource.enumeration'val (data.modifier); player.resources (resource_index) := player.resources (resource_index) + data.amount; ui.echo ("Player " & (if data.amount < 0 then "lost" else "gained") & integer'image (abs data.amount) & " " - & core.bound (resource.trait (resource_index).name) & " resource points."); + & core.bound (resource.description (resource_index).name) & " resource points."); -- when modify_material => material_index := material.enumeration'val (data.modifier); player.materials (material_index) := player.materials (material_index) + data.amount; - ui.echo ("+" & data.amount'image & " " & core.bound (material.trait (material_index).name)); + ui.echo ("+" & data.amount'image & " " & core.bound (material.description (material_index).name)); end case; end apply; diff --git a/source/equipment.adb b/source/equipment.adb index f34c663..8619229 100644 --- a/source/equipment.adb +++ b/source/equipment.adb @@ -18,7 +18,7 @@ package body equipment is core.echo (core.comment, "Configuring equipment components..."); -- for index in enumeration loop - declare folder : constant string := core.lowercase (slot'image (trait (index).kind)); + declare folder : constant string := core.lowercase (slot'image (description (index).kind)); file : constant string := core.lowercase (enumeration'image (index)); begin sprite (index) := core.import_sprite (core.folder & "/game/equipment/" & folder & "/" & file & ".png", 4, 6); @@ -45,7 +45,7 @@ package body equipment is and core.cursor_mode = core.cursor_middle and index / none and not ui.prioritize then - core.write_text_box (trait (index).name); + core.write_text_box (description (index).name); end if; end draw_plus; diff --git a/source/equipment.ads b/source/equipment.ads index 6de1407..e76c0c6 100644 --- a/source/equipment.ads +++ b/source/equipment.ads @@ -56,7 +56,7 @@ package equipment is count : constant natural := enumeration'pos (enumeration'last) + 1; - trait : constant array (enumeration) of information := ( + description : constant array (enumeration) of information := ( none => ("-- ", full_body, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none), bone_chestplate => ("Bone Chestplate ", chest, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none), bronze_chestplate => ("Bronze Chestplate ", chest, (0, 0, 0, 0, 0, 0), faction.neutral, effect.none), diff --git a/source/faction.ads b/source/faction.ads index 9197386..42002d3 100644 --- a/source/faction.ads +++ b/source/faction.ads @@ -26,7 +26,7 @@ package faction is count : constant natural := enumeration'pos (enumeration'last) + 1; - trait : constant array (enumeration) of information := ( + description : constant array (enumeration) of information := ( fairy => ("Fairy Kingdom ", attribute.speed, skill.mysticism, resource.gold), dwarf => ("Dwarf Kingdom ", attribute.defense, skill.estates, resource.stone), gnoll => ("Gnoll Kingdom ", attribute.stamina, skill.logistics, resource.leather), diff --git a/source/magic.adb b/source/magic.adb index 6b77a16..36aac95 100644 --- a/source/magic.adb +++ b/source/magic.adb @@ -20,7 +20,7 @@ package body magic is core.echo (core.comment, "Configuring magic components..."); -- for index in enumeration loop - declare folder : constant string := core.lowercase (school'image (trait (index).kind)); + declare folder : constant string := core.lowercase (school'image (description (index).kind)); file : constant string := core.lowercase (enumeration'image (index)); begin view (index) := core.import_sprite (core.folder & "/view/magic/" & folder & "/" & file & ".png", 1, 1); @@ -32,7 +32,7 @@ package body magic is procedure draw (index : in enumeration; x, y : in integer) is begin - ui.draw_sprite (view (index), trait (index).text, x, y, 0); + ui.draw_sprite (view (index), description (index).text, x, y, 0); end draw; ------------------------------------------------------------------------------------------ diff --git a/source/magic.ads b/source/magic.ads index 4c1a628..1aa9a12 100644 --- a/source/magic.ads +++ b/source/magic.ads @@ -43,7 +43,7 @@ package magic is count : constant natural := enumeration'pos (enumeration'last) + 1; - trait : constant array (enumeration) of information := ( + description : constant array (enumeration) of information := ( arrow_storm => ("Arrow Storm ", air, 1, effect.none, "Arrow Storm increases the range of your ranged units. "), torment => ("Torment ", dark, 1, effect.none, "Torment causes targeted friend or foe to feel pain and shit. "), stone_armour => ("Stone Armour ", earth, 1, effect.none, "Stone Armour increases defense of selected unit. "), diff --git a/source/main.adb b/source/main.adb index 6c97786..c8dada8 100644 --- a/source/main.adb +++ b/source/main.adb @@ -267,7 +267,7 @@ begin world.load ("heyo"); - ui.active := ui.style'val (faction.enumeration'pos (chad.trait (player.index).kind) + 1); + ui.active := ui.style'val (faction.enumeration'pos (chad.description (player.index).kind) + 1); gameplay_loop: loop core.synchronize; diff --git a/source/material.adb b/source/material.adb index bee452a..c19dc94 100644 --- a/source/material.adb +++ b/source/material.adb @@ -26,7 +26,7 @@ package body material is begin for index in enumeration loop if data (index).value > 0 then - ui.draw_icon (icon (index), core.bound (trait (index).name), move_x, y); + ui.draw_icon (icon (index), core.bound (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 + 4, y + core.icon + 8, (255, 255, 255, 255), 15, true); -- diff --git a/source/material.ads b/source/material.ads index 8f54de9..76d9ea8 100644 --- a/source/material.ads +++ b/source/material.ads @@ -29,7 +29,7 @@ package material is count : constant natural := enumeration'pos (enumeration'last) + 1; - trait : constant array (enumeration) of information := ( + description : constant array (enumeration) of information := ( sulphur => (core.unbound ("Sulphur"), 7), mercury => (core.unbound ("Mercury"), 13), mint => (core.unbound ("Mint"), 3), diff --git a/source/resource.adb b/source/resource.adb index db3500b..0eda8d0 100644 --- a/source/resource.adb +++ b/source/resource.adb @@ -9,21 +9,21 @@ package body resource is ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ procedure configure is - procedure enter (data : in out information; minimum, maximum : in integer; name, text : in string) is + procedure definition (index : in enumeration; minimum, maximum : in integer; name, text : in string) is begin - data.base := (minimum, maximum); - data.name := core.unbound (name); - data.text := core.unbound (text); - end enter; + description (index).base := (minimum, maximum); + description (index).name := core.unbound (name); + description (index).text := core.unbound (text); + end definition; -- structure : ui.structure; begin - enter (trait (gold), 24, 480, "Gold", "Gold is precious yellowish shiny metal, valued since ancient times."); - enter (trait (wood), 12, 240, "Wood", "Wood is just bundle of lignin and cellulose, nothing more."); - enter (trait (stone), 12, 240, "Stone", "Stone is essential building block for most constructions in this world."); - enter (trait (metal), 12, 240, "Metal", "Metal as a resource is mixture of commonly found metalic elements."); - enter (trait (leather), 12, 240, "Leather", "Leather is general purpose resource, used for armours and decorations."); - enter (trait (gem), 12, 240, "Gem", "Gem as a resource is same as metal, just mixture of various gems."); + definition (gold, 24, 480, "Gold", "Gold is precious yellowish shiny metal, valued since ancient times."); + definition (wood, 12, 240, "Wood", "Wood is just bundle of lignin and cellulose, nothing more."); + definition (stone, 12, 240, "Stone", "Stone is essential building block for most constructions in this world."); + definition (metal, 12, 240, "Metal", "Metal as a resource is mixture of commonly found metalic elements."); + definition (leather, 12, 240, "Leather", "Leather is general purpose resource, used for armours and decorations."); + definition (gem, 12, 240, "Gem", "Gem as a resource is same as metal, just mixture of various gems."); -- core.echo (core.comment, "Configuring resource components..."); -- @@ -41,7 +41,7 @@ package body resource is for index in enumeration loop icon (index) := core.import_sprite (core.folder & "/icon/resource/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1); -- - ui.add_structure_button (icon (index), trait (index).name, trait (index).text); + ui.add_structure_button (icon (index), description (index).name, description (index).text); end loop; end configure; @@ -51,8 +51,8 @@ package body resource is frame_width : constant integer := 4 * core.icon; begin for index in enumeration loop - ui.draw_icon (icon (index), core.bound (trait (index).text), x + (core.icon + frame_width) * enumeration'pos (index), y); - ui.draw_frame (core.bound (trait (index).text), x + (core.icon + frame_width) * enumeration'pos (index) + core.icon, y, frame_width, core.icon); + ui.draw_icon (icon (index), core.bound (description (index).text), x + (core.icon + frame_width) * enumeration'pos (index), y); + ui.draw_frame (core.bound (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, diff --git a/source/resource.ads b/source/resource.ads index 0464e87..15bb904 100644 --- a/source/resource.ads +++ b/source/resource.ads @@ -27,7 +27,7 @@ package resource is count : constant natural := enumeration'pos (enumeration'last) + 1; - trait : array (enumeration) of information; + description : array (enumeration) of information; icon : array (enumeration) of core.sprite; ------------------------------------------------------------------------------------------ diff --git a/source/skill.adb b/source/skill.adb index 80c009a..d7cf81f 100644 --- a/source/skill.adb +++ b/source/skill.adb @@ -9,33 +9,33 @@ package body skill is ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ procedure configure is - procedure enter (data : in out information; minimum, maximum : in integer; name, text : in string) is + procedure definition (index : in enumeration; minimum, maximum : in integer; name, text : in string) is begin - data.base := (minimum, maximum); - data.name := core.unbound (name); - data.text := core.unbound (text); - end enter; + description (index).base := (minimum, maximum); + description (index).name := core.unbound (name); + description (index).text := core.unbound (text); + end definition; -- structure : ui.structure; begin - enter (trait (alchemy), 0, 24, "Alchemy", "Alchemy skill determines effectiveness of your vials and potions."); - enter (trait (archery), 0, 24, "Archery", "Archery skill determines effectiveness and range or your archers."); - enter (trait (architecture), 0, 24, "Architecture", "Architecture decreases time spent on building constructions."); - enter (trait (athletics), 0, 24, "Athletics", "Athletics increases movement speed of all your units, since they train."); - enter (trait (diplomacy), 0, 24, "Diplomacy", "Diplomacy helps you to avoid starting a battle you can't win."); - enter (trait (estates), 0, 24, "Estates", "Estates makes you the ultimate crypto-bro, establishing a blockchain."); - enter (trait (exploration), 0, 24, "Exploration", "Exploration is quite self-explanatory."); - enter (trait (leadership), 0, 24, "Leadership", "Leadership is the default skill for any true chad, like God intended."); - enter (trait (logistics), 0, 24, "Logistics", "Logistics is a nightmare in real life, but this is only a game."); - enter (trait (medicine), 0, 24, "Medicine", "Medicine skill makes you swallow pills like a kid in a drugstore."); - enter (trait (mercantile), 0, 24, "Mercantile", "Mercantile is the skill of any true-born nosy person, otherwise useless."); - enter (trait (mysticism), 0, 24, "Mysticism", "Mysticism allows you to have 60 cats, drink wine and talk weird."); - enter (trait (necromancy), 0, 24, "Necromancy", "Necromancy lets you not to waste the bones after every battle."); - enter (trait (resistance), 0, 24, "Resistence", "Resistence skill increases defense points of all your units slightly."); - enter (trait (skirmish), 0, 24, "Skirmish", "Skirmish makes your units go berserk when they have little health left."); - enter (trait (sorcery), 0, 24, "Sorcery", "Sorcery skill is appropriately named useless skill to have in real life."); - enter (trait (tactics), 0, 24, "Tactics", "Tactics is the opposite of skirmish, master it and lose in every battle."); - enter (trait (thaumaturgy), 0, 24, "Thaumaturgy", "Thaumaturgy lets you do nothing, and hope that the best will happen."); + definition (alchemy, 0, 24, "Alchemy", "Alchemy skill determines effectiveness of your vials and potions."); + definition (archery, 0, 24, "Archery", "Archery skill determines effectiveness and range or your archers."); + definition (architecture, 0, 24, "Architecture", "Architecture decreases time spent on building constructions."); + definition (athletics, 0, 24, "Athletics", "Athletics increases movement speed of all your units, since they train."); + definition (diplomacy, 0, 24, "Diplomacy", "Diplomacy helps you to avoid starting a battle you can't win."); + definition (estates, 0, 24, "Estates", "Estates makes you the ultimate crypto-bro, establishing a blockchain."); + definition (exploration, 0, 24, "Exploration", "Exploration is quite self-explanatory by its' name, seriously."); + definition (leadership, 0, 24, "Leadership", "Leadership is the default skill for any true chad, like God intended."); + definition (logistics, 0, 24, "Logistics", "Logistics is a nightmare in real life, but this is only a game."); + definition (medicine, 0, 24, "Medicine", "Medicine skill makes you swallow pills like a kid in a drugstore."); + definition (mercantile, 0, 24, "Mercantile", "Mercantile is the skill of any true-born nosy person, otherwise useless."); + definition (mysticism, 0, 24, "Mysticism", "Mysticism allows you to have 60 cats, drink wine and talk weird."); + definition (necromancy, 0, 24, "Necromancy", "Necromancy lets you not to waste the bones after every battle."); + definition (resistance, 0, 24, "Resistence", "Resistence skill increases defense points of all your units slightly."); + definition (skirmish, 0, 24, "Skirmish", "Skirmish makes your units go berserk when they have little health left."); + definition (sorcery, 0, 24, "Sorcery", "Sorcery skill is appropriately named useless skill to have in real life."); + definition (tactics, 0, 24, "Tactics", "Tactics is the opposite of skirmish, master it and lose in every battle."); + definition (thaumaturgy, 0, 24, "Thaumaturgy", "Thaumaturgy lets you do nothing, and hope that the best will happen."); -- core.echo (core.comment, "Configuring skill components..."); -- @@ -57,7 +57,7 @@ package body skill is ui.add_structure_orient; end if; -- - ui.add_structure_button (icon (index), trait (index).name, trait (index).text); + ui.add_structure_button (icon (index), description (index).name, description (index).text); end loop; end configure; @@ -75,11 +75,11 @@ package body skill is move_y := y; end if; -- - ui.draw_icon (icon (index), core.bound (trait (index).text), move_x, move_y); + ui.draw_icon (icon (index), core.bound (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 + 4, move_y + 8, (255, 255, 255, 255), 15, true); -- - ui.write (core.bound (trait (index).name), move_x + 2 * core.icon + 4, move_y + 8, (255, 255, 255, 255), 15, true); + ui.write (core.bound (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; diff --git a/source/skill.ads b/source/skill.ads index 6388c70..db698b9 100644 --- a/source/skill.ads +++ b/source/skill.ads @@ -31,7 +31,7 @@ package skill is count : constant natural := enumeration'pos (enumeration'last) + 1; - trait : array (enumeration) of information; + description : array (enumeration) of information; icon : array (enumeration) of core.sprite; ------------------------------------------------------------------------------------------ diff --git a/source/unit.adb b/source/unit.adb index 85dbb06..b6693a0 100644 --- a/source/unit.adb +++ b/source/unit.adb @@ -30,10 +30,10 @@ package body unit is procedure draw (index : in enumeration; state : in core.animation; x, y : in integer) is begin - core.draw (base (trait (index).kind), x, y, state => state); + core.draw (base (description (index).kind), x, y, state => state); -- for slot in equipment.slot loop - equipment.draw (trait (index).equipments (slot), state, x, y); + equipment.draw (description (index).equipments (slot), state, x, y); end loop; end draw; @@ -41,7 +41,7 @@ package body unit is --~procedure draw_icon (index : in enumeration; x, y : in integer) is --~begin - --~ui.draw_overicon (icon (index), trait (index).text, x, y); + --~ui.draw_overicon (icon (index), description (index).text, x, y); --~end draw_icon; ------------------------------------------------------------------------------------------ diff --git a/source/unit.ads b/source/unit.ads index 91d8ffa..0b4d496 100644 --- a/source/unit.ads +++ b/source/unit.ads @@ -53,7 +53,7 @@ package unit is count : constant natural := enumeration'pos (enumeration'last) + 1; - trait : constant array (enumeration) of information := ( + description : constant array (enumeration) of information := ( dwarf_berserker => ("Dwarf Berserker ", faction.dwarf, (3, 2, 1, 3, 2, 2), 1, ( equipment.blue_tunic, equipment.leather_helmet, equipment.leather_chestplate, equipment.none, equipment.leather_greaves, equipment.none, equipment.iron_axe, equipment.none)), diff --git a/source/world.adb b/source/world.adb index d352a58..dae81f1 100644 --- a/source/world.adb +++ b/source/world.adb @@ -151,7 +151,7 @@ package body world is height => landmarks (landmark_index'val (map.landmarks (index).index)).height) and core.cursor_mode = core.cursor_middle and not ui.prioritize then - core.write_text_box (landmark_trait (landmark_index'val (map.landmarks (index).index)).name); + core.write_text_box (landmark_description (landmark_index'val (map.landmarks (index).index)).name); end if; end if; end loop; @@ -184,7 +184,7 @@ package body world is height => locations (location_index'val (map.locations (index).index)).height) and core.cursor_mode = core.cursor_middle and not ui.prioritize then - core.write_text_box (location_trait (location_index'val (map.locations (index).index)).name); + core.write_text_box (location_description (location_index'val (map.locations (index).index)).name); end if; end if; -- @@ -199,7 +199,7 @@ package body world is and map.locations (index).state = 0 and core.signal_code'pos (core.signal_mode) = core.signal_code'pos (core.signal_e) and not ui.prioritize then - effect.apply (location_trait (location_index'val (map.locations (index).index)).evoke); + effect.apply (location_description (location_index'val (map.locations (index).index)).evoke); -- map.locations (index).state := 1; end if; @@ -372,14 +372,14 @@ package body world is -- for index in landmark_index loop landmarks (index) := core.import_sprite (file_path => core.folder & "/game/world/landmark/" & core.lowercase (index'image) & ".png", - frames => landmark_trait (index).frames, + frames => landmark_description (index).frames, states => 1); end loop; -- for index in location_index loop locations (index) := core.import_sprite (file_path => core.folder & "/game/world/location/" & core.lowercase (index'image) & ".png", - frames => location_trait (index).frames, - states => location_trait (index).states); + frames => location_description (index).frames, + states => location_description (index).states); end loop; end configure; @@ -445,7 +445,7 @@ package body world is goto repeat_landmark_generation; end if; -- - if landmark_trait (landmark_index'val (map.landmarks (index).index)).clip then + if landmark_description (landmark_index'val (map.landmarks (index).index)).clip then declare reach_x : constant natural := landmarks (landmark_index'val (map.landmarks (index).index)).width / core.base; reach_y : constant natural := landmarks (landmark_index'val (map.landmarks (index).index)).height / core.base; begin @@ -469,7 +469,7 @@ package body world is goto repeat_location_generation; end if; -- - if location_trait (location_index'val (map.locations (index).index)).clip then + if location_description (location_index'val (map.locations (index).index)).clip then declare reach_x : constant natural := locations (location_index'val (map.locations (index).index)).width / core.base; reach_y : constant natural := locations (location_index'val (map.locations (index).index)).height / core.base; begin @@ -536,7 +536,7 @@ package body world is ------------------------------------------------------------------------------------------ procedure save (file_name : in string) is - procedure save_entity (here : in core.io.file_type; data : in entity_trait) is + procedure save_entity (here : in core.io.file_type; data : in entity_description) is begin core.io.write (here, data.index); core.io.write (here, data.state); @@ -580,7 +580,7 @@ package body world is ------------------------------------------------------------------------------------------ procedure load (file_name : in string) is - procedure load_entity (here : in core.io.file_type; data : out entity_trait) is + procedure load_entity (here : in core.io.file_type; data : out entity_description) is begin core.io.read (here, data.index); core.io.read (here, data.state); diff --git a/source/world.ads b/source/world.ads index f0d950f..f993a76 100644 --- a/source/world.ads +++ b/source/world.ads @@ -43,7 +43,7 @@ package world is evoke : effect.value; end record; - type entity_trait is record + type entity_description is record index : natural; state : natural; x, y : integer; @@ -51,7 +51,7 @@ package world is type integer_matrix is array (natural range <>, natural range <>) of integer; type boolean_matrix is array (natural range <>, natural range <>) of boolean; - type entity_array is array (natural range <>) of entity_trait; + type entity_array is array (natural range <>) of entity_description; type information is record kind : biome; @@ -80,7 +80,7 @@ package world is landmark_count : constant natural := landmark_index'pos (landmark_index'last) + 1; location_count : constant natural := location_index'pos (location_index'last) + 1; - landmark_trait : constant array (landmark_index) of landmark_stats := ( + landmark_description : constant array (landmark_index) of landmark_stats := ( dead_tree => ("Dead Tree ", ash, true, 1), mossy_rock => ("Mossy Rock ", swamp, true, 1), palm_tree => ("Palm Tree ", sand, true, 4), @@ -110,7 +110,7 @@ package world is oak_tree => ("Oak Tree ", grass, true, 4) ); - location_trait : constant array (location_index) of location_stats := ( + location_description : constant array (location_index) of location_stats := ( well_of_agility => ("Well of Agility ", true, 4, 3, (effect.modify_attribute, attribute.enumeration'pos (attribute.speed), 2, false, 0)), well_of_knowledge => ("Well of Knowledge ", true, 4, 3, (effect.modify_attribute, attribute.enumeration'pos (attribute.wisdom), 2, false, 0)), well_of_strength => ("Well of Strength ", true, 4, 3, (effect.modify_attribute, attribute.enumeration'pos (attribute.offense), 2, false, 0)),