xhads/source/resource.ads

48 lines
1.8 KiB
Ada

-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
--
-- GNU General Public Licence (version 3 or later)
with core;
package resource is
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
type enumeration is (
gold, wood, stone, metal, leather, gem
);
------------------------------------------------------------------------------------------
type definition is record
base : core.point;
name : core.unstring;
text : core.unstring;
end record;
type points is array (enumeration) of core.point;
type price is array (enumeration) of natural;
type description_array is array (enumeration range <>) of definition;
type icon_array is array (enumeration range <>) of core.sprite;
------------------------------------------------------------------------------------------
count : constant natural := enumeration'pos (enumeration'last) + 1;
description : access description_array;
icon : access icon_array;
------------------------------------------------------------------------------------------
procedure configure;
procedure draw_points (data : in points; x, y : in integer);
procedure save_points (here : in core.io.file_type; data : in points);
procedure load_points (here : in core.io.file_type; data : out points);
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
end resource;