54 lines
2.3 KiB
Ada
54 lines
2.3 KiB
Ada
-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic
|
|
--
|
|
-- GNU General Public Licence (version 3 or later)
|
|
|
|
with core;
|
|
|
|
package material is
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
type enumeration is (
|
|
sulphur, mercury, mint, cinnamon, apple, peach,
|
|
pear, banana, orange, plum, cherry, lemon,
|
|
potato, wheat, carrot, cucumber, onion, garlic,
|
|
eggplant, tomato, meat, fish_meat, skull, animal_skull,
|
|
bone, rib_cage, animal_skin, animal_fur
|
|
);
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
type definition is record
|
|
name : core.unstring;
|
|
cost : natural;
|
|
end record;
|
|
|
|
type points is array (enumeration) of core.point;
|
|
|
|
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;
|
|
|
|
default : constant points := (others => (1, 12));
|
|
|
|
description : access description_array;
|
|
icon : access icon_array;
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
procedure configure;
|
|
|
|
procedure draw_points (data : in points := (others => (0, 0));
|
|
x : in integer := 0;
|
|
y : in integer := 0);
|
|
|
|
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 material;
|