home *** CD-ROM | disk | FTP | other *** search
/ GRIPS 2: Government Rast…rocessing Software & Data / GRIPS_2.cdr / dos / adrg / source / savescrn.pas < prev   
Encoding:
Pascal/Delphi Source File  |  1989-06-06  |  802 b   |  24 lines

  1. procedure savescrn(user_file: string; screenrow, screencol : integer);
  2. { save the full screen to the output file, to be displayed by a program
  3.   called dispany.pas without having to regenerate the tiles from the CD-ROM
  4.   (until the getscreen/putscreen procedures work, this will do) }
  5. var
  6.   tempbuf     : array[0..639] of byte;
  7.   outpfile    : file;
  8.   ro, col, n  : integer;
  9.  
  10. begin       {procedure savescrn}
  11.  
  12.   assign(outpfile,user_file);rewrite(outpfile,1);
  13.  
  14.   for ro := 0 to screenrow do
  15.   begin
  16.      for col := 0 to screencol do
  17.      begin
  18.         tempbuf[col] := getpixel(col,ro);       { fill-up a line of pixels }
  19.      end;    {for col loop }
  20.      blockwrite(outpfile,tempbuf,sizeof(tempbuf),n);
  21.   end;       {for ro loop }
  22.   close(outpfile);
  23. end;   {procedure savescrn}
  24.