Index

Package: Tiles

Description

package Tiles is

Classes

Tile_Object (abstract)

type Tile_Object is abstract new Object with private;

Ancestors:

Immediate Children:

Primitive operations:

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

Types

Tile_Id_Array

type Tile_Id_Array is array (Integer range <>) of Natural;

A_Tile_Id_Array

type A_Tile_Id_Array is access all Tile_Id_Array;

A_Tile

type A_Tile is access all Tile_Object'Class;

Constants & Global variables

ATTRIBUTE_ERROR

ATTRIBUTE_ERROR : exception;

Subprograms & Entries

Initialize

procedure Initialize;

Finalize

procedure Finalize;

A_Tile_Id_Array_Input

function A_Tile_Id_Array_Input
( stream: access Root_Stream_Type'Class ) return A_Tile_Id_Array;

A_Tile_Id_Array_Output

procedure A_Tile_Id_Array_Output
( stream: access Root_Stream_Type'Class;
tia: A_Tile_Id_Array );

Copy

function Copy
( src: A_Tile_Id_Array ) return A_Tile_Id_Array;

Delete

procedure Delete is new Ada.Unchecked_Deallocation
( Tile_Id_Array, A_Tile_Id_Array );

Create_Tile

function Create_Tile return A_Tile;
Creates a new tile using register allocator. Returns null if no allocator has been registered.

Get_Anm_Delay

function Get_Anm_Delay
( this: not null access Tile_Object'Class ) return Time_Span;
Returns the animation frame delay for the tile.

Get_Id

function Get_Id
( this: not null access Tile_Object'Class ) return Natural;
Returns the id of the tile within its library.

Get_Name

function Get_Name
( this: not null access Tile_Object'Class ) return String;
Returns the name of the tile within its library.

Get_Next_Frame

function Get_Next_Frame
( this: not null access Tile_Object'Class ) return Natural;
Returns the id of the next frame in the tile's animation if it's a frame in a single shot animation.

Get_Frame_List

function Get_Frame_List
( this: not null access Tile_Object'Class ) return A_Tile_Id_Array;
Returns a reference to the tile's looped animation frame list, or null if the tile does not have a looping animation. Do not delete the array, it belongs to the tile.

Is_Animated

function Is_Animated
( this: not null access Tile_Object'Class ) return Boolean;
Returns True if the file is animated.

Object_Input (abstract)

function Object_Input
( stream: access Root_Stream_Type'Class ) return Tile_Object is abstract;

Object_Output (abstract)

procedure Object_Output
( stream: access Root_Stream_Type'Class;
obj: Tile_Object ) is abstract;

Set_Attribute

procedure Set_Attribute
( this: in out Tile_Object;
found: out Boolean;
name: String;
val: String := "" );
Sets an attribute on the tile by name. Only certain attribute names are supported and each has its own value constraints. False is returned in 'found' if the attribute name is not recognized. An exception is raised if the value is invalid or if there is a semantic error caused by setting the attribute.

Set_Id

procedure Set_Id
( this: access Tile_Object;
id: Natural );
Sets the id of the tile.

Set_Name

procedure Set_Name
( this: access Tile_Object;
name: String );
Sets the name of the tile.

Delete

procedure Delete
( this: in out A_Tile );
Deletes the tile.