type Map_Object is abstract new Object with private;
type Layer_Data is array(Positive range <>) of Natural;
type Layer(size : Positive) is record physical : Boolean := False; -- entities should clip to layer data : Layer_Data(1..size); -- tile ids (size = width * height) end record;
type A_Layer is access all Layer;
type Layer_Array is array (Positive range <>) of A_Layer;
type A_Layer_Array is access all Layer_Array;
type A_Map is access all Map_Object'Class;
function Copy
( | src | : A_Layer_Array ) return A_Layer_Array; |
procedure Move
( | dst, src | : in out A_Layer_Array ); |
function Create_Map
( | width, height | : Positive ) return A_Map; |
function Get_Height
( | this | : not null access Map_Object'Class ) return Positive; |
function Get_Layers
( | this | : not null access Map_Object'Class ) return Positive; |
function Get_Layers_Data
( | this | : not null access Map_Object'Class ) return A_Layer_Array; |
function Get_Tile_Id
( | this | : not null access Map_Object'Class; |
layer | : Positive; | |
x, y | : Integer ) return Natural; |
function Get_Width
( | this | : not null access Map_Object'Class ) return Positive; |
function Object_Input
( | stream | : access Root_Stream_Type'Class ) return Map_Object is abstract; |
procedure Resize
( | this | : not null access Map_Object'Class; |
width, height | : Positive ); |
procedure Set_Tile
( | this | : not null access Map_Object'Class; |
layer | : Positive; | |
x, y | : Integer; | |
tile | : Natural ); |
function Tile_Width
( | this | : not null access Map_Object'Class ) return Positive; |