From cf89b8b3fec3b48346f084fb3a00f1b3dd9d02f3 Mon Sep 17 00:00:00 2001 From: xolatile Date: Wed, 5 Jun 2024 01:24:45 -0400 Subject: [PATCH] Temporary refactoring of Equipment package... --- source/equipment.ads | 282 +++++++++++++++++++++++++-------------------------- source/ui.adb | 7 +- source/ui.ads | 4 +- 3 files changed, 146 insertions(+), 147 deletions(-) diff --git a/source/equipment.ads b/source/equipment.ads index 232c16f..63187f4 100644 --- a/source/equipment.ads +++ b/source/equipment.ads @@ -43,11 +43,11 @@ package equipment is ------------------------------------------------------------------------------------------ type definition is record - name : access string; - kind : slot; - attributes : attribute.bonus; - favor : faction.enumeration; - evoke : effect.information; + name : access string := new string' ("--"); + kind : slot := full_body; + attributes : attribute.bonus := (others => 0); + favor : faction.enumeration := faction.neutral; + evoke : effect.information := effect.none; end record; type equip_array is array (slot) of enumeration; @@ -57,142 +57,142 @@ package equipment is count : constant natural := enumeration'pos (enumeration'last) + 1; description : constant array (enumeration) of definition := ( - none => (new string' ("--"), full_body, (others => 0), faction.neutral, effect.none), - bone_chestplate => (new string' ("Bone Chestplate"), chest, (others => 0), faction.neutral, effect.none), - bronze_chestplate => (new string' ("Bronze Chestplate"), chest, (others => 0), faction.neutral, effect.none), - chainmail_chestplate => (new string' ("Chainmail Chestplate"), chest, (others => 0), faction.neutral, effect.none), - crystal_chestplate => (new string' ("Crystal Chestplate"), chest, (others => 0), faction.neutral, effect.none), - golden_chestplate => (new string' ("Golden Chestplate"), chest, (others => 0), faction.neutral, effect.none), - iron_chestplate => (new string' ("Iron Chestplate"), chest, (others => 0), faction.neutral, effect.none), - leather_chestplate => (new string' ("Leather Chestplate"), chest, (others => 0), faction.neutral, effect.none), - mithril_chestplate => (new string' ("Mithril Chestplate"), chest, (others => 0), faction.neutral, effect.none), - steel_chestplate => (new string' ("Steel Chestplate"), chest, (others => 0), faction.neutral, effect.none), - bone_greaves => (new string' ("Bone Greaves"), feet, (others => 0), faction.neutral, effect.none), - bronze_greaves => (new string' ("Bronze Greaves"), feet, (others => 0), faction.neutral, effect.none), - chainmail_greaves => (new string' ("Chainmail Greaves"), feet, (others => 0), faction.neutral, effect.none), - crystal_greaves => (new string' ("Crystal Greaves"), feet, (others => 0), faction.neutral, effect.none), - golden_greaves => (new string' ("Golden Greaves"), feet, (others => 0), faction.neutral, effect.none), - iron_greaves => (new string' ("Iron Greaves"), feet, (others => 0), faction.neutral, effect.none), - leather_greaves => (new string' ("Leather Greaves"), feet, (others => 0), faction.neutral, effect.none), - mithril_greaves => (new string' ("Mithril Greaves"), feet, (others => 0), faction.neutral, effect.none), - steel_greaves => (new string' ("Steel Greaves"), feet, (others => 0), faction.neutral, effect.none), - black_tunic => (new string' ("Black Tunic"), full_body, (others => 0), faction.neutral, effect.none), - blue_tunic => (new string' ("Blue Tunic"), full_body, (others => 0), faction.neutral, effect.none), - cyan_tunic => (new string' ("Cyan Tunic"), full_body, (others => 0), faction.neutral, effect.none), - green_tunic => (new string' ("Green Tunic"), full_body, (others => 0), faction.neutral, effect.none), - grey_tunic => (new string' ("Grey Tunic"), full_body, (others => 0), faction.neutral, effect.none), - lime_tunic => (new string' ("Lime Tunic"), full_body, (others => 0), faction.neutral, effect.none), - orange_tunic => (new string' ("Orange Tunic"), full_body, (others => 0), faction.neutral, effect.none), - pink_tunic => (new string' ("Pink Tunic"), full_body, (others => 0), faction.neutral, effect.none), - purple_tunic => (new string' ("Purple Tunic"), full_body, (others => 0), faction.neutral, effect.none), - red_tunic => (new string' ("Red Tunic"), full_body, (others => 0), faction.neutral, effect.none), - white_tunic => (new string' ("White Tunic"), full_body, (others => 0), faction.neutral, effect.none), - yellow_tunic => (new string' ("Yellow Tunic"), full_body, (others => 0), faction.neutral, effect.none), - bone_gauntlets => (new string' ("Bone Gauntlets"), hands, (others => 0), faction.neutral, effect.none), - bronze_gauntlets => (new string' ("Bronze Gauntlets"), hands, (others => 0), faction.neutral, effect.none), - chainmail_gauntlets => (new string' ("Chainmail Gauntlets"), hands, (others => 0), faction.neutral, effect.none), - crystal_gauntlets => (new string' ("Crystal Gauntlets"), hands, (others => 0), faction.neutral, effect.none), - golden_gauntlets => (new string' ("Golden Gauntlets"), hands, (others => 0), faction.neutral, effect.none), - iron_gauntlets => (new string' ("Iron Gauntlets"), hands, (others => 0), faction.neutral, effect.none), - leather_gauntlets => (new string' ("Leather Gauntlets"), hands, (others => 0), faction.neutral, effect.none), - mithril_gauntlets => (new string' ("Mithril Gauntlets"), hands, (others => 0), faction.neutral, effect.none), - steel_gauntlets => (new string' ("Steel Gauntlets"), hands, (others => 0), faction.neutral, effect.none), - bone_helmet => (new string' ("Bone Helmet"), head, (others => 0), faction.neutral, effect.none), - bronze_helmet => (new string' ("Bronze Helmet"), head, (others => 0), faction.neutral, effect.none), - chainmail_helmet => (new string' ("Chainmail Helmet"), head, (others => 0), faction.neutral, effect.none), - crystal_helmet => (new string' ("Crystal Helmet"), head, (others => 0), faction.neutral, effect.none), - golden_helmet => (new string' ("Golden Helmet"), head, (others => 0), faction.neutral, effect.none), - iron_helmet => (new string' ("Iron Helmet"), head, (others => 0), faction.neutral, effect.none), - leather_helmet => (new string' ("Leather Helmet"), head, (others => 0), faction.neutral, effect.none), - mithril_helmet => (new string' ("Mithril Helmet"), head, (others => 0), faction.neutral, effect.none), - steel_helmet => (new string' ("Steel Helmet"), head, (others => 0), faction.neutral, effect.none), - bone_axe => (new string' ("Bone Axe"), main_hand, (others => 0), faction.neutral, effect.none), - bone_battleaxe => (new string' ("Bone Battleaxe"), main_hand, (others => 0), faction.neutral, effect.none), - bone_bow => (new string' ("Bone Bow"), main_hand, (others => 0), faction.neutral, effect.none), - bone_mace => (new string' ("Bone Mace"), main_hand, (others => 0), faction.neutral, effect.none), - bone_spear => (new string' ("Bone Spear"), main_hand, (others => 0), faction.neutral, effect.none), - bone_sword => (new string' ("Bone Sword"), main_hand, (others => 0), faction.neutral, effect.none), - bronze_axe => (new string' ("Bronze Axe"), main_hand, (others => 0), faction.neutral, effect.none), - bronze_greatsword => (new string' ("Bronze Greatsword"), main_hand, (others => 0), faction.neutral, effect.none), - bronze_mace => (new string' ("Bronze Mace"), main_hand, (others => 0), faction.neutral, effect.none), - bronze_spear => (new string' ("Bronze Spear"), main_hand, (others => 0), faction.neutral, effect.none), - bronze_sword => (new string' ("Bronze Sword"), main_hand, (others => 0), faction.neutral, effect.none), - club => (new string' ("Club"), main_hand, (others => 0), faction.neutral, effect.none), - crystal_bow => (new string' ("Crystal Bow"), main_hand, (others => 0), faction.neutral, effect.none), - crystal_greatsword => (new string' ("Crystal Greatsword"), main_hand, (others => 0), faction.neutral, effect.none), - crystal_mace => (new string' ("Crystal Mace"), main_hand, (others => 0), faction.neutral, effect.none), - crystal_spear => (new string' ("Crystal Spear"), main_hand, (others => 0), faction.neutral, effect.none), - crystal_sword => (new string' ("Crystal Sword"), main_hand, (others => 0), faction.neutral, effect.none), - golden_axe => (new string' ("Golden Axe"), main_hand, (others => 0), faction.neutral, effect.none), - golden_battleaxe => (new string' ("Golden Battleaxe"), main_hand, (others => 0), faction.neutral, effect.none), - golden_bow => (new string' ("Golden Bow"), main_hand, (others => 0), faction.neutral, effect.none), - golden_greatsword => (new string' ("Golden Greatsword"), main_hand, (others => 0), faction.neutral, effect.none), - golden_sword => (new string' ("Golden Sword"), main_hand, (others => 0), faction.neutral, effect.none), - iron_axe => (new string' ("Iron Axe"), main_hand, (others => 0), faction.neutral, effect.none), - iron_bow => (new string' ("Iron Bow"), main_hand, (others => 0), faction.neutral, effect.none), - iron_mace => (new string' ("Iron Mace"), main_hand, (others => 0), faction.neutral, effect.none), - iron_spear => (new string' ("Iron Spear"), main_hand, (others => 0), faction.neutral, effect.none), - iron_sword => (new string' ("Iron Sword"), main_hand, (others => 0), faction.neutral, effect.none), - jade_axe => (new string' ("Jade Axe"), main_hand, (others => 0), faction.neutral, effect.none), - jade_battleaxe => (new string' ("Jade Battleaxe"), main_hand, (others => 0), faction.neutral, effect.none), - jade_greatsword => (new string' ("Jade Greatsword"), main_hand, (others => 0), faction.neutral, effect.none), - jade_mace => (new string' ("Jade Mace"), main_hand, (others => 0), faction.neutral, effect.none), - jade_spear => (new string' ("Jade Spear"), main_hand, (others => 0), faction.neutral, effect.none), - jade_sword => (new string' ("Jade Sword"), main_hand, (others => 0), faction.neutral, effect.none), - maul => (new string' ("Maul"), main_hand, (others => 0), faction.neutral, effect.none), - mithril_axe => (new string' ("Mithril Axe"), main_hand, (others => 0), faction.neutral, effect.none), - mithril_battleaxe => (new string' ("Mithril Battleaxe"), main_hand, (others => 0), faction.neutral, effect.none), - mithril_bow => (new string' ("Mithril Bow"), main_hand, (others => 0), faction.neutral, effect.none), - mithril_mace => (new string' ("Mithril Mace"), main_hand, (others => 0), faction.neutral, effect.none), - mithril_spear => (new string' ("Mithril Spear"), main_hand, (others => 0), faction.neutral, effect.none), - sledge_hammer => (new string' ("Sledge Hammer"), main_hand, (others => 0), faction.neutral, effect.none), - spiked_club => (new string' ("Spiked Club"), main_hand, (others => 0), faction.neutral, effect.none), - spiked_staff => (new string' ("Spiked Staff"), main_hand, (others => 0), faction.neutral, effect.none), - staff => (new string' ("Staff"), main_hand, (others => 0), faction.neutral, effect.none), - steel_battleaxe => (new string' ("Steel Battleaxe"), main_hand, (others => 0), faction.neutral, effect.none), - steel_bow => (new string' ("Steel Bow"), main_hand, (others => 0), faction.neutral, effect.none), - steel_greatsword => (new string' ("Steel Greatsword"), main_hand, (others => 0), faction.neutral, effect.none), - steel_mace => (new string' ("Steel Mace"), main_hand, (others => 0), faction.neutral, effect.none), - steel_sword => (new string' ("Steel Sword"), main_hand, (others => 0), faction.neutral, effect.none), - wooden_bow => (new string' ("Wooden Bow"), main_hand, (others => 0), faction.neutral, effect.none), - wooden_greatsword => (new string' ("Wooden Greatsword"), main_hand, (others => 0), faction.neutral, effect.none), - wooden_sword => (new string' ("Wooden Sword"), main_hand, (others => 0), faction.neutral, effect.none), - golden_necklace => (new string' ("Golden Necklace"), neck, (others => 0), faction.neutral, effect.none), - bronze_shield => (new string' ("Bronze Shield"), off_hand, (others => 0), faction.neutral, effect.none), - crystal_shield => (new string' ("Crystal Shield"), off_hand, (others => 0), faction.neutral, effect.none), - golden_shield => (new string' ("Golden Shield"), off_hand, (others => 0), faction.neutral, effect.none), - iron_shield => (new string' ("Iron Shield"), off_hand, (others => 0), faction.neutral, effect.none), - mithril_shield => (new string' ("Mithril Shield"), off_hand, (others => 0), faction.neutral, effect.none), - steel_shield => (new string' ("Steel Shield"), off_hand, (others => 0), faction.neutral, effect.none), - wooden_shield => (new string' ("Wooden Shield"), off_hand, (others => 0), faction.neutral, effect.none), - wooden_armour => (new string' ("Wooden Armour"), chest, (others => 0), faction.neutral, effect.none), - fur_armour => (new string' ("Fur Armour"), chest, (others => 0), faction.neutral, effect.none), - fur_greaves => (new string' ("Fur Greaves"), feet, (others => 0), faction.neutral, effect.none), - fur_gauntlets => (new string' ("Fur Gauntlets"), hands, (others => 0), faction.neutral, effect.none), - red_hood => (new string' ("Red Hood"), head, (others => 0), faction.neutral, effect.none), - white_hood => (new string' ("White Hood"), head, (others => 0), faction.neutral, effect.none), - wooden_helmet => (new string' ("Wooden Helmet"), head, (others => 0), faction.neutral, effect.none), - human_helmet => (new string' ("Human Helmet"), head, (others => 0), faction.neutral, effect.none), - human_armour => (new string' ("Human Armour"), chest, (others => 0), faction.neutral, effect.none), - elven_helmet => (new string' ("Elven Helmet"), head, (others => 0), faction.neutral, effect.none), - elven_armour => (new string' ("Elven Armour"), chest, (others => 0), faction.neutral, effect.none), - orcish_helmet => (new string' ("Orcish Helmet"), head, (others => 0), faction.neutral, effect.none), - orcish_armour => (new string' ("Orcish Armour"), chest, (others => 0), faction.neutral, effect.none), - black_robe => (new string' ("Black Robe"), full_body, (others => 0), faction.neutral, effect.none), - cyan_robe => (new string' ("Cyan Robe"), full_body, (others => 0), faction.neutral, effect.none), - lime_dress => (new string' ("Lime Dress"), full_body, (others => 0), faction.neutral, effect.none), - magenta_dress => (new string' ("Magenta Dress"), full_body, (others => 0), faction.neutral, effect.none), - orange_robe => (new string' ("Orange Robe"), full_body, (others => 0), faction.neutral, effect.none), - pink_dress => (new string' ("Pink Dress"), full_body, (others => 0), faction.neutral, effect.none), - red_robe => (new string' ("Red Robe"), full_body, (others => 0), faction.neutral, effect.none), - sexy_dress => (new string' ("Sexy Dress"), full_body, (others => 0), faction.neutral, effect.none), - white_robe => (new string' ("White Robe"), full_body, (others => 0), faction.neutral, effect.none), - lime_robe => (new string' ("Lime Robe"), full_body, (others => 0), faction.neutral, effect.none), - orange_hood => (new string' ("Orange Hood"), head, (others => 0), faction.neutral, effect.none), - fur_helmet => (new string' ("Fur Helmet"), head, (others => 0), faction.neutral, effect.none), - black_hood => (new string' ("Black Hood"), head, (others => 0), faction.neutral, effect.none), - cyan_hood => (new string' ("Cyan Hood"), head, (others => 0), faction.neutral, effect.none), - lime_hood => (new string' ("Lime Hood"), head, (others => 0), faction.neutral, effect.none) + none => (new string' ("--"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + bone_chestplate => (new string' ("Bone Chestplate"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + bronze_chestplate => (new string' ("Bronze Chestplate"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + chainmail_chestplate => (new string' ("Chainmail Chestplate"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + crystal_chestplate => (new string' ("Crystal Chestplate"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + golden_chestplate => (new string' ("Golden Chestplate"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + iron_chestplate => (new string' ("Iron Chestplate"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + leather_chestplate => (new string' ("Leather Chestplate"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + mithril_chestplate => (new string' ("Mithril Chestplate"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + steel_chestplate => (new string' ("Steel Chestplate"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + bone_greaves => (new string' ("Bone Greaves"), feet, others => <>), --(others => 0), faction.neutral, effect.none), + bronze_greaves => (new string' ("Bronze Greaves"), feet, others => <>), --(others => 0), faction.neutral, effect.none), + chainmail_greaves => (new string' ("Chainmail Greaves"), feet, others => <>), --(others => 0), faction.neutral, effect.none), + crystal_greaves => (new string' ("Crystal Greaves"), feet, others => <>), --(others => 0), faction.neutral, effect.none), + golden_greaves => (new string' ("Golden Greaves"), feet, others => <>), --(others => 0), faction.neutral, effect.none), + iron_greaves => (new string' ("Iron Greaves"), feet, others => <>), --(others => 0), faction.neutral, effect.none), + leather_greaves => (new string' ("Leather Greaves"), feet, others => <>), --(others => 0), faction.neutral, effect.none), + mithril_greaves => (new string' ("Mithril Greaves"), feet, others => <>), --(others => 0), faction.neutral, effect.none), + steel_greaves => (new string' ("Steel Greaves"), feet, others => <>), --(others => 0), faction.neutral, effect.none), + black_tunic => (new string' ("Black Tunic"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + blue_tunic => (new string' ("Blue Tunic"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + cyan_tunic => (new string' ("Cyan Tunic"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + green_tunic => (new string' ("Green Tunic"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + grey_tunic => (new string' ("Grey Tunic"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + lime_tunic => (new string' ("Lime Tunic"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + orange_tunic => (new string' ("Orange Tunic"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + pink_tunic => (new string' ("Pink Tunic"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + purple_tunic => (new string' ("Purple Tunic"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + red_tunic => (new string' ("Red Tunic"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + white_tunic => (new string' ("White Tunic"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + yellow_tunic => (new string' ("Yellow Tunic"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + bone_gauntlets => (new string' ("Bone Gauntlets"), hands, others => <>), --(others => 0), faction.neutral, effect.none), + bronze_gauntlets => (new string' ("Bronze Gauntlets"), hands, others => <>), --(others => 0), faction.neutral, effect.none), + chainmail_gauntlets => (new string' ("Chainmail Gauntlets"), hands, others => <>), --(others => 0), faction.neutral, effect.none), + crystal_gauntlets => (new string' ("Crystal Gauntlets"), hands, others => <>), --(others => 0), faction.neutral, effect.none), + golden_gauntlets => (new string' ("Golden Gauntlets"), hands, others => <>), --(others => 0), faction.neutral, effect.none), + iron_gauntlets => (new string' ("Iron Gauntlets"), hands, others => <>), --(others => 0), faction.neutral, effect.none), + leather_gauntlets => (new string' ("Leather Gauntlets"), hands, others => <>), --(others => 0), faction.neutral, effect.none), + mithril_gauntlets => (new string' ("Mithril Gauntlets"), hands, others => <>), --(others => 0), faction.neutral, effect.none), + steel_gauntlets => (new string' ("Steel Gauntlets"), hands, others => <>), --(others => 0), faction.neutral, effect.none), + bone_helmet => (new string' ("Bone Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + bronze_helmet => (new string' ("Bronze Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + chainmail_helmet => (new string' ("Chainmail Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + crystal_helmet => (new string' ("Crystal Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + golden_helmet => (new string' ("Golden Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + iron_helmet => (new string' ("Iron Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + leather_helmet => (new string' ("Leather Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + mithril_helmet => (new string' ("Mithril Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + steel_helmet => (new string' ("Steel Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + bone_axe => (new string' ("Bone Axe"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + bone_battleaxe => (new string' ("Bone Battleaxe"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + bone_bow => (new string' ("Bone Bow"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + bone_mace => (new string' ("Bone Mace"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + bone_spear => (new string' ("Bone Spear"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + bone_sword => (new string' ("Bone Sword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + bronze_axe => (new string' ("Bronze Axe"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + bronze_greatsword => (new string' ("Bronze Greatsword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + bronze_mace => (new string' ("Bronze Mace"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + bronze_spear => (new string' ("Bronze Spear"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + bronze_sword => (new string' ("Bronze Sword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + club => (new string' ("Club"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + crystal_bow => (new string' ("Crystal Bow"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + crystal_greatsword => (new string' ("Crystal Greatsword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + crystal_mace => (new string' ("Crystal Mace"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + crystal_spear => (new string' ("Crystal Spear"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + crystal_sword => (new string' ("Crystal Sword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + golden_axe => (new string' ("Golden Axe"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + golden_battleaxe => (new string' ("Golden Battleaxe"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + golden_bow => (new string' ("Golden Bow"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + golden_greatsword => (new string' ("Golden Greatsword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + golden_sword => (new string' ("Golden Sword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + iron_axe => (new string' ("Iron Axe"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + iron_bow => (new string' ("Iron Bow"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + iron_mace => (new string' ("Iron Mace"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + iron_spear => (new string' ("Iron Spear"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + iron_sword => (new string' ("Iron Sword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + jade_axe => (new string' ("Jade Axe"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + jade_battleaxe => (new string' ("Jade Battleaxe"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + jade_greatsword => (new string' ("Jade Greatsword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + jade_mace => (new string' ("Jade Mace"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + jade_spear => (new string' ("Jade Spear"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + jade_sword => (new string' ("Jade Sword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + maul => (new string' ("Maul"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + mithril_axe => (new string' ("Mithril Axe"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + mithril_battleaxe => (new string' ("Mithril Battleaxe"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + mithril_bow => (new string' ("Mithril Bow"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + mithril_mace => (new string' ("Mithril Mace"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + mithril_spear => (new string' ("Mithril Spear"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + sledge_hammer => (new string' ("Sledge Hammer"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + spiked_club => (new string' ("Spiked Club"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + spiked_staff => (new string' ("Spiked Staff"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + staff => (new string' ("Staff"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + steel_battleaxe => (new string' ("Steel Battleaxe"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + steel_bow => (new string' ("Steel Bow"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + steel_greatsword => (new string' ("Steel Greatsword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + steel_mace => (new string' ("Steel Mace"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + steel_sword => (new string' ("Steel Sword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + wooden_bow => (new string' ("Wooden Bow"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + wooden_greatsword => (new string' ("Wooden Greatsword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + wooden_sword => (new string' ("Wooden Sword"), main_hand, others => <>), --(others => 0), faction.neutral, effect.none), + golden_necklace => (new string' ("Golden Necklace"), neck, others => <>), --(others => 0), faction.neutral, effect.none), + bronze_shield => (new string' ("Bronze Shield"), off_hand, others => <>), --(others => 0), faction.neutral, effect.none), + crystal_shield => (new string' ("Crystal Shield"), off_hand, others => <>), --(others => 0), faction.neutral, effect.none), + golden_shield => (new string' ("Golden Shield"), off_hand, others => <>), --(others => 0), faction.neutral, effect.none), + iron_shield => (new string' ("Iron Shield"), off_hand, others => <>), --(others => 0), faction.neutral, effect.none), + mithril_shield => (new string' ("Mithril Shield"), off_hand, others => <>), --(others => 0), faction.neutral, effect.none), + steel_shield => (new string' ("Steel Shield"), off_hand, others => <>), --(others => 0), faction.neutral, effect.none), + wooden_shield => (new string' ("Wooden Shield"), off_hand, others => <>), --(others => 0), faction.neutral, effect.none), + wooden_armour => (new string' ("Wooden Armour"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + fur_armour => (new string' ("Fur Armour"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + fur_greaves => (new string' ("Fur Greaves"), feet, others => <>), --(others => 0), faction.neutral, effect.none), + fur_gauntlets => (new string' ("Fur Gauntlets"), hands, others => <>), --(others => 0), faction.neutral, effect.none), + red_hood => (new string' ("Red Hood"), head, others => <>), --(others => 0), faction.neutral, effect.none), + white_hood => (new string' ("White Hood"), head, others => <>), --(others => 0), faction.neutral, effect.none), + wooden_helmet => (new string' ("Wooden Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + human_helmet => (new string' ("Human Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + human_armour => (new string' ("Human Armour"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + elven_helmet => (new string' ("Elven Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + elven_armour => (new string' ("Elven Armour"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + orcish_helmet => (new string' ("Orcish Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + orcish_armour => (new string' ("Orcish Armour"), chest, others => <>), --(others => 0), faction.neutral, effect.none), + black_robe => (new string' ("Black Robe"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + cyan_robe => (new string' ("Cyan Robe"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + lime_dress => (new string' ("Lime Dress"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + magenta_dress => (new string' ("Magenta Dress"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + orange_robe => (new string' ("Orange Robe"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + pink_dress => (new string' ("Pink Dress"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + red_robe => (new string' ("Red Robe"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + sexy_dress => (new string' ("Sexy Dress"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + white_robe => (new string' ("White Robe"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + lime_robe => (new string' ("Lime Robe"), full_body, others => <>), --(others => 0), faction.neutral, effect.none), + orange_hood => (new string' ("Orange Hood"), head, others => <>), --(others => 0), faction.neutral, effect.none), + fur_helmet => (new string' ("Fur Helmet"), head, others => <>), --(others => 0), faction.neutral, effect.none), + black_hood => (new string' ("Black Hood"), head, others => <>), --(others => 0), faction.neutral, effect.none), + cyan_hood => (new string' ("Cyan Hood"), head, others => <>), --(others => 0), faction.neutral, effect.none), + lime_hood => (new string' ("Lime Hood"), head, others => <>) --(others => 0), faction.neutral, effect.none) ); sprite : array (enumeration) of core.sprite; diff --git a/source/ui.adb b/source/ui.adb index a83907c..e45f3da 100644 --- a/source/ui.adb +++ b/source/ui.adb @@ -59,8 +59,6 @@ package body ui is ------------------------------------------------------------------------------------------ - structure_limit : constant natural := 12; - font_tint : array (style) of core.colour := ( main => (127, 127, 127, 255), fairy => ( 0, 127, 255, 255), @@ -72,7 +70,6 @@ package body ui is ); sprite : array (style, element) of core.sprite; - font : array (style) of core.font; monospace : core.font; @@ -205,9 +202,9 @@ package body ui is ------------------------------------------------------------------------------------------ - procedure write (text : in string; x, y : in integer; tint : in core.colour := (others => 255); size : in natural := 15; code : in boolean := false) is + procedure write (text : in string; x, y : in integer; tint : in core.colour := (others => 255); size : in natural := font (active).scale; code : in boolean := false) is begin - core.write (text, x, y, tint, (if code then 15 else font (active).scale), (if code then monospace else font (active))); + core.write (text, x, y, tint, (if code then 15 else size), (if code then monospace else font (active))); end write; ------------------------------------------------------------------------------------------ diff --git a/source/ui.ads b/source/ui.ads index 013fda0..0f0e7cf 100644 --- a/source/ui.ads +++ b/source/ui.ads @@ -22,6 +22,8 @@ package ui is style_count : constant natural := style'pos (style'last) + 1; + font : array (style) of core.font; + active : style := main; prioritize : boolean := false; @@ -32,7 +34,7 @@ package ui is procedure echo (message : in string); - procedure write (text : in string; x, y : in integer; tint : in core.colour := (others => 255); size : in natural := 15; code : in boolean := false); + procedure write (text : in string; x, y : in integer; tint : in core.colour := (others => 255); size : in natural := font (active).scale; code : in boolean := false); procedure draw_icon (data : in core.sprite; text : in string; x, y : in integer; action : core.pointer := core.idle_skip'access); procedure draw_overicon (data : in core.sprite; text : in string; x, y : in integer; action : core.pointer := core.idle_skip'access);