home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ Games Programming
/
CPPGAMES.ISO
/
fgl
/
fglight
/
expas.arj
/
TEMP
/
12-03.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-01-20
|
772b
|
45 lines
program main;
uses fgmain, fgmisc;
var
old_mode : integer;
x : integer;
begin
{ initialize the video environment }
fg_initpm;
if (fg_testmode(13,1) = 0) then
begin
writeln('This program requires EGA.');
exit;
end;
old_mode := fg_getmode;
fg_setmode(13);
fg_setfunc(3);
{ draw some type of background }
fg_setcolor(15);
fg_rect(0,319,0,199);
{ move the object across the screen }
fg_setcolor(10 xor 15);
for x := -20 to 319 do
begin
if (x mod 5 = 0) then
begin
fg_clprect(x,x+19,95,104);
fg_waitfor(1);
fg_clprect(x,x+19,95,104);
end;
end;
{ restore the original video mode and return to DOS }
fg_setmode(old_mode);
fg_reset;
end.