home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ Games Programming
/
CPPGAMES.ISO
/
fgl
/
fglight
/
expas.arj
/
TEMP
/
08-02.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-01-20
|
830b
|
46 lines
program main;
uses fgmain, fgbitmap, fgmisc;
const
PAGES = 4;
var
color : integer;
old_mode : integer;
page : integer;
message : string[8];
begin
fg_initpm;
if (fg_testmode(13,PAGES) = 0) then
begin
write('This program requires a ');
writeln('320 x 200 EGA graphics mode.');
exit;
end;
old_mode := fg_getmode;
fg_setmode(13);
for page := 0 to PAGES-1 do
begin
fg_setpage(page);
color := page + 1;
fg_setcolor(color);
fg_rect(0,fg_getmaxx,0,fg_getmaxy);
fg_setcolor(0);
fg_locate(12,17);
str(page,message);
fg_text('page '+message,6);
end;
for page := 0 to PAGES-1 do
begin
fg_setvpage(page);
fg_waitkey;
end;
fg_setmode(old_mode);
fg_reset;
end.