2024-04-25 00:27:13 -04:00
|
|
|
-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
|
|
|
|
--
|
|
|
|
-- GNU General Public Licence (version 3 or later)
|
|
|
|
|
2024-06-09 19:24:58 -04:00
|
|
|
with core, ui, attribute, skill, resource, material, lore, biome, landmark, location, faction, equipment, unit, construction, chad, effect;
|
|
|
|
|
|
|
|
use type core.cursor_code;
|
|
|
|
use type core.signal_code;
|
|
|
|
use type core.point;
|
2024-02-15 21:03:09 -05:00
|
|
|
|
|
|
|
package world is
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
2024-05-19 07:02:34 -04:00
|
|
|
type integer_matrix is array (natural range <>, natural range <>) of integer;
|
|
|
|
type boolean_matrix is array (natural range <>, natural range <>) of boolean;
|
2024-05-03 05:28:44 -04:00
|
|
|
|
2024-06-01 11:46:17 -04:00
|
|
|
type definition is record
|
2024-06-10 05:26:07 -04:00
|
|
|
kind : biome.enumeration;
|
|
|
|
width : natural;
|
|
|
|
height : natural;
|
|
|
|
tiles : access integer_matrix;
|
|
|
|
clips : access boolean_matrix;
|
|
|
|
views : access boolean_matrix;
|
|
|
|
landmark_count : core.point;
|
|
|
|
location_count : core.point;
|
|
|
|
construction_count : core.point;
|
|
|
|
equipment_count : core.point;
|
|
|
|
unit_count : core.point;
|
|
|
|
chad_count : core.point;
|
|
|
|
landmarks : access landmark.informations;
|
|
|
|
locations : access location.informations;
|
|
|
|
constructions : access construction.informations;
|
|
|
|
equipments : access equipment.informations;
|
|
|
|
units : access unit.informations;
|
|
|
|
chads : access chad.informations;
|
2024-05-03 05:28:44 -04:00
|
|
|
end record;
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
2024-06-01 11:46:17 -04:00
|
|
|
map : definition;
|
2024-05-03 05:28:44 -04:00
|
|
|
|
2024-06-10 08:41:20 -04:00
|
|
|
review_unit_data : unit.enumeration := unit.none;
|
2024-06-09 12:57:11 -04:00
|
|
|
|
2024-05-03 05:28:44 -04:00
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
2024-02-15 21:03:09 -05:00
|
|
|
procedure configure;
|
|
|
|
|
2024-06-09 19:24:58 -04:00
|
|
|
function equipment_valid (data : in equipment.enumeration) return boolean;
|
|
|
|
|
2024-06-10 07:06:25 -04:00
|
|
|
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;
|
2024-06-10 05:26:07 -04:00
|
|
|
|
2024-06-10 07:06:25 -04:00
|
|
|
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);
|
2024-06-10 05:26:07 -04:00
|
|
|
|
2024-06-10 08:41:20 -04:00
|
|
|
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_unit;
|
|
|
|
|
2024-06-10 05:26:07 -04:00
|
|
|
procedure make (index : in biome.enumeration; width, height, landmark_limit, location_limit, construction_limit, equipment_limit, unit_limit, chad_limit : in natural);
|
2024-02-15 21:03:09 -05:00
|
|
|
|
2024-05-23 08:03:38 -04:00
|
|
|
procedure save (file_name : in string);
|
2024-05-25 03:53:53 -04:00
|
|
|
procedure load (file_name : in string);
|
2024-05-23 08:03:38 -04:00
|
|
|
|
2024-04-27 03:49:02 -04:00
|
|
|
procedure draw;
|
2024-02-15 21:03:09 -05:00
|
|
|
|
2024-05-09 15:54:39 -04:00
|
|
|
procedure mapshot (file_path : in string);
|
|
|
|
|
2024-05-22 21:22:34 -04:00
|
|
|
function map_is_revealed return boolean;
|
2024-05-12 10:07:37 -04:00
|
|
|
|
2024-05-22 21:22:34 -04:00
|
|
|
procedure resource_cheat_1;
|
|
|
|
procedure resource_cheat_2;
|
|
|
|
procedure resource_cheat_3;
|
|
|
|
procedure resource_cheat_4;
|
|
|
|
procedure resource_cheat_5;
|
|
|
|
procedure resource_cheat_6;
|
|
|
|
procedure reveal_map;
|
2024-06-01 12:39:44 -04:00
|
|
|
procedure restore_points;
|
2024-06-10 10:19:24 -04:00
|
|
|
procedure increase_attributes;
|
2024-05-22 21:22:34 -04:00
|
|
|
|
2024-05-25 01:48:03 -04:00
|
|
|
procedure player_up;
|
|
|
|
procedure player_down;
|
|
|
|
procedure player_left;
|
|
|
|
procedure player_right;
|
|
|
|
|
2024-02-15 21:03:09 -05:00
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
end world;
|