home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / exbas.arj / TEMP / 06-08.BAS < prev    next >
BASIC Source File  |  1995-01-20  |  768b  |  45 lines

  1. REM $INCLUDE: 'fastgraf.bi'
  2.  
  3. DEFINT A-Z
  4.  
  5. CONST Vertices = 10
  6.  
  7. DIM XY(Vertices*2)
  8. DIM WorkArray(700)
  9.  
  10. REM (x,y) coordinates of vertices
  11. DATA 200,100, 300, 80, 400,100, 400,220, 300,320
  12. DATA 240,320, 160,240, 160,200, 200,160, 210,150
  13.  
  14. OldMode = FGgetmode
  15.  
  16. IF FGtestmode(16,1) THEN
  17.    FGsetmode 16
  18. ELSEIF FGtestmode(15,1) THEN
  19.    FGsetmode 15
  20. ELSE
  21.    PRINT "This program requires a 640 x 350 EGA graphics mode."
  22.    STOP
  23. END IF
  24.  
  25. FOR I = 0 TO Vertices*2-1
  26.    READ XY(I)
  27. NEXT
  28.  
  29. FGsetcolor 1
  30. FGpolyoff -120, -25
  31. FGpolyline XY(), Vertices
  32. FGpolyoff 200, -25
  33. FGpolyfill XY(), WorkArray(), Vertices
  34. FGwaitkey
  35.  
  36. FGsetcolor 2
  37. FGsetclip 480, 639, 175, 349
  38. FGpolyfill XY(), WorkArray(), Vertices
  39. FGwaitkey
  40.  
  41. FGsetmode OldMode
  42. FGreset
  43.  
  44. END
  45.