home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / exfor.arj / TEMP / 13-09.FOR < prev    next >
Text File  |  1995-01-20  |  2KB  |  73 lines

  1. $INCLUDE: 'C:\FG\FASTGRAF.FI'
  2.  
  3.       PROGRAM MAIN
  4.  
  5.       INTEGER DELAY, Y
  6.       INTEGER FG_MEASURE
  7.  
  8. C   Initialize the video environment
  9.  
  10.       CALL FG_INITPM
  11.       CALL FG_SETMODE(20)
  12.  
  13. C   Define a processor-dependent panning delay
  14.  
  15.       DELAY = FG_MEASURE() / 16
  16.  
  17. C   Draw a blue box with a white border on page 1
  18.  
  19.       CALL FG_SETPAGE(1)
  20.       CALL FG_SETCOLOR(9)
  21.       CALL FG_FILLPAGE
  22.       CALL FG_SETCOLOR(15)
  23.       CALL FG_BOX(0,319,0,199)
  24.       CALL FG_MOVE(160,100)
  25.       CALL FG_JUSTIFY(0,0)
  26.       CALL FG_PRINT('This is page 1',14)
  27.  
  28. C   Display what we just drew on page 1
  29.  
  30.       CALL FG_SETVPAGE(1)
  31.       CALL FG_WAITKEY
  32.  
  33. C   Draw a red hollow box at the top of page 0 (now invisible)
  34.  
  35.       CALL FG_SETPAGE(0)
  36.       CALL FG_SETCOLOR(12)
  37.       CALL FG_BOX(0,319,0,19)
  38.       CALL FG_SETCOLOR(15)
  39.       CALL FG_MOVE(160,10)
  40.       CALL FG_PRINT('SPLIT SCREEN',12)
  41.  
  42. C   Activate the split screen environment, making the first 20 lines  
  43. C   of page 0 appear at the bottom of the screen, and making the first
  44. C   180 lines of page 1 appear at the top                             
  45.  
  46.       CALL FG_SPLIT(180)
  47.       CALL FG_WAITKEY
  48.  
  49. C   Pan upward in one-line increments, displaying the rest of page 1
  50.  
  51.       CALL FG_SETPAGE(1)
  52.       DO 10 Y = 0,20
  53.          CALL FG_PAN(0,Y)
  54.          CALL FG_STALL(DELAY)
  55. 10    CONTINUE
  56.       CALL FG_WAITKEY
  57.  
  58. C   Pan back down in one-line increments to the original position
  59.  
  60.       DO 20 Y = 20,0,-1
  61.          CALL FG_PAN(0,Y)
  62.          CALL FG_STALL(DELAY)
  63. 20    CONTINUE
  64.       CALL FG_WAITKEY
  65.  
  66. C   Restore 80x25 text mode and exit
  67.  
  68.       CALL FG_SETMODE(3)
  69.       CALL FG_RESET
  70.  
  71.       STOP ' '
  72.       END
  73.