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-06-09 19:58:49 -04:00
|
|
|
type entity is record
|
2024-05-05 11:38:15 -04:00
|
|
|
index : natural;
|
2024-05-19 12:29:15 -04:00
|
|
|
state : natural;
|
2024-05-03 05:28:44 -04:00
|
|
|
x, y : integer;
|
|
|
|
end record;
|
|
|
|
|
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-06-09 19:58:49 -04:00
|
|
|
type entity_array is array (natural range <>) of entity;
|
2024-05-03 05:28:44 -04:00
|
|
|
|
2024-06-01 11:46:17 -04:00
|
|
|
type definition is record
|
2024-06-09 19:24:58 -04:00
|
|
|
kind : biome.enumeration;
|
2024-05-05 11:38:15 -04:00
|
|
|
width : natural;
|
|
|
|
height : natural;
|
2024-05-19 13:29:28 -04:00
|
|
|
chad_count : natural;
|
|
|
|
chad_limit : natural;
|
2024-05-25 06:33:05 -04:00
|
|
|
tiles : access integer_matrix;
|
2024-05-19 07:02:34 -04:00
|
|
|
clips : access boolean_matrix;
|
|
|
|
views : access boolean_matrix;
|
2024-06-09 19:58:49 -04:00
|
|
|
landmarks : access landmark.informations;
|
2024-06-09 20:32:04 -04:00
|
|
|
locations : access location.informations;
|
2024-06-10 04:15:35 -04:00
|
|
|
constructions : access construction.informations;
|
2024-05-13 09:20:16 -04:00
|
|
|
equipments : access entity_array;
|
2024-05-09 05:07:20 -04:00
|
|
|
units : access entity_array;
|
2024-06-01 11:56:18 -04:00
|
|
|
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-09 12:57:11 -04:00
|
|
|
show_unit_data : unit.enumeration := unit.none;
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
procedure make (index : in biome.enumeration; width, height, 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-06-01 20:42:12 -04:00
|
|
|
procedure draw_performance_box;
|
|
|
|
|
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-06-01 11:56:18 -04:00
|
|
|
procedure add_chad (data : in chad.information);
|
2024-05-17 18:35:31 -04:00
|
|
|
|
2024-06-09 16:53:27 -04:00
|
|
|
procedure draw_unit (data : in unit.enumeration; state : in core.animation; x, y, factor : in integer);
|
2024-06-09 12:57:11 -04:00
|
|
|
procedure show_unit;
|
2024-06-09 12:38:38 -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-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;
|