xhads/source/world.ads

89 lines
2.8 KiB
Ada
Raw Normal View History

-- 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, 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
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
type entity_description is record
index : natural;
2024-05-19 12:29:15 -04:00
state : natural;
x, y : integer;
end record;
type integer_matrix is array (natural range <>, natural range <>) of integer;
type boolean_matrix is array (natural range <>, natural range <>) of boolean;
type entity_array is array (natural range <>) of entity_description;
type definition is record
kind : biome.enumeration;
width : natural;
height : natural;
chad_count : natural;
chad_limit : natural;
tiles : access integer_matrix;
clips : access boolean_matrix;
views : access boolean_matrix;
landmarks : access entity_array;
locations : access entity_array;
constructions : access entity_array;
equipments : access entity_array;
units : access entity_array;
chads : access chad.informations;
end record;
------------------------------------------------------------------------------------------
map : definition;
2024-06-09 12:57:11 -04:00
show_unit_data : unit.enumeration := unit.none;
------------------------------------------------------------------------------------------
2024-02-15 21:03:09 -05:00
procedure configure;
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
procedure save (file_name : in string);
procedure load (file_name : in string);
procedure draw;
2024-02-15 21:03:09 -05:00
2024-06-01 20:42:12 -04:00
procedure draw_performance_box;
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
procedure add_chad (data : in chad.information);
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;
procedure restore_points;
2024-05-22 21:22:34 -04:00
procedure player_up;
procedure player_down;
procedure player_left;
procedure player_right;
2024-02-15 21:03:09 -05:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end world;