1. with Tiles.Keen;                        use Tiles.Keen; 
  2.  
  3. package Worlds.Keen is 
  4.  
  5.     pragma Elaborate_Body; 
  6.  
  7.     type Keen_World is new World_Object with private; 
  8.     type A_Keen_World is access all Keen_World'Class; 
  9.  
  10.     -- Returns the 'action' attribute of the tile at the given location. The 
  11.     -- dominant action of the tiles in each layer at 'x,y' will be returned. 
  12.     function Get_Action( this : access Keen_World; 
  13.                          x, y : Integer ) return Action_Type; 
  14.  
  15. private 
  16.  
  17.     type Keen_World is new World_Object with 
  18.         record 
  19.             -- the following fields are streamed 
  20.             introduction : Unbounded_String; 
  21.         end record; 
  22.  
  23.     -- Constructs the world without a map or library name; used for streaming. 
  24.     procedure Construct( this : access Keen_World ); 
  25.  
  26.     -- Constructs a new empty world with the given arguments 
  27.     procedure Construct( this    : access Keen_World; 
  28.                          width, 
  29.                          height  : Positive; 
  30.                          libName, 
  31.                          domain  : String ); 
  32.     pragma Precondition( libName'Length > 0 ); 
  33.     pragma Precondition( domain'Length > 0 ); 
  34.  
  35.     procedure Queue_Load_Events( this : access Keen_World ); 
  36.  
  37.     -- extended keen properties: 
  38.     -- "introduction" : the introduction text 
  39.     procedure Set_Property( this : access Keen_World; name, value : String ); 
  40.     pragma Precondition( name'Length > 0 ); 
  41.  
  42.     function Object_Input( stream : access Root_Stream_Type'Class ) return Keen_World; 
  43.     for Keen_World'Input use Object_Input; 
  44.  
  45.     procedure Object_Read( stream : access Root_Stream_Type'Class; obj : out Keen_World ); 
  46.     for Keen_World'Read use Object_Read; 
  47.  
  48.     procedure Object_Write( stream : access Root_Stream_Type'Class; obj : Keen_World ); 
  49.     for Keen_World'Write use Object_Write; 
  50.  
  51. end Worlds.Keen;