home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / expas.arj / TEMP / 13-09.PAS < prev    next >
Pascal/Delphi Source File  |  1995-01-20  |  1KB  |  74 lines

  1. program main;
  2. uses fgmain, fgbitmap, fgmisc;
  3.  
  4. var
  5.   delay, y : integer;
  6.  
  7. begin
  8.  
  9.   { initialize the video environment }
  10.  
  11.   fg_initpm;
  12.   fg_setmode(20);
  13.  
  14.   { define a processor-dependent panning delay }
  15.  
  16.   delay := fg_measure div 16;
  17.  
  18.   { draw a blue box with a white border on page 1 }
  19.  
  20.   fg_setpage(1);
  21.   fg_setcolor(9);
  22.   fg_fillpage;
  23.   fg_setcolor(15);
  24.   fg_box(0,319,0,199);
  25.   fg_move(160,100);
  26.   fg_justify(0,0);
  27.   fg_print('This is page 1',14);
  28.  
  29.   { display what we just drew on page 1 }
  30.  
  31.   fg_setvpage(1);
  32.   fg_waitkey;
  33.  
  34.   { draw a red hollow box at the top of page 0 (now invisible) }
  35.  
  36.   fg_setpage(0);
  37.   fg_setcolor(12);
  38.   fg_box(0,319,0,19);
  39.   fg_setcolor(15);
  40.   fg_move(160,10);
  41.   fg_print('SPLIT SCREEN',12);
  42.  
  43.   { activate the split screen environment, making the first 20 lines   }
  44.   { of page 0 appear at the bottom of the screen, and making the first }
  45.   { 180 lines of page 1 appear at the top                              }
  46.  
  47.   fg_split(180);
  48.   fg_waitkey;
  49.  
  50.   { pan upward in one-line increments, displaying the rest of page 1 }
  51.  
  52.   fg_setpage(1);
  53.   for y := 0 to 20 do
  54.   begin
  55.     fg_pan(0,y);
  56.     fg_stall(delay);
  57.   end;
  58.   fg_waitkey;
  59.  
  60.   { pan back down in one-line increments to the original position }
  61.  
  62.   for y := 20 downto 0 do
  63.   begin
  64.     fg_pan(0,y);
  65.     fg_stall(delay);
  66.   end;
  67.   fg_waitkey;
  68.  
  69.   { restore 80x25 text mode and exit }
  70.  
  71.   fg_setmode(3);
  72.   fg_reset;
  73. end.
  74.