------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- Copyright (c) 2023 - Ognjen 'xolatile' Milan Robovic ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- Xabina is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either -- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the -- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- Experimental minimal terminal rogue-like game in Ada programming language. I used to write a lot of Ada programs some time ago, then went in full C and assembly mode, and came -- back to Ada, but realized that I keep my folders messy... Since it's bothersome to find my old Ada projects and share them here, I decided that the most easy thing to do is to -- write a new program in Ada, a tiny game. Work in progress, it's messy and ugly for now... ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ with core; use core; package item is ------------------------------------------------------------------------------------------ type item_list is ( WOOD, BARK, FLAX, PLANK, STICK, BRACES, NAILS, LINEN, CHAMOMILE, MINT, WAX, SALT, SUGAR, PEPPER, CINNAMON, YEAST, SKULL, BONE, INTESTINES, FUR, LEATHER, FAT, HORN, TUSK, COPPER_ORE, IRON_ORE, SILVER_ORE, GOLD_ORE, COAL_ORE, TIN_ORE, ZINC_ORE, LEAD_ORE, COPPER, IRON, SILVER, GOLD, COAL, TIN, ZINC, LEAD, BRONZE, BRASS, STEEL, MERCURY, OIL, INK, VENOM, SILK, PAPERS, PAPERWEIGHT ); type item_mark is mod 72; ------------------------------------------------------------------------------------------ type item_constant_type is new entity_constant_type with record value : natural := 0; weight : natural := 0; end record; type item_variable_type is new entity_variable_type with record owner : natural := 0; end record; type item_constant_list is array (item_list) of item_constant_type; type item_variable_list is array (item_mark) of item_variable_type; ------------------------------------------------------------------------------------------ item_constant_data : constant item_constant_list := ( (ENTITY_ITEM, "Wood ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 2), (ENTITY_ITEM, "Bark ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 2), (ENTITY_ITEM, "Flax ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 3, 1), (ENTITY_ITEM, "Plank ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 2), (ENTITY_ITEM, "Stick ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 2), (ENTITY_ITEM, "Braces ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 1), (ENTITY_ITEM, "Nails ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1), (ENTITY_ITEM, "Linen ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 23, 1), (ENTITY_ITEM, "Chamomile ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 3, 1), (ENTITY_ITEM, "Mint ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 5, 1), (ENTITY_ITEM, "Wax ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 7, 1), (ENTITY_ITEM, "Salt ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 1), (ENTITY_ITEM, "Sugar ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 17, 1), (ENTITY_ITEM, "Pepper ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 11, 1), (ENTITY_ITEM, "Cinnamon ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 23, 1), (ENTITY_ITEM, "Yeast ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 5, 1), (ENTITY_ITEM, "Skull ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 1), (ENTITY_ITEM, "Bone ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1), (ENTITY_ITEM, "Intestines ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1), (ENTITY_ITEM, "Fur ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 7, 2), (ENTITY_ITEM, "Leather ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 3, 1), (ENTITY_ITEM, "Fat ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1), (ENTITY_ITEM, "Horn ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 1), (ENTITY_ITEM, "Tusk ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 3, 5), (ENTITY_ITEM, "Copper Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 5, 7), (ENTITY_ITEM, "Iron Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 7, 11), (ENTITY_ITEM, "Silver Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 17, 7), (ENTITY_ITEM, "Gold Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 23, 7), (ENTITY_ITEM, "Coal Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 7), (ENTITY_ITEM, "Tin Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 7), (ENTITY_ITEM, "Zinc Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 7), (ENTITY_ITEM, "Lead Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 11, 13), (ENTITY_ITEM, "Copper ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 17, 5), (ENTITY_ITEM, "Iron ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 19, 7), (ENTITY_ITEM, "Silver ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 23, 5), (ENTITY_ITEM, "Gold ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 29, 5), (ENTITY_ITEM, "Coal ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 19, 5), (ENTITY_ITEM, "Tin ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 11, 5), (ENTITY_ITEM, "Zinc ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 5), (ENTITY_ITEM, "Lead ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 47, 7), (ENTITY_ITEM, "Bronze ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 61, 5), (ENTITY_ITEM, "Brass ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 67, 5), (ENTITY_ITEM, "Steel ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 71, 7), (ENTITY_ITEM, "Mercury ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 97, 11), (ENTITY_ITEM, "Oil ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 5, 1), (ENTITY_ITEM, "Ink ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 1), (ENTITY_ITEM, "Venom ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 11, 1), (ENTITY_ITEM, "Silk ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 1), (ENTITY_ITEM, "Papers ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1), (ENTITY_ITEM, "Paperweight ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 1) ); item_variable_data : item_variable_list; ------------------------------------------------------------------------------------------ end item;