home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ Games Programming
/
CPPGAMES.ISO
/
fgl
/
fglight
/
exfor.arj
/
TEMP
/
06-08.FOR
< prev
next >
Wrap
Text File
|
1995-01-20
|
1KB
|
43 lines
$INCLUDE: 'C:\FG\FASTGRAF.FI'
PROGRAM MAIN
PARAMETER (NVERTICES=10)
INTEGER OLD_MODE
INTEGER FG_GETMODE, FG_TESTMODE
INTEGER XY(NVERTICES*2)
INTEGER WORK_ARRAY(700)
DATA XY /200,100, 300, 80, 400,100, 400,220, 300,320,
+ 240,320, 160,240, 160,200, 200,160, 210,150/
CALL FG_INITPM
OLD_MODE = FG_GETMODE()
IF (FG_TESTMODE(16,1) .EQ. 1) THEN
CALL FG_SETMODE(16)
ELSE IF (FG_TESTMODE(15,1) .EQ. 1) THEN
CALL FG_SETMODE(15)
ELSE
STOP 'This program requires a 640 x 350 EGA graphics mode.'
END IF
CALL FG_SETCOLOR(1)
CALL FG_POLYOFF(-120,-25)
CALL FG_POLYLINE(XY,NVERTICES)
CALL FG_POLYOFF(200,-25)
CALL FG_POLYFILL(XY,WORK_ARRAY,NVERTICES)
CALL FG_WAITKEY
CALL FG_SETCOLOR(2)
CALL FG_SETCLIP(480,639,175,349)
CALL FG_POLYFILL(XY,WORK_ARRAY,NVERTICES)
CALL FG_WAITKEY
CALL FG_SETMODE(OLD_MODE)
CALL FG_RESET
STOP ' '
END