Index

Package: Clip_Maps

Description

package Physics.Clip_Maps is

Classes

Clip_Map

type Clip_Map is new Object with private;

Ancestors:

Primitive operations:

Construct
Delete (overriding Objects.Delete)
Objects.Adjust (Inherited)
Objects.Construct (Inherited)
Objects.Object_Read (Inherited)
Objects.Object_Write (Inherited)
Objects.To_String (Inherited)

Types

A_Clip_Map

type A_Clip_Map is access all Clip_Map'Class;

Subprograms & Entries

Create_Clip_Map

function Create_Clip_Map
( width, height, tileWidth: Positive;
mapLayers: not null A_Layer_Array;
libName: String ) return A_Clip_Map;
Creates a new empty clip map. 'width' and 'height' and the size of the map in tiles, and 'tileWidth' is the size of a tile in pixels. An exception is raised on error.

Get

function Get
( this: not null access Clip_Map'Class;
x, y: Float ) return Clip_Type;
Returns the type of clipping found at a map location in pixels.

Get

function Get
( this: not null access Clip_Map'Class;
x, y: Integer ) return Clip_Type;
Returns the type of clipping found at a map location in tiles. The upper left tile in the map is at 0, 0.

Get_Height

function Get_Height
( this: not null access Clip_Map'Class ) return Positive;
Returns the map's height in pixels.

Get_Width

function Get_Width
( this: not null access Clip_Map'Class ) return Positive;
Returns the map's width in pixels.

Set_Tile

procedure Set_Tile
( this: not null access Clip_Map'Class;
id: Natural;
x, y: Natural;
layer: Natural );
Sets the id of a tile at a location in the map. The clip map is updated appropriately with the new proper type of clipping at that location.

Tile_Width

function Tile_Width
( this: not null access Clip_Map'Class ) return Positive;
Returns the size of a tile in pixels that the clip map is using.

Delete

procedure Delete
( this: in out A_Clip_Map );
Deletes the clip map.