-- ALEOldFormat.mesa 
--   Edited by Sweet,  9-Oct-80 23:25:41

DIRECTORY
  ALEOps;
ALEFormat: DEFINITIONS =
  BEGIN
  OldAPos: TYPE = RECORD[x,y: INTEGER];
  PictureBase: TYPE = BASE POINTER TO Header;
  SubTableBase: TYPE = BASE POINTER TO SubTable;
  SubTable: TYPE = RECORD[UNSPECIFIED];
  BlockDescriptor: TYPE = RECORD [
    offset: PictureBase RELATIVE POINTER TO SubTable,
    length: CARDINAL];
  NullDescriptor: BlockDescriptor = [LOOPHOLE[0], 0];

  IndexRange: CARDINAL = 37777B;

  Password: CARDINAL = 8221;
  Header: TYPE = RECORD [
    password: CARDINAL ← Password,
    hash: BlockDescriptor ← NullDescriptor,
    string: BlockDescriptor ← NullDescriptor,
    points: BlockDescriptor ← NullDescriptor,
    lines: BlockDescriptor ← NullDescriptor,
    labels: BlockDescriptor ← NullDescriptor];

  Point: TYPE = RECORD [pos: OldAPos];
  PointIndex: TYPE = SubTableBase RELATIVE POINTER [0..IndexRange] TO Point;

  Line: TYPE = RECORD [
    width: ALEOps.LineWidth,
    p1: PointIndex,
    texture: ALEOps.LineTexture,
    p2: PointIndex];
  LineIndex: TYPE = SubTableBase RELATIVE POINTER [0..IndexRange] TO Line;

  Label: TYPE = RECORD [
    font: ALEOps.FontSize,
    mode: ALEOps.LabelMode,
    hti: ALEOps.HTIndex,
    pos: OldAPos];
  LabelIndex: TYPE = SubTableBase RELATIVE POINTER [0..IndexRange] TO Label;

  END.