104 lines
4.7 KiB
Ada
104 lines
4.7 KiB
Ada
-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
|
|
--
|
|
-- GNU General Public Licence (version 3 or later)
|
|
|
|
with core, ui, attribute, skill, resource, material, lore, biome, landmark, location, faction, equipment, magic, deity, monster, unit, construction, chad, effect;
|
|
|
|
use type core.cursor_code;
|
|
use type core.signal_code;
|
|
use type core.vector;
|
|
use type core.point;
|
|
|
|
package world is
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
type integer_matrix is array (natural range <>, natural range <>) of integer;
|
|
type boolean_matrix is array (natural range <>, natural range <>) of boolean;
|
|
|
|
type definition is record
|
|
kind : biome.enumeration := biome.enumeration'first;
|
|
width : natural := 0;
|
|
height : natural := 0;
|
|
tiles : access integer_matrix := null;
|
|
clips : access boolean_matrix := null;
|
|
views : access boolean_matrix := null;
|
|
landmark_count : core.point := (0, 0);
|
|
location_count : core.point := (0, 0);
|
|
construction_count : core.point := (0, 0);
|
|
equipment_count : core.point := (0, 0);
|
|
unit_count : core.point := (0, 0);
|
|
chad_count : core.point := (0, 0);
|
|
landmarks : access landmark.informations := null;
|
|
locations : access location.informations := null;
|
|
constructions : access construction.informations := null;
|
|
equipments : access equipment.informations := null;
|
|
units : access unit.informations := null;
|
|
chads : access chad.informations := null;
|
|
end record;
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
map : definition;
|
|
|
|
review_skill_data : skill.enumeration;
|
|
review_unit_data : unit.enumeration;
|
|
review_chad_data : chad.enumeration;
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
procedure configure;
|
|
|
|
function equipment_valid (data : in equipment.enumeration) return boolean;
|
|
|
|
function random_landmark return landmark.information;
|
|
function random_location return location.information;
|
|
function random_construction return construction.information;
|
|
function random_equipment return equipment.information;
|
|
function random_unit return unit.information;
|
|
|
|
procedure insert_landmark (data : in landmark.information);
|
|
procedure insert_location (data : in location.information);
|
|
procedure insert_construction (data : in construction.information);
|
|
procedure insert_equipment (data : in equipment.information);
|
|
procedure insert_unit (data : in unit.information);
|
|
procedure insert_chad (data : in chad.information);
|
|
|
|
procedure draw_landmark (data : in landmark.enumeration; x, y, factor : in integer);
|
|
procedure draw_location (data : in location.enumeration; used : in boolean; x, y, factor : in integer);
|
|
procedure draw_construction (data : in construction.enumeration; x, y, factor : in integer);
|
|
procedure draw_equipment (data : in equipment.enumeration; x, y, factor : in integer);
|
|
procedure draw_unit (data : in unit.enumeration; state : in core.animation; x, y, factor : in integer);
|
|
procedure draw_chad (data : in chad.information; state : in core.animation; x, y, factor : in integer);
|
|
|
|
procedure review_skill;
|
|
procedure review_unit;
|
|
procedure review_chad;
|
|
|
|
procedure view_chad_information (data : in chad.information; x, y, width : in integer);
|
|
|
|
procedure make (index : in biome.enumeration; width, height, landmark_limit, location_limit, construction_limit, equipment_limit, unit_limit, chad_limit : in natural);
|
|
|
|
procedure save (file_name : in string);
|
|
procedure load (file_name : in string);
|
|
|
|
procedure draw;
|
|
|
|
procedure mapshot (file_path : in string);
|
|
|
|
function map_is_revealed return boolean;
|
|
|
|
procedure reveal_map;
|
|
procedure restore_points;
|
|
procedure increase_attributes;
|
|
procedure increase_resources;
|
|
|
|
procedure player_up;
|
|
procedure player_down;
|
|
procedure player_left;
|
|
procedure player_right;
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
end world;
|