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...
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
3.5KB

  1. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  2. -- Copyright (c) 2023 - Ognjen 'xolatile' Milan Robovic
  3. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  4. -- 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
  5. -- 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
  6. -- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  7. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  8. with core;
  9. package map is
  10. ------------------------------------------------------------------------------------------
  11. type list is (
  12. stone_wall, wooden_wall, stone_floor, wooden_floor, water_shallow, water_deep, swamp_shallow, swamp_deep
  13. );
  14. type mark is mod 72;
  15. type width is mod 120;
  16. type height is mod 40;
  17. ------------------------------------------------------------------------------------------
  18. type constant_type is new core.constant_type with
  19. record
  20. collide : boolean := false;
  21. condition_limit : natural := 0;
  22. end record;
  23. type variable_type is new core.variable_type with
  24. record
  25. entity : core.list := core.none;
  26. identifier : natural := 0;
  27. end record;
  28. type matrical_type is
  29. record
  30. map : list := stone_floor;
  31. condition : natural := 0;
  32. end record;
  33. type constant_list is array (list) of constant_type;
  34. type variable_list is array (mark) of variable_type;
  35. type matrical_list is array (height, width) of matrical_type;
  36. ------------------------------------------------------------------------------------------
  37. constant_data : constant constant_list := (
  38. (core.map, "Stone Wall ", '#', core.colour.grey, core.effect.bold, true, 59),
  39. (core.map, "Wooden Wall ", '#', core.colour.yellow, core.effect.normal, false, 23),
  40. (core.map, "Stone Floor ", '.', core.colour.grey, core.effect.bold, true, 47),
  41. (core.map, "Wooden Floor ", '.', core.colour.yellow, core.effect.normal, false, 11),
  42. (core.map, "Water (shallow) ", '~', core.colour.blue, core.effect.normal, false, 0),
  43. (core.map, "Water (deep) ", '~', core.colour.blue, core.effect.bold, true, 0),
  44. (core.map, "Swamp (shallow) ", '~', core.colour.green, core.effect.normal, false, 0),
  45. (core.map, "Swamp (deep) ", '~', core.colour.green, core.effect.bold, true, 0)
  46. );
  47. variable_data : variable_list;
  48. matrical_data : matrical_list;
  49. ------------------------------------------------------------------------------------------
  50. procedure generate;
  51. procedure render;
  52. ------------------------------------------------------------------------------------------
  53. end map;