program Worldmap;

{  This program draws a project of the world's continents on the hires  }
{  screen very rapidly.  The program uses the external procedure        }
{  LINE.INV which must reside on the default disk in order to compile   }
{  the program.  The program also uses an external data file which      }
{  holds the map coordinates: WORLDMAP.DAT.                             }

{  Jeff Firestone.  June, 1984.                                         }

Const
  ArSize = 1280;
var
  n,x,x1,y,y1,i,j : integer;
  WorldArray : array [0..ArSize] of integer;
  f : file;

procedure line(a,b,c,d,e:integer); external 'line.inv';

procedure ReadInfo;
begin
  FillChar(WorldArray, SizeOf(WorldArray), 0);
  assign(f, 'worldmap.dat');
  reset(f);
  BlockRead(f, WorldArray, round((ArSize/128)*2));
  close(f);
end;


begin
  ReadInfo;
  i:= 0;
  hires;  hirescolor(7);
  n:= WorldArray[i]; i:=i+1;
  repeat
    x1:= WorldArray[i]; i:=i+1;
    y1:= WorldArray[i]; i:=i+1;
    x := WorldArray[i]; i:=i+1;
    y := WorldArray[i]; i:=i+1;
    line (x1, y1, x, y, 1);
    x1:= x; y1:= y;
    for j:= 3 to n do
    begin
      x := WorldArray[i]; i:=i+1;
      y := WorldArray[i]; i:=i+1;
      line (x1, y1, x, y, 1);
      x1:= x; y1:= y;
    end;
  n:= WorldArray[i]; i:=i+1;
  until (n < 1);
end.


{2------------------------------------------------}
