TABLE OF CONTENTS


Maps/Maps [ Packages ]

[ Top ] [ Packages ]

FUNCTION

 Provide code for manipulate the game map

SOURCE

package Maps is

Maps/Maps.Sky_Cell [ Records ]

[ Top ] [ Maps ] [ Records ]

FUNCTION

 Data structure for cells in game map

SOURCE

   type Sky_Cell is record
      Base_Index: Extended_Base_Range := 0;
      Visited: Boolean;
      Event_Index: Natural := 0;
      Mission_Index: Mission_Container.Extended_Index := 0;
   end record;

PARAMETERS

 Base_Index    - If sky base is in cell > 0
 Visited       - True if player was in this cell
 Event_Index   - If event is in cell > 0
 Mission_Index - If accepted mission is in cell > 0

Maps/Maps.Empty_Cell [ Constants ]

[ Top ] [ Maps ] [ Constants ]

FUNCTION

 Default, empty map cell data

SOURCE

   Empty_Cell: constant Sky_Cell := (others => <>);

Maps/Maps.Sky_Map [ Variables ]

[ Top ] [ Maps ] [ Variables ]

FUNCTION

 Game map

SOURCE

   Sky_Map: array(Map_X_Range, Map_Y_Range) of Sky_Cell;

Maps/Maps.Count_Distance [ Subprograms ]

[ Top ] [ Maps ] [ Subprograms ]

FUNCTION

 Count distance (in map fields) between player ship and the destination
 point

SOURCE

   function Count_Distance
     (Destination_X: Map_X_Range; Destination_Y: Map_Y_Range)
      return Natural with
      Import => True,
      Convention => C,
      External_Name => "countAdaDistance";

PARAMETERS

 Destination_X - X coordinate of the destination point
 Destination_Y - Y coordinate of the destination point

RESULT

 Distance between player ship and destination point