------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- 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; package map is ------------------------------------------------------------------------------------------ type list is ( map_stone_wall, map_wooden_wall, map_stone_floor, map_wooden_floor, map_water_shallow, map_water_deep, map_swamp_shallow, map_swamp_deep ); type mark is mod 72; type width is mod 120; type height is mod 40; ------------------------------------------------------------------------------------------ type constant_type is new core.entity_constant_type with record collide : boolean := false; condition_limit : natural := 0; end record; type variable_type is new core.entity_variable_type with record entity : core.entity_list := core.entity_null; identifier : natural := 0; end record; type matrical_type is record map : list := map_stone_floor; condition : natural := 0; end record; type constant_list is array (list) of constant_type; type variable_list is array (mark) of variable_type; type matrical_list is array (height, width) of matrical_type; ------------------------------------------------------------------------------------------ constant_data : constant constant_list := ( (core.entity_map, "Stone Wall ", '#', core.colour.grey, core.effect.bold, true, 59), (core.entity_map, "Wooden Wall ", '#', core.colour.yellow, core.effect.normal, false, 23), (core.entity_map, "Stone Floor ", '.', core.colour.grey, core.effect.bold, true, 47), (core.entity_map, "Wooden Floor ", '.', core.colour.yellow, core.effect.normal, false, 11), (core.entity_map, "Water (shallow) ", '~', core.colour.blue, core.effect.normal, false, 0), (core.entity_map, "Water (deep) ", '~', core.colour.blue, core.effect.bold, true, 0), (core.entity_map, "Swamp (shallow) ", '~', core.colour.green, core.effect.normal, false, 0), (core.entity_map, "Swamp (deep) ", '~', core.colour.green, core.effect.bold, true, 0) ); variable_data : variable_list; matrical_data : matrical_list; ------------------------------------------------------------------------------------------ procedure generate; procedure render; ------------------------------------------------------------------------------------------ end map;