xabina/map.ads

75 lines
4.1 KiB
Ada
Raw Normal View History

2023-10-15 12:56:21 -04:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- 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 (
2023-10-15 13:35:03 -04:00
stone_wall, wooden_wall, stone_floor, wooden_floor, water_shallow, water_deep, swamp_shallow, swamp_deep
2023-10-15 12:56:21 -04:00
);
type mark is mod 72;
type width is mod 120;
type height is mod 40;
------------------------------------------------------------------------------------------
2023-10-15 13:35:03 -04:00
type constant_type is new core.constant_type with
2023-10-15 12:56:21 -04:00
record
collide : boolean := false;
condition_limit : natural := 0;
end record;
2023-10-15 13:35:03 -04:00
type variable_type is new core.variable_type with
2023-10-15 12:56:21 -04:00
record
2023-10-15 13:35:03 -04:00
entity : core.list := core.none;
2023-10-15 12:56:21 -04:00
identifier : natural := 0;
end record;
type matrical_type is
record
2023-10-15 13:35:03 -04:00
map : list := stone_floor;
condition : natural := 0;
2023-10-15 12:56:21 -04:00
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 := (
2023-10-15 13:35:03 -04:00
(core.map, "Stone Wall ", '#', core.colour.grey, core.effect.bold, true, 59),
(core.map, "Wooden Wall ", '#', core.colour.yellow, core.effect.normal, false, 23),
(core.map, "Stone Floor ", '.', core.colour.grey, core.effect.bold, true, 47),
(core.map, "Wooden Floor ", '.', core.colour.yellow, core.effect.normal, false, 11),
(core.map, "Water (shallow) ", '~', core.colour.blue, core.effect.normal, false, 0),
(core.map, "Water (deep) ", '~', core.colour.blue, core.effect.bold, true, 0),
(core.map, "Swamp (shallow) ", '~', core.colour.green, core.effect.normal, false, 0),
(core.map, "Swamp (deep) ", '~', core.colour.green, core.effect.bold, true, 0)
2023-10-15 12:56:21 -04:00
);
variable_data : variable_list;
matrical_data : matrical_list;
------------------------------------------------------------------------------------------
procedure generate;
procedure render;
------------------------------------------------------------------------------------------
end map;